summaryrefslogtreecommitdiff
path: root/contrib/non-profit-audit-reports/fund-report.plx
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2011-11-01 12:28:01 -0400
committerBradley M. Kuhn <bkuhn@ebb.org>2012-11-26 13:54:43 -0500
commit9051804fb17bde5d33394747ea38000f26318edd (patch)
treec88e77e27006718ccebc8a060606545ba6247039 /contrib/non-profit-audit-reports/fund-report.plx
parentdaad6e5700141bfbed6bb6a984ad99f76e7ac09d (diff)
downloadfork-ledger-9051804fb17bde5d33394747ea38000f26318edd.tar.gz
fork-ledger-9051804fb17bde5d33394747ea38000f26318edd.tar.bz2
fork-ledger-9051804fb17bde5d33394747ea38000f26318edd.zip
Fixed formatting and added sanity check code.
Diffstat (limited to 'contrib/non-profit-audit-reports/fund-report.plx')
-rwxr-xr-xcontrib/non-profit-audit-reports/fund-report.plx8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/non-profit-audit-reports/fund-report.plx b/contrib/non-profit-audit-reports/fund-report.plx
index 35463fe3..9d6a31b3 100755
--- a/contrib/non-profit-audit-reports/fund-report.plx
+++ b/contrib/non-profit-audit-reports/fund-report.plx
@@ -114,9 +114,15 @@ 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", $funds{$fund}{Expenses});
+ 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 "\n\n";
+ # Santity check:
+ 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";
+ }
}
###############################################################################
#