1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| Quintiq file version 2.0
| #parent: #root
| Method GetAccounts (
| String accountType_i,
| output owning Account_MPs allowedAccounts_o,
| output owning Strings allowedCostDrivers_o
| )
| {
| Description: 'Return Accounts under the account type'
| TextBody:
| [*
| // Check allowed cost driver then return the filtered accounts
| // Created this method as web app (create unit cost dialog) needs both accounts and cost drivers thus to avoid calling GetAllowedCostDrivers twice
|
| allowedCostDrivers_o := this.GetAllowedCostDrivers( accountType_i );
|
| allowedAccounts_o := selectset( this, Account_MP, account,
| exists( allowedCostDrivers_o, Elements, cd, cd = account.DefaultCostDriver() )
| );
| *]
| }
|
|