MYOB Greentree

HideShow

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

 

gtGLTCodeBudBal


This function call returns General Ledger Budget information for Transaction Trees in a similar fashion to gtGLTCodeActBal.

Company

The company identifier that the account belongs to. Companies with the same currency can be combined by separating them by a comma and space. for example, '01, 09. This adds company 01 and 09's budget values together.

AccOrTree

The account number or name of the tree that the period information is to be searched for. The account number may include wildcards — for example, *.*.*.1010 will accumulate everything for all accounts with a 4th segment of 1010.

TCodes

The transaction tree branch code, or series of codes separated by a comma, the information is to be retrieved for. These may be entered into the formula or referenced to cells. If the transaction tree branch codes are listed over several cells, these my be referenced by the cells, concatenated by the & symbol, separated by comma enclosed in quotes. For example, if the tree branches are held in cells C4, C5, C6 the TCodes parameter to reference all these cells would be: C4&,&C5&,&C6.

Note: You cannot report on more than one branch within a single tree. You can report on multiple branches across different trees. A valid MDA combination must exist for the selected tree range.

Budget

The budget number to be queried.

FromYear

The Year the information is to be found from.

FromPeriod

The Period the summary information is to be found from.

ToYear

If not defined, the ToYear defaults to the same as the FromYear. If defined, period information is accumulated between the FromYear and the ToYear.

ToPeriod

If not defined, and ToYear is also not defined, the ToPeriod defaults to the same as the FromPeriod. If not defined and ToYear is defined, the ToPeriod defaults to the same as FromPeriod less one period. If defined, period information is accumulated between the FromPeriod to the ToPeriod.

If this parameter is set to 0 then the result returned includes only the account's opening balance for the financial year. This parameter defaults to 0 if the FromPeriod is 0 and this parameter is omitted from the call. So an easy way of getting just the opening balance for the account is to make the call with only the financial ToYear parameter defined, and the FromPeriod set to 0.

TransType

This is a code that determines what information is returned. Valid codes are:

  • A - all financial information is totalled and returned
  • Q - all unit or quantity information is totalled and returned

If this is left unspecified, the default is A.

CreditAccount

If True, indicates the account is normally a credit account (for example, revenue accounts) and returns credit balances as a positive number. Defaults to False.

TreeBranch.

If a TCode is entered, you can restrict the report to a single tree branch code by entering the tree branch here.

ForeignCurrency

If True, returns the balance in the account's foreign currency. If this is left unspecified the default is false, which means the accounts local currency balance is retrieved.

BudgetValue.

This determines whether or not the reporting budget or entered budget is returned. The default is False which returns the Reporting Budget. See Budget Maintenance (Reporting Budgets) for details of how the budgets are calculated.

Returns

  • The general ledger account Tcode balance for the specified period/s
  • Error - if an error is encountered

Example

=gtGLTcodeBudBal(01,MAS.AK.SLS.1010,AKL,01,2002,01)

Errors Returned

  • Must have a Company identifier
  • Must have an Account identifier
  • Must have Transaction Code identifier
  • Must have a Budget identifier
  • Must have a From Year
  • Must have a From Period
  • From Year relative reference not allowed
  • From Period relative reference not allowed
  • To Period relative reference not allowed
  • TransType can only be A or Q
  • CreditAccount must be True, False or omitted (defaults False)
  • FromYear does not exist
  • FromPeriod does not exist
  • ToYear does not exist
  • ToPeriod does not exist
  • ToYear is before FromYear
  • ToPeriod is before FromPeriod
  • Relative reference is not numeric
  • This budget could not be found
  • These companies do not have the same base currency