|
AllocatePayment() 
Allocates an existing payment transaction to an
invoice or similar transaction within the accounting database.
Syntax
AllocatePayment(<nMode>, <cInvoiceNo>,
<cPaymentNo>, <nAmount>) --> lSuccess
Arguments
<nMode> --> The payment transaction
mode. This must be set to 1, which will generate a customer
payment. Other values are reserved for future use.
<cInvoiceNo> --> The invoice number (or
similar transaction) as a character string to allocate. Any
positive value transaction that is not also a payment may be
specified here.
<cPaymentNo> --> The payment audit
transaction number that is to be allocated as a character
string.
<nAmount> The payment amount to allocate as
a positive value. This value cannot exceed the balance left to
allocate of the specified payment.
The following tables must also be opened using
the
OpenTable()
function before calling AllocatePayment().
|
Table
Name
|
Description
|
|
CUSTREC
|
Customer master file.
|
|
INVOICE
|
Customer transaction file.
|
Returns
A value of TRUE is returned if the payment
transaction was successfully allocated within the database.
Otherwise a value of FALSE is returned.
A value of FALSE will be returned if the records
involved in the allocation process cannot be locked.
Description
This function allocates a payment and a specified
amount of that payment, to an invoice or similar transaction within
the database. For example, you may use this function to allocate
$500 of a particular payment transaction to a particular
invoice.
Comments
If a payment and invoice are allocated, any
previous record locks on those transactions will be released after
calling this function.
Example
AllocatePayment(1,
"12000", "P3000", 100)
____________________________
Related Topics
AddPayment()
Unpaid()
Business
Function List
|