Skip to Content
0

Block Purchase Order

May 15, 2017 at 04:33 AM

74

avatar image

Hello,

I am looking for a SP to block purchase order if the vendor is not in preferred vendor in item master

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

2 Answers

Pedro Magueija May 15, 2017 at 06:14 AM
1

Hi Krishna,

You can use the SP_TransactionNotification to block your PO based on your criteria.

Pedro Magueija

LinkedIn | Twitter | Blog

Share
10 |10000 characters needed characters left characters exceeded
Nagarajan K May 15, 2017 at 12:30 PM
0

Hi,

Try this transaction notification:-

IF @transaction_type IN (N'A', N'U') AND (@object_type = '22')

BEGIN

IF EXISTS( SELECT T0.DocEntry FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN ITM2 T2 ON T1.itemcode = T2.Itemcode WHERE T0.DocEntry = @list_of_cols_val_tab_del AND T0.CardCode NOT IN ( SELECT c.vendorcode FROM itm2 c WHERE c.itemcode=t2.itemcode) )

BEGIN

SELECT @Error = 13

SELECT @error_message = 'SELECT Preferred vendor for creating PO'

END

END

Share
10 |10000 characters needed characters left characters exceeded