diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-09-07 12:48:30 -0400 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-09-07 12:48:30 -0400 |
commit | 0e8a0e8fb261660154183d4b551aaeab0298a89e (patch) | |
tree | 9be038019929bd290d38901833067fece14d6c31 /contrib | |
parent | 6a104ecc3e7816bf081ccdf569c1af535c770e68 (diff) | |
download | fork-ledger-0e8a0e8fb261660154183d4b551aaeab0298a89e.tar.gz fork-ledger-0e8a0e8fb261660154183d4b551aaeab0298a89e.tar.bz2 fork-ledger-0e8a0e8fb261660154183d4b551aaeab0298a89e.zip |
A few fixes to make this work with Ledger 3.x instead of 2.6.2
* --wide-register-format is no long an option, use -F
* %D now must be %(date)
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/general-ledger-report.plx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx index 97cf0174..739f5657 100755 --- a/contrib/non-profit-audit-reports/general-ledger-report.plx +++ b/contrib/non-profit-audit-reports/general-ledger-report.plx @@ -46,7 +46,7 @@ if (@ARGV < 2) { my($beginDate, $endDate, @otherLedgerOpts) = @ARGV; -my(@chartOfAccountsOpts) = ('--wide-register-format', "%150A\n", '-w', '-s', +my(@chartOfAccountsOpts) = ('-F', "%150A\n", '-w', '-s', '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg'); open(CHART_DATA, "-|", $LEDGER_CMD, @chartOfAccountsOpts) @@ -94,8 +94,8 @@ 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', '--sort', 'd', + my @acctLedgerOpts = ('-F', + "%(date) %-.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: $!"; @@ -107,8 +107,8 @@ foreach my $acct (@sortedAccounts) { 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","%C","%P","%N","%t","%T"\n', '-w', '--sort', 'd', + @acctLedgerOpts = ('-F', + '"%(date)","%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: $!"; |