diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-07-14 15:09:52 -0400 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-07-14 15:09:52 -0400 |
commit | 9dc352ad6f8c29ad90db20832f3efae9b75a8aa6 (patch) | |
tree | d4b262e4f6f87412c5aee9f4738661647d5ff021 /contrib/non-profit-audit-reports | |
parent | ce1c3e874791326c55eec4401d97ffa72c58a5c6 (diff) | |
download | fork-ledger-9dc352ad6f8c29ad90db20832f3efae9b75a8aa6.tar.gz fork-ledger-9dc352ad6f8c29ad90db20832f3efae9b75a8aa6.tar.bz2 fork-ledger-9dc352ad6f8c29ad90db20832f3efae9b75a8aa6.zip |
Some of the totals rounded via -V cause rounding more than one penny.
Use two cents as to test if the amounts are close enough.
Diffstat (limited to 'contrib/non-profit-audit-reports')
-rwxr-xr-x | contrib/non-profit-audit-reports/summary-reports.plx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/non-profit-audit-reports/summary-reports.plx b/contrib/non-profit-audit-reports/summary-reports.plx index 1730208a..ddc97737 100755 --- a/contrib/non-profit-audit-reports/summary-reports.plx +++ b/contrib/non-profit-audit-reports/summary-reports.plx @@ -202,12 +202,12 @@ die "Cash+accounts receivable total does not equal net assets and liabilities to $reportFields{'Unearned Income, Other'}{total} + $reportFields{'Liabilities, Credit Cards'}{total} + $reportFields{'Liabilities, Other'}{total} + - $reportFields{'Total Net Assets'}{total}) > $ONE_PENNY); + $reportFields{'Total Net Assets'}{total}) > $TWO_CENTS); die "Total net assets doesn't equal sum of restricted and unrestricted ones!" if (abs($reportFields{'Total Net Assets'}{total}) - abs($reportFields{'Unrestricted Net Assets'}{total} + - $reportFields{'Temporarily Restricted Net Assets'}{total}) > $ONE_PENNY); + $reportFields{'Temporarily Restricted Net Assets'}{total}) > $TWO_CENTS); my %incomeGroups = ('INTEREST INCOME' => { args => ['/^Income.*Interest/' ] }, @@ -280,7 +280,7 @@ print INCOME "\n\n\n", sprintf($formatStrTotal, "OVERALL TOTAL:", Commify($overa close INCOME; die "unable to write to income.csv: $!" unless ($? == 0); die "calculated total of $overallTotal does equal $incomeGroups{TOTAL}{total}" - if (abs($overallTotal) - abs($incomeGroups{TOTAL}{total}) > $ONE_PENNY); + if (abs($overallTotal) - abs($incomeGroups{TOTAL}{total}) > $TWO_CENTS); print STDERR "\n"; @@ -380,7 +380,7 @@ die "GROUPS NOT INCLUDED : ", join(keys(%verifyAllGroups), ", "), "\n" unless (keys %verifyAllGroups == 0); die "calculated total of $overallTotal does *not* equal $firstTotal" - if (abs($overallTotal) - abs($firstTotal) > $ONE_PENNY); + if (abs($overallTotal) - abs($firstTotal) > $TWO_CENTS); print STDERR "\n"; |