The Telephone account is allocated to Products based on a ratio of Products Sales to Total Sales. The inverse of the allocated amount is posted to Allocations account.
Table 106. Example of Custom_Alloc Function
Account | Jan2014 | Feb2014 | Mar2014 |
---|---|---|---|
A#Telephone.C1#[None] | 100 | 300 | 400 |
A#Sales”.C1#Product1 | 1000 | 1000 | 1000 |
A#Sales.C1#Product2 | 1000 | 2000 | 3000 |
A#Sales.C1#TotalProducts | 2000 | 3000 | 4000 |
Custom_Alloc("A#Telephone","A#Telephone.C1#[None]", "A#Factor", A#Sales", "A#Sales.C1#TotalProducts", "A#ProductAllocations.C1#[None]") | N/A | N/A | N/A |
A#Factor.C1#Product1 | 0.50 | 0.33 | 0.25 |
A#Factor.C1#Product2 | 0.50 | 0.66 | 0.75 |
A#Telephone.C1#Product1 | 50 | 100 | 100 |
A#Telephone.C1#Product2 | 50 | 200 | 300 |
A#ProductAllocations.C1#[None] | -100 | -300 | -400 |
The result returned from the CUSTOM_ALLOC function is as follows:
HS.EXP "A#Factor = A#Sales / A#Sales.C1#TotalProducts" HS.EXP "A#Telephone = A#Telephone.C1#[None] * A#Factor" HS.EXP "A#Allocations.C1#[None] = (A#Telephone.C1#[None] * -1)"