summaryrefslogtreecommitdiff
path: root/contrib/non-profit-audit-reports
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2013-01-21 16:28:14 -0500
committerBradley M. Kuhn <bkuhn@ebb.org>2013-02-18 14:08:46 -0500
commit86b20430423428f4ad371d98071679c9429f861b (patch)
tree79f3228f42b363627864be23ee427366668dc564 /contrib/non-profit-audit-reports
parentc0206418f730b0df45898dcf4280d9d96e801bb1 (diff)
downloadfork-ledger-86b20430423428f4ad371d98071679c9429f861b.tar.gz
fork-ledger-86b20430423428f4ad371d98071679c9429f861b.tar.bz2
fork-ledger-86b20430423428f4ad371d98071679c9429f861b.zip
Remove output of TXT files. CSV output is adequate.
Diffstat (limited to 'contrib/non-profit-audit-reports')
-rwxr-xr-xcontrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx13
1 files changed, 0 insertions, 13 deletions
diff --git a/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx b/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
index 2ad18a44..b620a75e 100755
--- a/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
+++ b/contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx
@@ -85,10 +85,8 @@ foreach my $acct (@accounts) {
{ name => 'receipts', query => 'a>0' }) {
my $fileNameBase = $acctFilename . '-' . $typeData->{name};
- open(TEXT_OUT, ">", "$fileNameBase.txt") or die "unable to open $fileNameBase.txt: $!";
open(CSV_OUT, ">", "$fileNameBase.csv") or die "unable to open $fileNameBase.csv: $!";
- print TEXT_OUT "\n\nACCOUNT: $acct\nFROM: $beginDate TO $formattedEndDate\n\n";
print CSV_OUT "\n\"ACCOUNT:\",\"$acct\"\n\"PERIOD START:\",\"$beginDate\"\n\"PERIOD END:\",\"$formattedEndDate\"\n";
print CSV_OUT '"DATE","CHECK NUM","NAME","ACCOUNT","AMOUNT"';
@@ -106,10 +104,6 @@ foreach my $acct (@accounts) {
goto SKIP_REGISTER_COMMANDS if (-z $tempFile);
- my @txtRegLedgerOpts = ('-f', $tempFile, '-V', '-F',
- "%(date) %-.70P %-.10C %-.80A %18t\n", '-w', '--sort', 'd',
- '-b', $beginDate, '-e', $endDate, 'reg');
-
my $formatString = '\n"%(date)","%C","%P","%A","%t"\n%/"","","","%A","%t"';
foreach my $tagField (qw/Receipt Invoice Statement Contract PurchaseOrder Approval Check IncomeDistributionAnalysis CurrencyRate/) {
print CSV_OUT ',"', $tagField, '"';
@@ -121,12 +115,6 @@ foreach my $acct (@accounts) {
'-b', $beginDate, '-e', $endDate, 'reg');
- open(TXT_DATA, "-|", $LEDGER_CMD, @txtRegLedgerOpts)
- or die "unable to run ledger command for $fileNameBase.txt: $!";
-
- while (my $line = <TXT_DATA>) { print TEXT_OUT $line; }
- close(TEXT_OUT); die "Error read write text out to $fileNameBase.txt: $!" unless $? == 0;
-
open(CSV_DATA, "-|", $LEDGER_CMD, @csvRegLedgerOpts)
or die "unable to run ledger command for $fileNameBase.csv: $!";
@@ -134,7 +122,6 @@ foreach my $acct (@accounts) {
close(CSV_DATA); die "Error read from csv ledger command $!" unless $? == 0;
SKIP_REGISTER_COMMANDS:
- close(TXT_DATA); die "Error read from txt ledger command $!" unless $? == 0;
close(CSV_OUT); die "Error read write csv out to $fileNameBase.csv: $!" unless $? == 0;
unlink($tempFile);
}