ADDAPAY ​
Returns field from Pay table for a specific payment.
Reporting Area(s) ​
Registrations, Accounting
Required Parameters ​
- Search key field from Pay table (i.e. pysubid (default), pyrecnum, pyinvnum, pydate, pyacctfor)
- Field from Pay table to return (i.e. "pytypye", "pyuser")
Optional Parameters ​
- Logical .t. returns "* PYSUBID not found" if no payment exists, .f. returns a blank
- Character sort value - ONLY required if using search key field other than pysubid:
"receipt"=if searching by pyrecnum
"pydate"= if searching by pydate
"pyinvnum"= if searching by pyinvnum
"pyacctfor"= if searching by pyacctfor (deposit number)
"invoice"= if searching by pyinvnum and only want to return billing records
Example(s) ​
ADDAPAY(pysubid, "pydate") returns payment date for pay record
ADDAPAY(pysubid,"pydate",.t.) returns payment date if payment has been made, but returns "* PYSUBID not found" if no payment exists
ADDAPAY(pyrecnum, "pytype",.t.,"receipt") returns payment type for pay record using pyrecnum as search and sort key
Notes ​
*PYSUBID field is unique for each pay record, so this function will give you a data element for one payment record. Deleted payment records are automatically excluded.
Related Functions ​
ADDGRPAY
ADDPAY
COPAYDTL
GTPAID
ORGPAY
OTHPAYER
PAYTYPE
RCPTINFO
GRPGTPAID
GTCOPAID
GTINVPAID
NETPAY
PAYCOMB
PAYTOT
RCTTPAY
RGHASPAY
RGINVPD
WHOPAY