DROP PROCEDURE TMP_OP_PRCLVLCUSTDETInsProc
GO
CREATE PROCEDURE TMP_OP_PRCLVLCUSTDETInsProc
(   @CORRNBR	    INT,
    @SITEID	    UD_IDSITE,
    @DISCMTO        UD_MONTO,
    @SLS_PRICE      UD_PRECIO,
    @SLS_PRICECUST  UD_PRECIO,
    @INVTIDSKU      UD_IDCORPORATIVO,
    @DESCR	    VARCHAR(40))
AS
BEGIN
    BEGIN TRAN

    INSERT INTO TMP_OP_PRCLVLCUSTDET(CORRNBR,SITEID,DISCMTO,SLS_PRICE,SLS_PRICECUST,INVTIDSKU,DESCR)
    VALUES(@CORRNBR,@SITEID,@DISCMTO,@SLS_PRICE,@SLS_PRICECUST,@INVTIDSKU,@DESCR)

    IF (@@error!=0)
    BEGIN
        ROLLBACK TRAN
        RETURN(1)
    
    END

    COMMIT TRAN

END
