Use math::BigFloat and make the default report 'reg'.

This commit is contained in:
Bradley M. Kuhn 2011-10-12 17:27:25 -04:00
parent 52a5840f7c
commit ff4f0adea6

View file

@ -2,7 +2,7 @@
# trail-balance-report.plx -*- Perl -*-
#
# Script to generate a Trial Balance report for a ledger.
#
# Copyright (C) 2011, Bradley M. Kuhn
#
# This program gives you software freedom; you can copy, modify, convey,
@ -20,6 +20,8 @@
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor
# Boston, MA 02110-1301, USA.
use Math::BigFloat;
my $LEDGER_CMD = "/usr/bin/ledger";
my $ACCT_WIDTH = 70;
@ -37,7 +39,8 @@ if (@ARGV == 0) {
exit 1;
}
my(@ledgerOptions) = ('--wide-register-format', "%-.${ACCT_WIDTH}A %22.108t\n", '-w', '-s', @ARGV);
my(@ledgerOptions) = ('--wide-register-format', "%-.${ACCT_WIDTH}A %22.108t\n", '-w', '-s', @ARGV,
'reg');
open(LEDGER_NEGATIVE, "-|", $LEDGER_CMD, '-d', 'a<0', @ledgerOptions)