Unpaid()


Returns the amount of a transaction that is unpaid or unallocated.

Syntax

Unpaid() --> nUnpaidAmount

Returns

Returns the amount of money owing on a transaction or if a payment or credit, the amount that has not been allocated against invoices.

Description

Returns the amount unpaid on a transaction or not fully allocated if it is a payment or credit. Only transactions held in either the invoice.dbf (customer transactions) database or accpay.dbf (supplier transactions) database can have an amount unpaid or unallocated. The form must therefore open either the invoice.dbf or accpay.dbf database. Ensure that Unpaid() is used in the specific body that opens invoice.dbf or accpay.dbf, otherwise 0 (zero dollars) will always be returned.

In the event that both invoice.dbf and accpay.dbf are opened by the same body at the same time, use the alias operator to refer to the one you need to query.

Example

If invoice->(Unpaid()) > 0

   Echo('Customer transaction not fully paid/allocated.')

Endif

If accpay->(Unpaid()) > 0

   Echo('Supplier transaction not fully paid/allocated.')

Endif

____________________________

Related Topics:

Business Function List

IsPayment()



CAPITAL VISUAL BUILDER