Notifications
Clear all
Jan 21, 2024 10:21 am
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