diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-11-23 09:53:05 -0500 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-11-26 13:54:46 -0500 |
commit | 13c8a1fb569ddd83a65645e40c7f0c83b3a725eb (patch) | |
tree | ab401684b32afc3e2ac59b2d4da09fe426c3cb78 /contrib | |
parent | 76292d08d92365a10964255a01a60ee1f6aa7448 (diff) | |
download | fork-ledger-13c8a1fb569ddd83a65645e40c7f0c83b3a725eb.tar.gz fork-ledger-13c8a1fb569ddd83a65645e40c7f0c83b3a725eb.tar.bz2 fork-ledger-13c8a1fb569ddd83a65645e40c7f0c83b3a725eb.zip |
Beginnings of income report.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/summary-reports.plx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/non-profit-audit-reports/summary-reports.plx b/contrib/non-profit-audit-reports/summary-reports.plx index b49e6bdd..9cb2aece 100755 --- a/contrib/non-profit-audit-reports/summary-reports.plx +++ b/contrib/non-profit-audit-reports/summary-reports.plx @@ -175,9 +175,26 @@ die "Total net assets doesn't equal sum of restricted and unrestricted ones!" abs($reportFields{'Unrestricted Net Assets'}{total} + $reportFields{'Temporarily Restricted Net Assets'}{total}) > $ONE_PENNY); + +my(@fullCommand) = ($LEDGER_BIN, @mainLedgerOptions, '-V', '-X', '$', + '-b', $startDate, '-e', $endDate, + '-F', '%-.80A %22.108t\n', '-s', + 'reg', '^Income'); + +open(FILE, "-|", @fullCommand) + or die "unable to run command ledger command: @fullCommand: $!"; + +open(INCOME, ">", "income.txt") + or die "unable to open balance-sheet.txt for writing: $!"; + +print INCOME " INCOME\n", + " Between $formattedStartDate and $formattedEndDate\n\n"; + +foreach my $line (<FILE>) { print INCOME $line; } +close INCOME; +die "unable to write to income.txt: $!" unless ($? == 0); ############################################################################### # # Local variables: # compile-command: "perl -c summary-reports.plx" # End: - |