summaryrefslogtreecommitdiff
path: root/FS/FS/cust_bill.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-11-06 13:16:07 -0800
committerMark Wells <mark@freeside.biz>2012-11-06 13:16:07 -0800
commita5318b8239e3a35cbbeb5510b451f5ba5f622846 (patch)
tree2e5cea41ec73952ddc09b99e616755766d4288ec /FS/FS/cust_bill.pm
parent468c9e660eb0edb2033f0f8dbb4458f20280082c (diff)
oneline CSV format: add previous balance and due date, #19741
Diffstat (limited to 'FS/FS/cust_bill.pm')
-rw-r--r--FS/FS/cust_bill.pm5
1 files changed, 4 insertions, 1 deletions
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,
);