[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 09cc60b2e20f084c3f0ad0b007f3b821fe64a265

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


The branch, FREESIDE_2_3_BRANCH has been updated
       via  09cc60b2e20f084c3f0ad0b007f3b821fe64a265 (commit)
      from  a52b5b3e54dca30f56fba7eb4905f6bc50171fcd (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 09cc60b2e20f084c3f0ad0b007f3b821fe64a265
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Dec 26 13:01:09 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 a75b81c..8cd7bce 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -392,7 +392,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;
@@ -607,7 +608,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