summaryrefslogtreecommitdiff
path: root/httemplate/elements/change_history_common.html
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-02-05 19:05:00 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-02-05 19:05:00 -0600
commit3e425bd1b9854f4e3f2ef8c3c4eb0d2e3ca77ad0 (patch)
tree4ed74cafc68d511749f618f5807e391c4a1861cf /httemplate/elements/change_history_common.html
parent795a733714d398d4a3d427de1448b7daaf92399d (diff)
RT#28246: Add more details to Change History for Discounts
Diffstat (limited to 'httemplate/elements/change_history_common.html')
-rw-r--r--httemplate/elements/change_history_common.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index 34ce70b6c..9e32bef33 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -172,6 +172,18 @@ my $svc_labelsub = sub {
$label. ': <b>'. encode_entities($item->label($item->history_date)). '</b>';
};
+my $discounts = {};
+my $discount_labelsub = sub {
+ my($item, $label) = @_;
+ my $dnum = $item->discountnum;
+ $discounts->{$dnum} ||= qsearchs({
+ 'table'=>'discount',
+ 'hashref'=>{'discountnum'=>$dnum}
+ });
+ my $d = $discounts->{$dnum};
+ $label . ': <b>' . encode_entities($d->description_short) . '<b>';
+};
+
my %h_table_labelsub = (
'h_cust_pkg' => $pkg_labelsub,
'h_svc_acct' => $svc_labelsub,
@@ -183,6 +195,7 @@ my %h_table_labelsub = (
'h_svc_external' => $svc_labelsub,
'h_svc_phone' => $svc_labelsub,
#'h_phone_device'
+ 'h_cust_pkg_discount' => $discount_labelsub,
);
my $cust_pkg_date_format = '%b %o, %Y';