[freeside-commits] branch FREESIDE_4_BRANCH updated. cdfd37030a6577cc3631313541f87b7ec86c6155

Christopher Burger burgerc at 420.am
Thu Jun 15 07:20:34 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  cdfd37030a6577cc3631313541f87b7ec86c6155 (commit)
      from  df4a504190ec8c5b6f008441eb191407bdb1a5df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cdfd37030a6577cc3631313541f87b7ec86c6155
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Fri Jun 2 09:08:36 2017 -0400

    RT# 74122 - updated change history to not show data with out a description

diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index dfcfcb9..5fba236 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -44,6 +44,40 @@
 %   } else {
 %     $bgcolor = $bgcolor1;
 %   }
+%
+%   ## Create Description and check to see it is not empty, no need to display a record with no description, so skip it.
+%   my $description = '';
+%   if ( $item->table eq 'legacy_cust_history' ) {
+%     $description = $item->description;
+%   } 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};
+%   } else {
+%     $description = join(', ',
+%             map  { my $value = ( $_ =~ /(^pay(info|cvv)|^ss|_password)$/ ) 
+%                                  ? 'N/A'
+%                                  : $item->get($_);
+%                    $value = time2str($cust_pkg_date_format, $value)
+%                     if $item->table eq 'h_cust_pkg'
+%                     && $cust_pkg_date_fields{$_}
+%                     && $value;
+%
+%                    $value = substr($value, 0, 77).'...' if length($value) > 80;
+%                    $value = encode_entities($value);
+%                    "<I>$_</I>:<B>$value</B>";
+%                  }
+%             grep { $history_other
+%                      ? ( $item->get($_) ne $history_other->get($_) )
+%                      : ( $item->get($_) =~ /\S/ )
+%                  }
+%             grep { ! /^(history|custnum$)/i }
+%                  $item->fields
+%     );
+%     if ( $single_cust && $h_table_descripsub{$item->table} ) {
+%        $description = &{ $h_table_descripsub{$item->table} }( $item );
+%     }
+%   } #else 
+%  if (!$description) { next; }
 
   <TR>
 
@@ -102,39 +136,7 @@
     </TD>
 
     <TD ALIGN="left" CLASS="grid" BGCOLOR="<% $bgcolor %>">
-%     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)$/ ) 
-                                  ? 'N/A'
-                                  : $item->get($_);
-                    $value = time2str($cust_pkg_date_format, $value)
-                     if $item->table eq 'h_cust_pkg'
-                     && $cust_pkg_date_fields{$_}
-                     && $value;
-
-                    $value = substr($value, 0, 77).'...' if length($value) > 80;
-                    $value = encode_entities($value);
-                    "<I>$_</I>:<B>$value</B>";
-                  }
-             grep { $history_other
-                      ? ( $item->get($_) ne $history_other->get($_) )
-                      : ( $item->get($_) =~ /\S/ )
-                  }
-             grep { ! /^(history|custnum$)/i }
-                  $item->fields
-           )
-        %>
-%       if ( $single_cust && $h_table_descripsub{$item->table} ) {
-          <% &{ $h_table_descripsub{$item->table} }( $item ) %>
-%       }
-%     }  
+      <% $description %>
     </TD>
 
   </TR>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/change_history_common.html |   68 ++++++++++++------------
 1 file changed, 35 insertions(+), 33 deletions(-)




More information about the freeside-commits mailing list