From: Mark Wells Date: Tue, 6 Nov 2012 21:16:07 +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=a5318b8239e3a35cbbeb5510b451f5ba5f622846;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 4fd9b6e37..e4b2df4e8 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2029,7 +2029,7 @@ header line only, with the fields: Agent number, agent name, customer number, first name, last name, address line 1, address line 2, city, state, zip, invoice date, invoice number, -amount charged, amount due, +amount charged, amount due, previous balance, due date. and then, for each line item, three columns containing the package number, description, and amount. @@ -2115,6 +2115,7 @@ sub print_csv { } elsif ( $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} || ''), @@ -2139,6 +2140,8 @@ sub print_csv { $self->invnum, $self->charged, $totaldue, + $previous_balance, + $self->due_date2str("%x"), @items, );