From 014e2c547f63bcd283eac4d0210a7976ca5fcb90 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 14 Nov 2014 15:13:12 -0800 Subject: show active discounts on invoices more cleanly, #31273 --- conf/invoice_html | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'conf/invoice_html') diff --git a/conf/invoice_html b/conf/invoice_html index 509bf950d..bd99899e0 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -161,23 +161,28 @@ ) } @detail_items ) { - $OUT .= - '{description_generator}}($line); } else { - $OUT .= ( ($line->{'ref'} && $line->{'ref'} ne $lastref) ? '' : '_more' ). - '">'. - ''. - ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. - ''. $line->{'description'}. ''. - ( $unitprices - ? ''. $line->{'unit_amount'}. ''. - ''. $line->{'quantity'}. '' - : '' - ). - - ''. $line->{'amount'}. ''; + my $class = 'invoice_desc_more'; + if ( $line->{'ref'} and $line->{'ref'} ne $lastref ) { + # then it's a new package (not a continuation) + $class = 'invoice_desc'; + } + $OUT .= ' + '; + if ( $line->{'ref'} ne $lastref ) { + $OUT .= $line->{'ref'}; + } + $OUT .= ' + '. $line->{'description'}. ''; + if ( $unitprices ) { + $OUT .= + ''. $line->{'unit_amount'}. ''. + ''. $line->{'quantity'}. ''; + } + $OUT .= ''. $line->{'amount'}. ''; } $OUT .= ''; $lastref = $line->{'ref'}; -- cgit v1.2.1