TranAdd()
Enterprise Edition Only
Adds a transaction line to a transaction that has been defined using TranWrite().
Syntax
TranAdd([<cProductCode>], [<cDescription>], [<nQty>], [<nUnitSell>], [<nUnitCost>], [<nTaxCode>], [<cRef1>], [<cRef2>], [<cCarrier>], [<cZone>]) --> lResult
Arguments
<cProductCode> --> The product code.
<cDescription> --> The product description or a general description line.
<nQty> --> The quantity sold. This will default to zero if not supplied.
<nUnitSell> --> The unit sell price.
<nUnitCost> --> The unit cost price.
<nTaxCode> --> The tax code. This must be a number between 0-9999. Zero (0) indicates tax exempt or GST free. The other codes relate to your tax table entries.
<cRef1> --> An optional reference field.
<cRef2> --> The second optional reference field.
<cCarrier> --> Carrier code.
<cZone> --> Delivery zone.
You
must specify either a product description or a product code. Both cannot be left blank.
Returns
TRUE if the transaction line item was successfully added, otherwise FALSE.
Description
This function is used in conjunction with the Invoice Creation Hook to create transactions based on other transactions existing in the CAPITAL system. Refer to the topic: Issue Invoices found in the main CAPITAL help for more information on this subject.
This function must be called after TranWrite() to add line items to transactions. When you are finished adding line items the TranCreate() function is called to generate the transaction.
____________________________
Related Topics: