DROP PROCEDURE Op_HistransFuelInsProc
GO
CREATE PROCEDURE Op_HistransFuelInsProc
(
	@CORRNBR        int
)
AS
BEGIN
    BEGIN TRAN

          INSERT INTO 	Op_Histransfuel(NUMERO,SOLES,PRODUCTO,PRECIO,GALONES,CARA,FECHA,HORA,ESTADO,DOCUMENTO,DATEPROCE)
          SELECT 	NUMERO,SOLES,PRODUCTO,PRECIO,GALONES,CARA,FECHA,HORA,ESTADO,DOCUMENTO,DATEPROCE
	  FROM 		Tmp_Op_HistransFuel
	  WHERE 	CORRNBR=@CORRNBR

    IF (@@error!=0)
    BEGIN
        RAISERROR  20000 'Error insertando en OP_HISTRANSFUEL'
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

END
