Notifications
Clear all

Transaction Notification - GRPO cách chặn nếu ngưởi dùng nhập kho nhiều hơn số lượng trên Purchase Order

1 Posts
1 Users
0 Reactions
210 Views
admin
Posts: 444
Admin
Topic starter
(@admin)
Noble Member
Joined: 3 years ago
if @object_type = '20' and @transaction_type in ('A','U')
begin
	declare  @line int
	select @line = (LineNum + 1) 
	from PDN1 T1 inner join OPDN T2 on T1.Docentry = T2.DocEntry
	where T2.DocEntry = @list_of_cols_val_tab_del and T1.Quantity > T1.BaseOpnQty
	order by LineNum
	if (not ISNULL(@line, 0) = 0)
				begin
				  set @error = 2004
				  set @error_message = N'Quantity of line ' + CONVERT(nvarchar(4), @line) + N' exceed Purchase Order quantity!'
				end
			
end
Reply
Share:
x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security