diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-07-12 14:26:29 -0400 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-07-12 14:26:29 -0400 |
commit | 8908b032341eaa18c81c43a4792a84cdac05fe36 (patch) | |
tree | 9fc96cefea1c6c83697ddd0c5cc2b6272cce1eb9 /contrib | |
parent | 78e65ee4ab7f31eff707429c74b043819d016e1e (diff) | |
download | fork-ledger-8908b032341eaa18c81c43a4792a84cdac05fe36.tar.gz fork-ledger-8908b032341eaa18c81c43a4792a84cdac05fe36.tar.bz2 fork-ledger-8908b032341eaa18c81c43a4792a84cdac05fe36.zip |
Use "ledger accounts" command rather than the '-F "%150A\n" reg' report solution.
Ledger has had (probably for some time) an "accounts" command that will list
all the accounts from all transactions meeting the other criteria set on the
command line. That's really what we're looking for here when we build this
chart of accounts, and thus that should be used.
Note that this corrects a subtle bug that wasn't apparent with the old
solution. With the '-F "%150A\n" reg' solution, accounts that balanced out
to zero for period (e.g., accrual accounts that were emptied during in the
month) did not show up on the reports. This bug that I didn't know I had
here is thus now fixed by switching to the "accounts" report.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/non-profit-audit-reports/cash-receipts-and-disbursments-journals.plx | 3 | ||||
-rwxr-xr-x | contrib/non-profit-audit-reports/general-ledger-report.plx | 3 |
2 files changed, 2 insertions, 4 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 6234542c..937d2a45 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 @@ -67,8 +67,7 @@ if (@ARGV < 2) { my($beginDate, $endDate, @otherLedgerOpts) = @ARGV; -my(@chartOfAccountsOpts) = ('-V', '-F', "%150A\n", '-w', '-s', - '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg'); +my(@chartOfAccountsOpts) = ('-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'accounts'); open(CHART_DATA, "-|", $LEDGER_CMD, @chartOfAccountsOpts) or die "Unable to run $LEDGER_CMD @chartOfAccountsOpts: $!"; diff --git a/contrib/non-profit-audit-reports/general-ledger-report.plx b/contrib/non-profit-audit-reports/general-ledger-report.plx index 0d6b28e6..4a4f89cc 100755 --- a/contrib/non-profit-audit-reports/general-ledger-report.plx +++ b/contrib/non-profit-audit-reports/general-ledger-report.plx @@ -62,8 +62,7 @@ die "badly formatted end date, $beginDate" if $formattedBeginDate->parse($beginD $formattedBeginDate = $formattedBeginDate->printf("%Y/%m/%d"); -my(@chartOfAccountsOpts) = ('-V', '-F', "%150A\n", '-w', '-s', - '-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'reg'); +my(@chartOfAccountsOpts) = ('-b', $beginDate, '-e', $endDate, @otherLedgerOpts, 'accounts'); open(CHART_DATA, "-|", $LEDGER_CMD, @chartOfAccountsOpts) or die "Unable to run $LEDGER_CMD @chartOfAccountsOpts: $!"; |