Fixed formatting and added sanity check code.

This commit is contained in:
Bradley M. Kuhn 2011-11-01 12:28:01 -04:00
parent 7279413a22
commit 3485f0b847

View file

@ -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";
}
}
###############################################################################
#