From: Mark Wells Date: Tue, 6 Nov 2012 21:24:13 +0000 (-0800) Subject: oneline CSV format: add previous balance and due date, #19741 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=4f188b96f282c21f027c936f18f5d6fb974cb497;p=freeside.git oneline CSV format: add previous balance and due date, #19741 --- diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 0823d480e..955d76773 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2027,6 +2027,7 @@ sub print_csv { } elsif ( lc($opt{'format'}) eq 'oneline' ) { #name? my ($previous_balance) = $self->previous; + $previous_balance = sprintf('%.2f', $previous_balance); my $totaldue = sprintf('%.2f', $self->owed + $previous_balance); my @items = map { ($_->{pkgnum} || ''), @@ -2051,6 +2052,8 @@ sub print_csv { $self->invnum, $self->charged, $totaldue, + $previous_balance, + $self->due_date2str("%x"), @items, );