X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fchange_history_common.html;h=2d2c4c0be8080edd7e63dde2db8f53984af6c97e;hp=34ce70b6cba2330f5b2c67c84c8119ad462b7d12;hb=834b24e3a5aeb9188635e710be7002af04f187c8;hpb=f3e0ac2b009c4edd5692cb587ff709dac2223ebe diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html index 34ce70b6c..2d2c4c0be 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,27 @@ my %h_table_labelsub = ( #'h_phone_device' ); +my $discounts = {}; +my $discount_descripsub = sub { + my($item) = @_; + $pkgpart{$item->pkgpart} ||= qsearchs({ + 'table' => 'part_pkg', + 'hashref' => {'pkgpart' => $item->pkgpart} + })->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')