Skip to Content
0
Former Member
Aug 21, 2015 at 06:55 AM

Sp for avoid the negative inventory for Sale/Transfer/produce transcation

55 Views

Team

I have one warehouse used only for store the FG stock.

I want to black the usage of Negative inventory usage in this warehouse for Sale / Transfer / Production or for all transaction..

I request you to provide the suitable store procedure

Can we change in the following procedure

IF @object_type= '67' AND @transaction_type in ('A')

BEGIN

IF EXISTS (SELECT T0.DocEntry FROM [dbo].[WTR1] T0, [dbo].[OITW] T1, dbo.[OWTR] T2, dbo.[OWHS] T3 WHERE T3.WhsCode = T2.U_RecWshe and

T1.ItemCode = T0.ItemCode and T2.Filler = 'Y' and T1.OnHand <0 and T0.WhsCode = 'X' and T2.DocEntry = T0.DocEntry AND T2.DOCENTRY= @list_of_cols_val_tab_del)

BEGIN

SELECT @Error = 1, @error_message = 'Insufficient Stock'

END

END

Thanks

Anantha Desai