summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-01-31 17:20:56 -0800
committerMark Wells <mark@freeside.biz>2015-01-31 17:20:56 -0800
commit4770b1f7e1abf6ddc8d5b8093fe4d2c48345b386 (patch)
treef6e9f647f62d348695e40db9731cf4604aeb7550
parenta93e9be94c3a385e6b810457c0e06c889e6a6000 (diff)
include discount details in Billco spool, #31273, #32959
-rw-r--r--FS/FS/cust_bill.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index d2a6dedf2..888e88bb8 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -1902,13 +1902,18 @@ sub print_csv {
my $lineseq = 0;
foreach my $item ( $self->_items_pkg ) {
+ my $description = $item->{'description'};
+ if ( $item->{'_is_discount'} and exists($item->{ext_description}[0]) ) {
+ $description .= ': ' . $item->{ext_description}[0];
+ }
+
$csv->combine(
'', # 1 | N/A-Leave Empty CHAR 2
'', # 2 | N/A-Leave Empty CHAR 15
$tracctnum, # 3 | Account Number CHAR 15
$self->invnum, # 4 | Invoice Number CHAR 15
$lineseq++, # 5 | Line Sequence (sort order) NUM 6
- $item->{'description'}, # 6 | Transaction Detail CHAR 100
+ $description, # 6 | Transaction Detail CHAR 100
$item->{'amount'}, # 7 | Amount NUM* 9
'', # 8 | Line Format Control** CHAR 2
'', # 9 | Grouping Code CHAR 2