Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
1| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_id_padron | int | 4 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
-- cuando va a AFIP: Lo primero que hace es marcar como NO VISIBLES todos los impuestos que no se crearon o actualizaron hoy
CREATE OR ALTER PROCEDURE dbo.carga_impuesto_afip_baja
@p_id_padron int
AS
BEGIN
begin try
update padron_impuestos
set visible = 0, modified = getdate()
where id_padron = @p_id_padron
and isnull(created,'1901-01-01') <= getdate() - 1
and isnull(modified,'1901-01-01') <= getdate() - 1
and visible = 1
select 'ok' as ok
end try
begin catch
select ERROR_MESSAGE() as error
end catch
END
GO
GO
-- cuando va a AFIP: Lo primero que hace es marcar como NO VISIBLES todos los impuestos que no se crearon o actualizaron hoy
CREATE OR ALTER PROCEDURE dbo.carga_impuesto_afip_baja
@p_id_padron int
AS
BEGIN
begin try
update padron_impuestos
set visible = 0, modified = getdate()
where id_padron = @p_id_padron
and isnull(created,'1901-01-01') <= getdate() - 1
and isnull(modified,'1901-01-01') <= getdate() - 1
and visible = 1
select 'ok' as ok
end try
begin catch
select ERROR_MESSAGE() as error
end catch
END
GO
Depends On
1Used By
No items found