[freeside-commits] freeside/httemplate/view/cust_main change_history.html, 1.2, 1.3 packages.html, 1.77, 1.78

Ivan,,, ivan at wavetail.420.am
Mon Dec 13 22:33:31 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv25032/httemplate/view/cust_main

Modified Files:
	change_history.html packages.html 
Log Message:
show formatted dates on change history, per-user pref for full cust_pkg timestamps, RT#10757

Index: change_history.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/change_history.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- change_history.html	30 Jul 2009 07:39:17 -0000	1.2
+++ change_history.html	14 Dec 2010 06:33:29 -0000	1.3
@@ -94,6 +94,11 @@
            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>";
@@ -231,7 +236,7 @@
 #svc_*
 # svc_acct
 #  radius_usergroup
-#  acct_snarf?  is this even used?
+#  acct_snarf?  is this even used? it is now, for communigate RPOP
 # svc_domain
 #  domain_record
 #  registrar
@@ -266,6 +271,16 @@
 die "access deined"
   unless $curuser->access_right('View customer history');
 
+my $cust_pkg_date_format = '%b %o, %Y';
+$cust_pkg_date_format .= '%l:%M:%S%P'
+  if $conf->exists('cust_pkg-display_times')
+  || $curuser->option('cust_pkg-display_times');
+
+my %cust_pkg_date_fields = map { $_=>1 } qw(
+  start_date setup bill last_bill susp adjourn cancel expire contract_end
+  change_date
+);
+
 # find out the beginning of this customer history, if possible
 my $h_insert = qsearchs({
   'table'     => 'h_cust_main',

Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -w -d -r1.77 -r1.78
--- packages.html	7 Dec 2010 19:04:43 -0000	1.77
+++ packages.html	14 Dec 2010 06:33:29 -0000	1.78
@@ -156,8 +156,8 @@
 my $countrydefault = scalar($conf->config('countrydefault')) || 'US';
 my %conf_opt = (
   #for services.html and status.html
-  'cust_pkg-display_times'    => $conf->exists('cust_pkg-display_times'),
-
+  'cust_pkg-display_times'    => ($conf->exists('cust_pkg-display_times')
+                                 || $curuser->option('cust_pkg-display_times')), 
   #for status.html
   'cust_pkg-show_autosuspend' => $conf->exists('cust_pkg-show_autosuspend'),
   #for status.html pkg-balances



More information about the freeside-commits mailing list