summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2012-11-21 14:00:58 -0500
committerBradley M. Kuhn <bkuhn@ebb.org>2012-11-26 13:54:43 -0500
commit5305642e4dafcd662c3c6842a383aaf4b27938d4 (patch)
treea488d6c58130bb5fd82a6fc6cd5a5c9d6c9a1bb6 /contrib
parentcf969fcbb4cf1cdf0b76124b44e549ca03e8590e (diff)
downloadfork-ledger-5305642e4dafcd662c3c6842a383aaf4b27938d4.tar.gz
fork-ledger-5305642e4dafcd662c3c6842a383aaf4b27938d4.tar.bz2
fork-ledger-5305642e4dafcd662c3c6842a383aaf4b27938d4.zip
Formatting adaptations for Ledger 3.
This includes addition of currency-forcing options such as -V and -X $, as well as corrections to the formatting string options for Ledger 3.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/non-profit-audit-reports/fund-report.plx12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/non-profit-audit-reports/fund-report.plx b/contrib/non-profit-audit-reports/fund-report.plx
index e690b13b..673263d7 100755
--- a/contrib/non-profit-audit-reports/fund-report.plx
+++ b/contrib/non-profit-audit-reports/fund-report.plx
@@ -25,7 +25,7 @@ use warnings;
use Math::BigFloat;
-my $LEDGER_CMD = "/usr/bin/ledger";
+my $LEDGER_CMD = "/usr/local/bin/ledger";
my $ACCT_WIDTH = 70;
@@ -45,8 +45,8 @@ my($startDate, $endDate, @mainLedgerOptions) = @ARGV;
# First, get fund list from ending balance
my(@ledgerOptions) = (@mainLedgerOptions,
- '--wide-register-format', "%-.70A %22.108t\n", '-w', '-s',
- '-e', $endDate, 'reg', '^Funds:Restricted:');
+ '-V', '-X', '$', '-F', "%-.70A %22.108t\n", '-s',
+ '-e', $endDate, 'reg', '/^Funds:Restricted:/');
my %funds;
@@ -55,7 +55,7 @@ open(LEDGER_FUNDS, "-|", $LEDGER_CMD, @ledgerOptions)
or die "Unable to run $LEDGER_CMD for funds: $!";
while (my $fundLine = <LEDGER_FUNDS>) {
- die "Unable to parse output line from funds command: $fundLine"
+ die "Unable to parse output line from funds command: \"$fundLine\""
unless $fundLine =~ /^\s*([^\$]+)\s+\$\s*\s*([\d\.\,]+)/;
my($account, $amount) = ($1, $2);
$amount = ParseNumber($amount);
@@ -66,7 +66,7 @@ close LEDGER_FUNDS;
# First, get fund list from ending balance
@ledgerOptions = (@mainLedgerOptions,
- '--wide-register-format', "%-.70A %22.108t\n", '-w', '-s',
+ '-V', '-X', '$', '-F', "%-.70A %22.108t\n", '-w', '-s',
'-e', $startDate, 'reg', '^Funds:Restricted:');
open(LEDGER_FUNDS, "-|", $LEDGER_CMD, @ledgerOptions)
@@ -88,7 +88,7 @@ foreach my $fund (keys %funds) {
}
@ledgerOptions = (@mainLedgerOptions,
- '--wide-register-format', "%-.70A %22.108t\n", '-w', '-s',
+ '-V', '-X', '$', '-F', "%-.70A %22.108t\n", '-w', '-s',
'-b', $startDate, '-e', $endDate, 'reg');
foreach my $type ('Income', 'Expenses') {