X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fchange_history_common.html;h=dfcfcb9588e0df3d225a76c89f8865f5ec15a2e8;hb=1b3abef9815111c52b1370ba5168a592ae9cfcb0;hp=d941427820b2fa595261f025f2a31bbe1b171ced;hpb=aaa1a91c209ec3547b2c62dc59af935649a62b58;p=freeside.git
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index d94142782..dfcfcb958 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -3,6 +3,7 @@
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
+
User |
Date |
@@ -14,6 +15,7 @@
Action |
Description |
+
% foreach my $item ( @history ) {
% my $history_other = '';
@@ -46,10 +48,10 @@
-% my $otaker;
+% my $otaker = '';
% if ( $item->history_usernum ) {
% $access_user{ $item->history_usernum } ||=
-% qsearchs('access_user', { 'usernum' => $item->history_usernum });
+% FS::access_user->by_key( $item->history_usernum );
% $otaker = $access_user{ $item->history_usernum }->username
% if $access_user{ $item->history_usernum };
% }
@@ -83,7 +85,7 @@
|
% my $label = '';
-% if ( $item->table eq 'legacy_cust_bill' ) {
+% if ( $item->table eq 'legacy_cust_history' ) {
% $label = $item->item;
% } else {
% $label = $item->table;
@@ -100,8 +102,13 @@
|
-% if ( $item->table eq 'legacy_cust_bill' ) {
+% my $description = '';
+% if ( $item->table eq 'legacy_cust_history' ) {
<% $item->description |h %>
+% } elsif ( $item->table eq 'h_cust_tag' ) {
+% $description = &{ $h_table_descripsub{$item->table} }( $item, $tables{'cust_tag'} )
+% if $single_cust && $h_table_descripsub{$item->table};
+ <% $description %>
% } else {
<% join(', ',
map { my $value = ( $_ =~ /(^pay(info|cvv)|^ss|_password)$/ )
@@ -127,7 +134,7 @@
% if ( $single_cust && $h_table_descripsub{$item->table} ) {
<% &{ $h_table_descripsub{$item->table} }( $item ) %>
% }
-% }
+% }
|
@@ -148,8 +155,8 @@ die "access deined"
my %action = (
'insert' => 'Insert', #'Create',
- 'replace_old' => 'Change from',
- 'replace_new' => 'Change to',
+ 'replace_old' => "Change\xA0from",
+ 'replace_new' => "Change\xA0to",
'delete' => 'Remove',
);
@@ -195,6 +202,12 @@ my $svc_labelsub = sub {
$label. ': '. encode_entities($item->label($item->history_date)). '';
};
+my $tag_labelsub = sub {
+ my($item, $label) = @_;
+ my $part_tag = qsearchs('part_tag',{ tagnum => $item->tagnum });
+ $label. ': '. encode_entities($part_tag->tagname). '';
+};
+
my %h_table_labelsub = (
'h_cust_pkg' => $pkg_labelsub,
'h_svc_acct' => $svc_labelsub,
@@ -206,8 +219,15 @@ my %h_table_labelsub = (
'h_svc_external' => $svc_labelsub,
'h_svc_phone' => $svc_labelsub,
#'h_phone_device'
+ #'h_cust_tag' => $tag_labelsub,
);
+my $tag_descripsub = sub {
+ my($item, $label) = @_;
+ my $part_tag = qsearchs('part_tag',{ tagnum => $item->tagnum });
+ ''. encode_entities($part_tag->tagname). '';
+};
+
my $discounts = {};
my $discount_descripsub = sub {
my($item) = @_;
@@ -227,6 +247,7 @@ my $discount_descripsub = sub {
my %h_table_descripsub = (
'h_cust_pkg_discount' => $discount_descripsub,
+ 'h_cust_tag' => $tag_descripsub,
);
my $cust_pkg_date_format = '%b %o, %Y';