Last active
August 29, 2015 14:06
-
-
Save webbyworks/d77c7af9b3384afcf3a8 to your computer and use it in GitHub Desktop.
Calculates the closing balance for each week. Uses the previous months' closing balance as the seed (otherwise circular reference errors are thrown?!).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( isBlank( ASSUM.CF.WeekNum ), 0, | |
if ( ASSUM.CF.WeekNum <= ASSUM.WksMonth, | |
if ( ASSUM.CF.WeekNum >= 2, | |
ACCT.CF.NetCashWeekly[Weeks=Week 1], 0 ) + | |
if ( ASSUM.CF.WeekNum >= 3, | |
ACCT.CF.NetCashWeekly[Weeks=Week 2] | |
, 0 ) + | |
if ( ASSUM.CF.WeekNum >= 4, | |
ACCT.CF.NetCashWeekly[Weeks=Week 3] | |
, 0 ) + | |
if ( ASSUM.CF.WeekNum = 5 and ASSUM.WksMonth = 5, | |
ACCT.CF.NetCashWeekly[Weeks=Week 4] | |
, 0 ) + | |
if ( isblank( ACCT.CF.OBal ), if ( ASSUM.WksMonth[time=this-1] = 5, ACCT.CF.CBalWeekly[time=this-1, Weeks=Week 5], ACCT.CF.CBalWeekly[time=this-1, Weeks=Week 4] ), ACCT.CF.OBal ) + ACCT.CF.NetCashWeekly | |
, | |
0 | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment