diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-02-19 15:34:47 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-02-19 15:34:47 -0600 |
commit | 834b24e3a5aeb9188635e710be7002af04f187c8 (patch) | |
tree | e7e42013dc77b2ac28ab145520de7a471a236a15 /httemplate/elements/change_history_common.html | |
parent | a70498f14ae5d3be7f57ce81fef703b869ccdf0a (diff) |
RT#28246: Add more details to Change History for Discounts [actually fixed the bug]
Diffstat (limited to 'httemplate/elements/change_history_common.html')
-rw-r--r-- | httemplate/elements/change_history_common.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html index c858ec123..2d2c4c0be 100644 --- a/httemplate/elements/change_history_common.html +++ b/httemplate/elements/change_history_common.html @@ -191,9 +191,10 @@ my %h_table_labelsub = ( my $discounts = {}; my $discount_descripsub = sub { my($item) = @_; - die "Could not find part_pkg for pkgpart " . $item->pkgpart - unless $item->part_pkg; - $pkgpart{$item->pkgpart} ||= $item->part_pkg->pkg; + $pkgpart{$item->pkgpart} ||= qsearchs({ + 'table' => 'part_pkg', + 'hashref' => {'pkgpart' => $item->pkgpart} + })->pkg; my $dnum = $item->discountnum; $discounts->{$dnum} ||= qsearchs({ 'table'=>'discount', |