on 05-22-2013 11:45 AM
Hi Experts,
I have tried a SP for blocking the OINV when the Vatsum or Doctotal is negative due to AR Downpayment adjustment.
IF @transaction_type IN ('A', 'U') AND @object_type = '13'
BEGIN
If exists (SELECT T0.DocEntry FROM OINV T0
where (t0.VatSum < 0 or t0.DocTotal < 0)
and t0.docentry =@list_of_cols_val_tab_del)
Begin
SET @error = 123
SET @error_message = 'Tax or Doctotal is Negative'
End
END
Regards,
Dwarak
Hi,
What is your problem in above SP?
Working without any error.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dwarakanath P
Please check and the close the Thread with correct and helpful answers
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dwarak,
I suggest you to run a simple query first to see if you can get anything:
SELECT T0.DocEntry FROM OINV T0 where t0.VatSum < 0 or t0.DocTotal < 0
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this
IF @transaction_type IN ('A', 'U') AND @object_type = '13'
BEGIN
If exists (SELECT T0.DocEntry FROM OINV T0
where
t0.docentry =@list_of_cols_val_tab_del AND (t0.VatSum <= '0' or t0.DocTotal < ='0'))
Begin
SET @error = 123
SET @error_message = 'Tax or Doctotal is Negative'
End
END
Regards
Kennedy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.