DROP PROCEDURE TMP_IN_PRICELEVELTEMDETUpdProc
GO
CREATE PROCEDURE TMP_IN_PRICELEVELTEMDETUpdProc
(
    @INVTIDSKU      UD_IDCORPORATIVO,
    @SEQUENCE       tinyint,
    @DISCMTO        UD_MONTO, 
    @NEWSLS_PRICE   UD_PRECIO,
    @CORRNBR	    INT
)
AS
BEGIN
    BEGIN TRAN

    	UPDATE 	TMP_IN_PRICELEVELTEMDET
       	SET 	SEQUENCE= @SEQUENCE,
		DISCMTO=@DISCMTO,
		NEWSLS_PRICE=@NEWSLS_PRICE
     	WHERE 	INVTIDSKU = @INVTIDSKU AND CORRNBR=@CORRNBR

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

    COMMIT TRAN

    RETURN(0)
END
