diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2011-11-01 12:41:15 -0400 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-11-26 13:54:43 -0500 |
commit | cf969fcbb4cf1cdf0b76124b44e549ca03e8590e (patch) | |
tree | 35f8d65efe850c59dc1a765ee80074cfdd4ce2f6 /contrib/non-profit-audit-reports | |
parent | 9051804fb17bde5d33394747ea38000f26318edd (diff) | |
download | fork-ledger-cf969fcbb4cf1cdf0b76124b44e549ca03e8590e.tar.gz fork-ledger-cf969fcbb4cf1cdf0b76124b44e549ca03e8590e.tar.bz2 fork-ledger-cf969fcbb4cf1cdf0b76124b44e549ca03e8590e.zip |
Formatting changes, and added total for restricted funds.
Diffstat (limited to 'contrib/non-profit-audit-reports')
-rwxr-xr-x | contrib/non-profit-audit-reports/fund-report.plx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/non-profit-audit-reports/fund-report.plx b/contrib/non-profit-audit-reports/fund-report.plx index 9d6a31b3..e690b13b 100755 --- a/contrib/non-profit-audit-reports/fund-report.plx +++ b/contrib/non-profit-audit-reports/fund-report.plx @@ -107,23 +107,26 @@ foreach my $type ('Income', 'Expenses') { } } -my $format = "%-${ACCT_WIDTH}.${ACCT_WIDTH}s \$%11.2f \$%11.2f\n"; -my($totDeb, $totCred) = ($ZERO, $ZERO); +my($totStart, $totEnd) = ($ZERO, $ZERO); foreach my $fund (sort keys %funds) { print "Fund: $fund\n"; - print " Balance as of $startDate: ", sprintf("\$%11.2f\n\n", $funds{$fund}{starting}); - print " Income during period: ", sprintf("\$%11.2f\n", $funds{$fund}{Income}); - print " Expenses during period: ", sprintf("\$%11.2f\n\n", $funds{$fund}{Expenses}); - print " Balance as of $endDate: ", sprintf("\$%11.2f\n", $funds{$fund}{ending}); + print " Balance as of $startDate: ", sprintf("\$%15.2f\n\n", $funds{$fund}{starting}); + print " Income during period: ", sprintf("\$%15.2f\n", $funds{$fund}{Income}); + print " Expenses during period: ", sprintf("\$%15.2f\n\n", $funds{$fund}{Expenses}); + print " Balance as of $endDate: ", sprintf("\$%15.2f\n", $funds{$fund}{ending}); print "\n\n"; # Santity check: - if ($funds{$fund}{ending} == - ($funds{$fund}{starting} + $funds{$fund}{Income} + $funds{$fund}{Expenses})) { + if ($funds{$fund}{ending} != + ( ($funds{$fund}{starting} - $funds{$fund}{Income}) - $funds{$fund}{Expenses})) { print "$fund FAILED SANITY CHECK\n\n\n"; die "$fund FAILED SANITY CHECK"; } + $totStart += $funds{$fund}{starting}; + $totEnd += $funds{$fund}{ending}; } +print "\n\n\nTotal Restricted Funds as of $startDate: ", sprintf("\$%15.2f\n", $totStart); +print "\nTotal Restricted Funds as of $endDate: ", sprintf("\$%15.2f\n", $totEnd); ############################################################################### # # Local variables: |