diff options
author | ivan <ivan> | 2011-09-14 20:48:26 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-09-14 20:48:26 +0000 |
commit | 7148008fce25735a2e736efbff706036391f1de0 (patch) | |
tree | 8c715447a3b082520aea509c86f0f14b7cff7316 | |
parent | 5a4f8e8d72812c35e986f91cea22aa6496d11168 (diff) |
add svc_label to ClientAPI customer_info, RT#13656
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 4994a395c..76f204a0f 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -20,6 +20,7 @@ use FS::Msgcat qw(gettext); use FS::Misc qw(card_types); use FS::Misc::DateTime qw(parse_datetime); use FS::ClientAPI_SessionCache; +use FS::cust_svc; use FS::svc_acct; use FS::svc_domain; use FS::svc_phone; @@ -391,6 +392,11 @@ sub customer_info { $return{discount_terms_hash} = { $cust_main->discount_terms_hash }; } + if ( $session->{'svcnum'} ) { + my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $session->{'svcnum'} }); + $return{'svc_label'} = ($cust_svc->label)[1] if $cust_svc; + } + } elsif ( $session->{'svcnum'} ) { #no customer record my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $session->{'svcnum'} } ) |