[freeside-commits] branch master updated. b7a163f65da97e7252c885fd7bdc3834c8597f33

Ivan ivan at 420.am
Wed Dec 26 13:01:09 PST 2012


The branch, master has been updated
       via  b7a163f65da97e7252c885fd7bdc3834c8597f33 (commit)
      from  b9fcddbb0539d7632c7e6660ef0d568277a63f49 (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 b7a163f65da97e7252c885fd7bdc3834c8597f33
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 26 13:01:07 2012 -0800

    fix next_bill_date_pretty substituion in self-service API when there isn't one, RT#20759

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 4477611..b02852b 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -391,7 +391,8 @@ sub customer_info {
       $return{balance} = $cust_main->balance;
       $return{next_bill_date} = $cust_main->next_bill_date;
       $return{next_bill_date_pretty} =
-        time2str('%m/%d/%Y', $return{next_bill_date} );
+        $return{next_bill_date} ? time2str('%m/%d/%Y', $return{next_bill_date} )
+                                : '(none)';
     }
 
     my @tickets = $cust_main->tickets;
@@ -621,7 +622,8 @@ sub billing_history {
   $return{balance} = $cust_main->balance;
   $return{next_bill_date} = $cust_main->next_bill_date;
   $return{next_bill_date_pretty} =
-    time2str('%m/%d/%Y', $return{next_bill_date} );
+    $return{next_bill_date} ? time2str('%m/%d/%Y', $return{next_bill_date} )
+                            : '(none)';
 
   my @history = ();
 

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

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list