[freeside-commits] branch FREESIDE_3_BRANCH updated. 2b8cc0f23f764bd53994ca3763b9c61756c96766
Ivan
ivan at 420.am
Wed Dec 21 18:26:06 PST 2016
The branch, FREESIDE_3_BRANCH has been updated
via 2b8cc0f23f764bd53994ca3763b9c61756c96766 (commit)
from 0fa98e9782d550147a68a00d7ee75079ad331666 (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 2b8cc0f23f764bd53994ca3763b9c61756c96766
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Dec 21 18:26:05 2016 -0800
Add mobile number to ticketing view, RT#73861
diff --git a/FS/FS/UI/Web/small_custview.pm b/FS/FS/UI/Web/small_custview.pm
index b48714c..7467b8b 100644
--- a/FS/FS/UI/Web/small_custview.pm
+++ b/FS/FS/UI/Web/small_custview.pm
@@ -138,16 +138,25 @@ sub small_custview {
if $cust_main->country && $cust_main->country ne $countrydefault;
$html .= '</TD></TR><TR><TD></TD><TD BGCOLOR="#ffffff">';
- if ( $cust_main->daytime && $cust_main->night ) {
- $html .= ( FS::Msgcat::_gettext('daytime') || 'Day' ).
- ' '. $cust_main->daytime.
- '<BR>'. ( FS::Msgcat::_gettext('night') || 'Night' ).
- ' '. $cust_main->night;
- } elsif ( $cust_main->daytime || $cust_main->night ) {
- $html .= $cust_main->daytime || $cust_main->night;
+
+ my $num_numbers = 0;
+ $num_numbers++ foreach grep $cust_main->$_(), qw( daytime night mobile );
+ if ( $num_numbers > 1 ) {
+ $html .= ucfirst( FS::Msgcat::_gettext('daytime') ).
+ ' '. $cust_main->daytime. '<BR>'
+ if $cust_main->daytime;
+ $html .= ucfirst( FS::Msgcat::_gettext('night') ).
+ ' '. $cust_main->night. '<BR>'
+ if $cust_main->night;
+ $html .= ucfirst( FS::Msgcat::_gettext('mobile') ).
+ ' '. $cust_main->mobile. '<BR>'
+ if $cust_main->night;
+ } elsif ( $num_numbers ) { # == 1 ) {
+ $html .= ( $cust_main->daytime || $cust_main->night || $cust_main->mobile ).
+ '<BR>';
}
if ( $cust_main->fax ) {
- $html .= '<BR>Fax '. $cust_main->fax;
+ $html .= 'Fax '. $cust_main->fax;
}
$html .= '</TD></TR></TABLE></TD>';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/UI/Web/small_custview.pm | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
More information about the freeside-commits
mailing list