Monday, July 12, 2010

Vendor Pending Transactions

A quick function that will allow you to verify if a specific vendor has any pending transaction(s).

Function vendor_pnding_transactions();
&VENDOR = VENDOR_ID;
SQLExec("select 'X' from ps_voucher a, ps_pymnt_vchr_xref b where a.voucher_id = b.voucher_id and a.business_unit = b.business_unit and a.vendor_id = :1 and a.entry_status in ('P', 'R')and a.close_status = 'O' and b.pymnt_selct_status in ('N', 'D', 'R')", &VENDOR, &EXISTS);
If All(&EXISTS) Then
Error Messagebox(0,"",0,0,("Vendor has pending transaction(s).");
End-If;

No comments:

Post a Comment