diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-12-26 13:01:07 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-12-26 13:01:07 -0800 |
commit | b7a163f65da97e7252c885fd7bdc3834c8597f33 (patch) | |
tree | b2f3366186d45850c4d8fcc20ba52edb05d579e4 | |
parent | b9fcddbb0539d7632c7e6660ef0d568277a63f49 (diff) |
fix next_bill_date_pretty substituion in self-service API when there isn't one, RT#20759
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 4477611d0..b02852b59 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 = (); |