Difference between revisions of "ACC - Access any Account (Reports & Settings Report Generator function)"

From Catalyst
Jump to: navigation, search
(Updated from revision control)
(New redirection changes)
(Tag: New redirect)
 
Line 1: Line 1:
__NOTOC__
+
#REDIRECT [[ACC - Access any account details (Reports & Settings Report Generator function)]]
== Syntax ==
 
'''$ACC'''{ledger, account, expression}
 
 
 
== Description ==
 
In general, changes the Account code being reported on.
 
 
 
 
 
== Parameters ==
 
;ledger
 
:A text parameter that can be omitted.
 
:Account ledger to use (see below).
 
:;S
 
::Sales Ledger (Customers).
 
:;P
 
::Purchase Ledger (Suppliers).
 
:;C
 
::Contacts ({{Menu|Unit Workshop}} and {{Menu|Unit Sales}} Systems only).
 
;account
 
:A text parameter that can be omitted.
 
:Account code to use (see below).
 
;expression
 
:A text or numeric parameter that can be omitted.
 
:Variable or formula to evaluate (see below).
 
 
 
== Returns ==
 
A text or numeric (depending on the parameters) value.
 
This function may be used in three ways.
 
 
 
;All parameters are supplied.
 
{{Example|text=
 
$GRA{"P",S86,A03}
 
}}
 
 
 
:The result of the given expression using the details of the account code supplied is returned. For the example above, (using the variable [[S86 - Stock Preferred Supplier (Stock Control Report Generator variable)|S86]], from the Stock system), the name of the account of the preferred supplier of the current stock line would be returned.
 
;No expression is supplied.
 
{{Example|text=
 
$GRA{"P",S86}
 
}}
 
 
 
:Changes the account being reported on; i.e. all "A" variables (and other variables which use the current account being reported on), in the remainder of the current block will use the details from the account supplied. If used in a Range screen then this will affect the whole report. If no expression is supplied, the actual result of the function will be numeric - {{DataValue|1}} if the account exists or {{DataValue|0}} if otherwise.
 
{{Example|text=
 
$GRA{"S",IF V67="" THEN V38 ELSE V67}
 
}}
 
 
 
:This would switch the account to the unit's keeper ([[V67 - Current keeper (Unit Sales Report Generator variable)|V67]]), or the unit's sale account ([[V38 - Sold to (Unit Sales Report Generator variable)|V38]]) if the keeper was spaces. This could be used in "Range Filter (2) - Detailed" of a mailshot, for instance, to set the destination account.
 
;No parameters are supplied.
 
{{Example|text=
 
$GRA{}
 
}}
 
 
 
:The function may be used in this way in a block after using the function as in method 2, to change the account being reported on back to the previous value.
 
 
 
[[Category:Reports & Settings Report Generator functions]]
 

Latest revision as of 05:50, 16 April 2020