diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-01-03 12:19:59 -0500 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-01-03 12:19:59 -0500 |
commit | d18e01a00f88ec7d073b88db464679a9aa9910a6 (patch) | |
tree | 667a203a6334f633758feb0bd768d3f83773b65f /contrib | |
parent | f01ddd4766741cd0dc09fd42cb7cc87f4dadbb20 (diff) | |
download | fork-ledger-d18e01a00f88ec7d073b88db464679a9aa9910a6.tar.gz fork-ledger-d18e01a00f88ec7d073b88db464679a9aa9910a6.tar.bz2 fork-ledger-d18e01a00f88ec7d073b88db464679a9aa9910a6.zip |
Changed balance sheet output from a TXT file to a CSV file.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/summary-reports.plx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/non-profit-audit-reports/summary-reports.plx b/contrib/non-profit-audit-reports/summary-reports.plx index 30b27505..da2dba9d 100755 --- a/contrib/non-profit-audit-reports/summary-reports.plx +++ b/contrib/non-profit-audit-reports/summary-reports.plx @@ -146,15 +146,15 @@ foreach my $item (keys %reportFields) { print STDERR "$item: $reportFields{$item}{total}\n" if $VERBOSE; } -open(BALANCE_SHEET, ">", "balance-sheet.txt") - or die "unable to open balance-sheet.txt for writing: $!"; +open(BALANCE_SHEET, ">", "balance-sheet.csv") + or die "unable to open balance-sheet.csv for writing: $!"; -print BALANCE_SHEET " BALANCE SHEET\n", - " Ending ", $formattedEndDate, "\n", - "\n\nASSETS\n\n"; +print BALANCE_SHEET "\"BALANCE SHEET\"\n", + "\"Ending\",\"", $formattedEndDate, "\"\n", + "\n\n\"ASSETS\"\n\n"; -my $formatStr = " %-42s \$%13s\n"; -my $formatStrTotal = "%-45s \$%13s\n"; +my $formatStr = "\"\",\"%-42s\",\"\$%13s\"\n"; +my $formatStrTotal = "\"\",\"%-45s\",\"\$%13s\"\n"; my $tot = $ZERO; foreach my $item ('Cash', 'Accounts Receivable', 'Loans Receivable') { next if $reportFields{$item}{total} == $ZERO; @@ -186,7 +186,7 @@ print BALANCE_SHEET "\n", sprintf($formatStr, "TOTAL NET ASSETS", Commify($totNe close BALANCE_SHEET; print STDERR "\n"; -die "unable to write to balance-sheet.txt: $!" unless ($? == 0); +die "unable to write to balance-sheet.csv: $!" unless ($? == 0); die "Cash+accounts receivable total does not equal net assets and liabilities total" if (abs( ($reportFields{'Cash'}{total} + $reportFields{'Accounts Receivable'}{total} |