Description
Properties
| Name | Value |
|---|---|
| ANSI Nulls ON | True |
| Quoted Identifier ON | True |
| Encrypted | False |
| Execute As | |
| Assembly |
Parameters
10| Name | Data Type | Length | Description |
|---|---|---|---|
| @p_id_cheque_alta | int | 4 | |
| @p_cuit_firmante | varchar | 11 | |
| @p_cuit_relacionado | varchar | 11 | |
| @p_fecha_levantamiento | smalldatetime | 4 | |
| @p_fecha_pago | smalldatetime | 4 | |
| @p_fecha_rechazo | smalldatetime | 4 | |
| @p_id_causa | smallint | 2 | |
| @p_importe | money | 8 | |
| @p_nombre_file | varchar | 200 | |
| @p_nro_cheque | int | 4 |
SQL Script
Copy
SET QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
CREATE OR ALTER PROCEDURE dbo.cheques_insertar_altas_procesadas
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <17 Ene 2018>
-- Description: <insertar en chequesBCRA todas las altas resultantes del procesamiento de altas y bajas >
-- =============================================
@p_id_cheque_alta int,
@p_cuit_firmante varchar(11),
@p_cuit_relacionado varchar(11),
@p_fecha_levantamiento smalldatetime,
@p_fecha_pago smalldatetime,
@p_fecha_rechazo smalldatetime,
@p_id_causa smallint,
@p_importe money,
@p_nombre_file varchar(200),
@p_nro_cheque int
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
INSERT INTO ChequesBCRA
(cuit_firmante, cuit_relacionado, fecha_levantamiento, fecha_pago, fecha_rechazo, id_causa, importe, nombre_file, nro_cheque, visible, created)
values (@p_cuit_firmante, @p_cuit_relacionado, @p_fecha_levantamiento, @p_fecha_pago, @p_fecha_rechazo, @p_id_causa, @p_importe, @p_nombre_file, @p_nro_cheque, 1, GETDATE())
DELETE FROM chequesBCRA_procesamiento_altas where (id_cheque = @p_id_cheque_alta)
SELECT 'ok' as ok
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() as error
END CATCH
END
GO
GO
CREATE OR ALTER PROCEDURE dbo.cheques_insertar_altas_procesadas
-- =============================================
-- Author: <Samuel Gonzalez>
-- Create date: <17 Ene 2018>
-- Description: <insertar en chequesBCRA todas las altas resultantes del procesamiento de altas y bajas >
-- =============================================
@p_id_cheque_alta int,
@p_cuit_firmante varchar(11),
@p_cuit_relacionado varchar(11),
@p_fecha_levantamiento smalldatetime,
@p_fecha_pago smalldatetime,
@p_fecha_rechazo smalldatetime,
@p_id_causa smallint,
@p_importe money,
@p_nombre_file varchar(200),
@p_nro_cheque int
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
INSERT INTO ChequesBCRA
(cuit_firmante, cuit_relacionado, fecha_levantamiento, fecha_pago, fecha_rechazo, id_causa, importe, nombre_file, nro_cheque, visible, created)
values (@p_cuit_firmante, @p_cuit_relacionado, @p_fecha_levantamiento, @p_fecha_pago, @p_fecha_rechazo, @p_id_causa, @p_importe, @p_nombre_file, @p_nro_cheque, 1, GETDATE())
DELETE FROM chequesBCRA_procesamiento_altas where (id_cheque = @p_id_cheque_alta)
SELECT 'ok' as ok
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE() as error
END CATCH
END
GO
Depends On
2Used By
No items found