[freeside-commits] branch FREESIDE_3_BRANCH updated. 36b4c4911bb63592edf8d5189f6d0af1d8da2b39

Ivan ivan at 420.am
Thu Jun 4 11:23:25 PDT 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  36b4c4911bb63592edf8d5189f6d0af1d8da2b39 (commit)
      from  be50cb8c900bfc20c873996a9ab6c48009de0204 (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 36b4c4911bb63592edf8d5189f6d0af1d8da2b39
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jun 4 11:23:21 2015 -0700

    don't display a non-sensical duration for open sessions, RT#34966

diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
index 0388c2f..27afe12 100644
--- a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
+++ b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html
@@ -47,7 +47,9 @@
     $OUT .= '</TD><TD ALIGN="right">';
     $OUT .= Date::Format::time2str('%T%P %a %b %o %Y', $usage->{'acctstarttime'});
     $OUT .= '</TD><TD ALIGN="right">';
-    my $duration =  $usage->{'acctstoptime'} - $usage->{'acctstarttime'};
+    my $duration = ( $usage->{'acctstoptime'} && $usage->{'acctstarttime'} )
+                     ? ( $usage->{'acctstoptime'} - $usage->{'acctstarttime'} )
+                     : 0;
     $total += $duration;
     my $h = int($duration/3600);
     my $m = sprintf("%02d", int(($duration % 3600) / 60));

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

Summary of changes:
 fs_selfservice/FS-SelfService/cgi/view_usage_details.html |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list