Hi,
I am working on an requirement.
we need to stop adding of outgoing/incoming payments when the cash payment is more than 20000.
i tried to solve this using notification procedures.
here is a sample code of mine
if (@object_type='46' and @transaction_type in ('A','U'))
BEGIN
--set @sum= (SELECT sum(T0.[CashSum]) FROM OVPM T0 WHERE T0.[DocDate] =(SELECT T0.[DocDate] FROM OVPM T0 WHERE T0.[DocNum]=@list_of_cols_val_tab_del) and T0.[CardCode] =(SELECT T0.[CardCode] FROM OVPM T0 WHERE T0.[DocNum]=@list_of_cols_val_tab_del))
--set @tot= (SELECT T0.[CashSum] FROM OVPM T0 WHERE T0.[DocNum]=@list_of_cols_val_tab_del)
if exists(SELECT [DocTotal] FROM [dbo].OVPM T0 WHERE T0.[DocTotal] > 100 and T0.[DocEntry]=@list_of_cols_val_tab_del)
begin
set @error = '-500'
set @error_message = 'Cash Payments should not exceed 20000, Payemnts Done for '
end
END
it is not working can u please help me to solve the problem.
Thanks,
Mahi