gtARJournal
This function provides the information for the Journal header. This header must exist before other details can be added to it. The function returns a unique identifier that links the associated line items.
Each Accounts Receivable journal is uploaded to Greentree Desktop as a complete transaction set. The journal is either uploaded in its entirety or nothing of the document is loaded into Greentree Desktop.
The unique identifier returned by the function call is structured as ARJNL-nnn if nnn is a sequential number that is unique for the current Excel session. This number links the AR Journal detail function calls with the header call. This number is not updated to or passed to Greentree.
Company
The company code that the journal is to be created in.
Branch
The branch code that the journal belongs to.
Batch
The batch number the journal is to be posted in. A new batch is created if it does not exist.
BatchDesc
The description for the batch the journal is to be posted in.
Reference
The journal number. A journal with this number cannot already exist for the customer or an error is returned.
DocumentNo
The unique document number for the journal.
DocumentDate
The document date for the journal.
PostingDate
The posting date for the transaction. This determines the financial period the journal is to post to.
Customer
The Customer code for the transaction.
UseGLControl
This defaults to the AR Module Control option Use AR control account as default on journals.
If this parameter is selected, the customer's debtors control account (if specified) is the contra for the journal, and if this is not specified, then the General Ledger Module Control debtors control account is used.
If this parameter is set to False, then a GL Account must be specified in this function.
GLAccount
The general ledger account that this journal is to be posted to. This must be specified if UseGLControl is False.
GLAccSubcode
The subcode for the general ledger account, up to six characters.
Quantity
The quantity of the general ledger account, if applicable.
CurrencyRate (optional)
The exchange rate to use if the journal is from a foreign currency customer.
If Foreign Currency is in use and the rate is not specified the default system exchange rate is used.
CurrencyRateMultiply (optional)
Whether the customer's exchange rate is a multiply or divide rate. Valid codes are True or False. If not specified, defaults to True.
Narration
The journal header narration.
Returns
- Unique identifier
- Error - if an error is encountered
Errors Returned
- Must have a Company Identifier
- Must have a Branch Identifier
- Must have a Batch number
- Must have a AR Journal reference
- Must have a Document No
- Must have a Customer Number
- Must have a Document Date
- Must have a Posting Date
- A GL Account is required (if UseGLControl is False)
- The length of the subcode must be six characters or fewer
- Currency rate must be numeric value
- isCurrencyRateMultiply must be either True, False or Omitted
- The document date is invalid
- The posting date is invalid
- The branch is invalid
- This batch is not a journal batch
- The customer is invalid
- A journal with this reference already exists
- Invalid GL Account