summaryrefslogtreecommitdiff
path: root/httemplate/search/cust_bill_pkg_discount.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-10-16 15:32:32 -0700
committerMark Wells <mark@freeside.biz>2015-10-16 15:47:47 -0700
commitf641486e28214ad1eca18c47d2252701b83614f1 (patch)
treebc52ae1fedb9e088d5690940480bddd0ea5c8b6c /httemplate/search/cust_bill_pkg_discount.html
parentb6f16a22bd93ec66ffbb1da30e63f7e950b3b819 (diff)
separate setup and recur discounts, #14092
Diffstat (limited to 'httemplate/search/cust_bill_pkg_discount.html')
-rw-r--r--httemplate/search/cust_bill_pkg_discount.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/httemplate/search/cust_bill_pkg_discount.html b/httemplate/search/cust_bill_pkg_discount.html
index 6da5787a0..c63482827 100644
--- a/httemplate/search/cust_bill_pkg_discount.html
+++ b/httemplate/search/cust_bill_pkg_discount.html
@@ -20,9 +20,7 @@
sub { $_[0]->cust_pkg_discount->discount->description },
sub { $_[0]->cust_pkg_discount->discount->classname },
sub { sprintf($money_char.'%.2f', shift->amount ) },
- sub { my $m = shift->months;
- $m =~ /\./ ? sprintf('%.2f', $m) : $m;
- },
+ $months_sub,
'pkg',#sub { $_[0]->cust_bill_pkg->cust_pkg->part_pkg->pkg },
'invnum',
sub { time2str('%b %d %Y', shift->_date ) },
@@ -218,4 +216,11 @@ my $clink = [ "${p}view/cust_main.cgi?", 'custnum' ];
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
+my $months_sub = sub {
+ my $cust_bill_pkg_discount = shift;
+ return 'Setup'
+ if $cust_bill_pkg_discount->cust_pkg_discount->setuprecur eq 'setup';
+ sprintf('%.2f', $cust_bill_pkg_discount->months);
+};
+
</%init>