'Custom Acumatica report variable not working consistently
in Acumatica, the out of the box GL report" lists gl beginning balance, debits, credit and ending balance by Account / Sub-Account. MY client is requesting that a new sub-total be added at the end of each account that totals for the account, i.e. if there are 3 sub-accounts on a single account, they are requesting the beginning balance, total debits, total credits and ending balance for the ACCOUNT.
I added a new Account group above the account/sub-account group and added variables for the beginning balance, debits and credits and ending balance.
the debit, credit and ending balance variables work perfectly, and SOMETIMES the beginning balance at the Account level is correct, but often the beginning balance variable is multiplied by the number of transactions at the account/sub-account level.
for instance, the beginning balance of account 10000-00-00 for 12-2021 is 9133.07, there are 3 pages of transactions and the beginning balance, debits, credits and ending balance in the Account group footer are correct, BUT for account 12080-00-00 the beginning balance is 1,063,150.46 and what is printing in the group footer for this account is 4,263,486.84 which is the actual beginning balance * 4 and there are 4 transactions in this account.
in the asset and liability section there are about 150 accounts, and this incorrect beginning balance shows up on only 4 accounts for period 11 and 12 of 2021. it does happen a LOT more on income statement accounts, and in other periods.
Because the variable DOES work sometimes but not others I THINK I have created the variable correctly, but I am not finding much support for variables.
Acumatica support was unable to help with this issue and suggested I post on Stack Overflow.
I have attached the logic for the variable itself as well as the variable I “copied”.
with the exception of the =$SignBal*, which if added to the $AcctBegBal always returns a 0 (if THAT is the issue I would expect the beginning balance to ALWAYS be incorrect)
$BegBalance variable logic - works at group footer AccountSubaccount
=$SignBal * Sum(IIF(Prev([GLHistoryByPeriod.BranchID]) <> [GLHistoryByPeriod.BranchID], IsNull(
IIF([HistoryLast.FinPeriodID] = [@StartPeriod],
IIF(@UseMasterCalendar = True, [HistoryLast.TranBegBalance], [HistoryLast.FinBegBalance]),
IIF(@UseMasterCalendar = True, [HistoryLast.TranYtdBalance], [HistoryLast.FinYtdBalance]))
, 0), 0))
$AcctBegBal variable logic (works sporatically at group footer Account )
=Sum(IIF(Prev([GLHistoryByPeriod.BranchID]) <> [GLHistoryByPeriod.BranchID], IsNull(
IIF([HistoryLast.FinPeriodID] = [@StartPeriod],
IIF(@UseMasterCalendar = True, [HistoryLast.TranBegBalance], [HistoryLast.FinBegBalance]),
IIF(@UseMasterCalendar = True, [HistoryLast.TranYtdBalance], [HistoryLast.FinYtdBalance]))
, 0), 0))
Thank you in advance for any help or guidance offered! Terrie
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|