diff options
| author | ivan <ivan> | 2011-09-14 20:48:25 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2011-09-14 20:48:25 +0000 | 
| commit | 530bce8f5fa3588d4cf54c5b469e20ff31ac5904 (patch) | |
| tree | ba592d2faa507c879d57d37b8785b287bc6eab14 | |
| parent | 36fcc94b5d0b9b75115e03244e23a99c8508ea47 (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 7db49d55e..6948fcec3 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; @@ -418,6 +419,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'} } )  | 
