Skip to Content
0

SBO_SP_TransactionNotification Query

Feb 02 at 01:18 PM

69

avatar image

Hello Experts,

I need a SBO_SP_TransactionNotification query that will block users from adding sales orders with Qty less than the Instock value in the warehouse and also it should allow users to add items in a particular warehouse which does not have any stock.

The item is not an inventory item and it is an empty bottle item.

Please treat this as urgent and assist.

Regards

Justice

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Nagarajan K Feb 05 at 01:17 PM
0

Hi,

Try this,

if @object_type = '17' and (@TRANSACTION_TYPE = 'A' OR @TRANSACTION_TYPE = 'U')

begin

If exists

(SELECT T1.[DocEntry] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] INNER JOIN OITW T3 ON T2.[ItemCode] = T3.[ItemCode] where t1.docentry = @list_of_cols_val_tab_del and T1.[WhsCode] = T3.[WhsCode] AND T2.[InvntItem] = 'Y' and T1.[Quantity] > T3.[OnHand])

begin select @error = 1,

@error_message = 'Ordered Qty is more than instock qty'

end

end

Share
10 |10000 characters needed characters left characters exceeded
Nagarajan K Feb 03 at 02:59 AM
0

Hi,

"The item is not an inventory item and it is an empty bottle item."--> Confirm items are inventory item or non-inventory items.

If non-inventory items, how to check in-stock quantity?

Regards,

Nagarajan

Show 1 Share
10 |10000 characters needed characters left characters exceeded

non - inventory item.

0
Nagarajan K Feb 03 at 10:13 AM
0

It is not possible to maintain stock for non-inventory item

Share
10 |10000 characters needed characters left characters exceeded
Justice Lawer Doku Feb 05 at 07:29 AM
0

Nagarajan K ,

The customer makes a sales order picking inventory items and one non-inventory item. He wants a validation query that will only check the qty not been more than the instock of the inventory item without blocking the non-inventory item since its instock is always zero.

So I want a validation query that will ignore the non-inventory item and rather concentrate on the inventory item's qty > instock.

Regards

Justice

Share
10 |10000 characters needed characters left characters exceeded