MYOB Greentree

HideShow

  • Contents
  • Index
  • Search
 
Display results with all search words

 

gtARJournalAddApply


This function supplies the information to add apply details to Accounts Receivable Journal headers. The AR Journal Reference parameter must be the unique ID returned by the gtARJournal function call.

Reference

This must be the unique identifier generated by the gtARJournal function call. It has the format ARJNL-nnn. This ensures the apply details are of the correct Journal header and it ensures Excel creates the header information before attempting to calculate and create the journal apply details.

TransType

This is the type of transaction that the journal is to be applied to. This must be one of these case-insensitive strings:

  • ARCreditNote (or AR Credit Note)
  • ARInvoice (or AR Invoice)
  • ARJournal (or AR Journal)
  • ARReceipt (or AR Receipt)
  • JCARCreditNote (or JC AR Credit Note)
  • JCARInvoice (or JC AR Invoice)

ApplyReference

The reference of the transaction that the journal is being applied to.

NetAmount

The amount being applied to the specified transaction. The total amount applied to the transaction is the sum of the discount, net and tax amounts entered.

When applying to an AR invoice, a JC AR invoice, or a positive AR journal, the amount must be negative.

When applying to an AR credit note, AR receipt, or a negative AR journal, the amount must be positive. You cannot apply a journal to more than the outstanding amount of the transaction. An error occurs if do this.

Narration

The narration for this journal line.

Returns

  • Ok - If there are no errors.
  • Error - If there is an error.

Errors Returned

  • Unknown AR journal reference must be ARJNL- —
  • Reference is required
  • TransType is required
  • Unknown transaction type
  • Invalid reference for the specified transaction type
  • Amount must be numeric
  • Amount must be negative for an invoice
  • Amount must be positive for a credit note or receipt
  • You can only journal between zero and the outstanding amount on this transaction