X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fchange_history_common.html;h=9fc85aa53fac074f16a0c3c4bc7c375a09b15052;hb=769b080fc81e1858a71de16936a7d0796fdaac7a;hp=34ce70b6cba2330f5b2c67c84c8119ad462b7d12;hpb=54a357b171aa44f9399b4c146acd2afd3b686075;p=freeside.git diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html index 34ce70b6c..9fc85aa53 100644 --- a/httemplate/elements/change_history_common.html +++ b/httemplate/elements/change_history_common.html @@ -106,6 +106,9 @@ $item->fields ) %> +% if ( $single_cust && $h_table_descripsub{$item->table} ) { + <% &{ $h_table_descripsub{$item->table} }( $item ) %> +% } @@ -185,6 +188,24 @@ my %h_table_labelsub = ( #'h_phone_device' ); +my $discounts = {}; +my $discount_descripsub = sub { + my($item) = @_; + $pkgpart{$item->pkgpart} ||= $item->part_pkg->pkg; + my $dnum = $item->discountnum; + $discounts->{$dnum} ||= qsearchs({ + 'table'=>'discount', + 'hashref'=>{'discountnum'=>$dnum} + }); + my $d = $discounts->{$dnum}; + '(' . encode_entities($d->description_short) . '' + . ' on ' . encode_entities($pkgpart{$item->pkgpart}) . ')'; +}; + +my %h_table_descripsub = ( + 'h_cust_pkg_discount' => $discount_descripsub, +); + my $cust_pkg_date_format = '%b %o, %Y'; $cust_pkg_date_format .= ' %l:%M:%S%P' if $conf->exists('cust_pkg-display_times')