MYOB Greentree

HideShow

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

 

gtGLBudBal


This function call, in its simplest form, retrieves General Ledger Account Reporting Budget period balances in a similar fashion to gtGLActBal. It can also provide summarised balances using tree branch information or account searches.

Company

The company code, or codes, that the budget balances are to be retrieved from. Wildcards can be used instead to return accumulated values from all companies as long as they have the same calendars and base currencies, for example, *, or a string of company codes can be entered — for example, 01, 03.

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.

TreeBranch

The tree branch name. It is left empty (null) if an account is being referenced.

Budget

The budget number that balances are to be retrieved from.

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.

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.

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.

CreditAccount

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

Search

If it contains anything then this may be a string denoting filtering options — for example:

= MAS.AK.SLS.* or > MAS.AK.SLS.1010,< MAS.AK.SLS.2000.

The comma works as a logical and (OR's are not supported). Neither > nor < work with wildcards (*).

Note: When using the search function, you must put a space after the equal sign, regardless of whether using a wldcard or a valid segment.

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 reporting budget balance for the specified period(s)
  • Error - if an error is encountered

Examples

= gtGLBudBal(*,MAS.AK.SLS.1010,,01,2003,April)

= gtGLBudBal(01,Profit and Loss,Advertising,01,2003,August,2003,August,,,,*.AK.FTY.*)

Errors Returned

  • Must have a Company identifier
  • Invalid Company identifier
  • Must have an Account or Tree identifier
  • Account does not exist
  • Tree does not exist
  • Tree Branch does not exist
  • Must have a Budget number
  • Budget number does not exist
  • Must have a FromYear
  • FromYear does not exist
  • Must have a FromPeriod
  • 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