Skip to Content
0
May 10, 2011 at 05:27 AM

Outgoing Payment Transaction notification...

167 Views

Hi all,

I designed the following Transaction notification for outgoing payment.It is working well If doctype is 'C' or 'S'. I want to do this for Doctype 'A'. But not successful....

Waiting for your replies..

IF @transaction_type = 'A' AND @object_type = '46' 
BEGIN
--If exists (SELECT T0.docentry  FROM OVPM T0 where t0.docentry = @list_of_cols_val_tab_del and T0.cashsum>=20000000)
--	begin
--		SET @error = 10
--		SET @error_message = N'You cannot Pay Cash More than Rs. 2000/-'
--	end
--
If not exists (SELECT T0.docentry  FROM OVPM T0  where t0.docentry = @list_of_cols_val_tab_del and 
(((t0.cardcode like '%%VDLI%%' or t0.cardcode like '%%CDLI%%' ) and t0.Series = '61' and (t0.doctype = 'S' or t0.doctype = 'C'   ))
or ((t0.cardcode like '%%VAHD%%' or t0.cardcode like '%%CAHD%%' ) and t0.Series = '64' and (t0.doctype = 'S' or t0.doctype = 'C'  ))
or ((t0.cardcode like '%%VMUM%%' or t0.cardcode like '%%CMUM%%' ) and t0.Series = '63' and (t0.doctype = 'S' or t0.doctype = 'C'  )) 
or ((t0.cardcode like '%%VLDH%%' or t0.cardcode like '%%CLDH%%' ) and t0.Series = '66' and (t0.doctype = 'S' or t0.doctype = 'C' ))
or ((t0.cardcode like '%%VKOL%%' or t0.cardcode like '%%CKOL%%' ) and t0.Series = '62' and (t0.doctype = 'S' or t0.doctype = 'C' ))
))
	begin
		SET @error = 11
		SET @error_message = N'BP Code,Location ,Series ,Tax code combination does not match'
	end


END
-----------------------------------------------------------------

Regards

Deepak tyagi