Various formatting changes for the general ledger output.
This commit is contained in:
parent
16c2a98eeb
commit
21ad06d8d1
1 changed files with 4 additions and 3 deletions
|
@ -95,7 +95,7 @@ open(GL_CSV_OUT, ">", "general-ledger.csv") or die "unable to write general-ledg
|
|||
foreach my $acct (@sortedAccounts) {
|
||||
print GL_TEXT_OUT "\n\nACCOUNT: $acct\nFROM: $beginDate TO $formattedEndDate\n\n";
|
||||
my @acctLedgerOpts = ('--wide-register-format',
|
||||
"%D %-.10C %-.80P %-.80N %18t %18T\n", '-w',
|
||||
"%D %-.10C %-.80P %-.80N %18t %18T\n", '-w', '--sort', 'd',
|
||||
'-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg', $acct);
|
||||
open(GL_TEXT_DATA, "-|", $LEDGER_CMD, @acctLedgerOpts)
|
||||
or die "Unable to run $LEDGER_CMD @acctLedgerOpts: $!";
|
||||
|
@ -105,9 +105,10 @@ foreach my $acct (@sortedAccounts) {
|
|||
}
|
||||
close(GL_TEXT_DATA); die "error reading ledger output for chart of accounts: $!" unless $? == 0;
|
||||
|
||||
print GL_CSV_OUT "ACCOUNT,$acct\nPERIOD START,$beginDate,PERIOD END,$formattedEndDate\n\n";
|
||||
print GL_CSV_OUT "\n\"ACCOUNT:\",\"$acct\"\n\"PERIOD START:\",\"$beginDate\"\n\"PERIOD END:\",\"$formattedEndDate\"\n";
|
||||
print GL_CSV_OUT '"DATE","CHECK NUM","NAME","MEMO","TRANSACTION AMT","RUNNING TOTAL"', "\n";
|
||||
@acctLedgerOpts = ('--wide-register-format',
|
||||
"%D,%-.10C,%-.100P,%-.200N,%18t,%18T\n", '-w',
|
||||
'"%D","%C","%P","%N","%t","%T"\n', '-w', '--sort', 'd',
|
||||
'-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg', $acct);
|
||||
open(GL_CSV_DATA, "-|", $LEDGER_CMD, @acctLedgerOpts)
|
||||
or die "Unable to run $LEDGER_CMD @acctLedgerOpts: $!";
|
||||
|
|
Loading…
Add table
Reference in a new issue