[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 28c3a49c00c1c142cfbaf685b189b3f6a88c73f5
Ivan
ivan at 420.am
Mon May 7 19:39:10 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 28c3a49c00c1c142cfbaf685b189b3f6a88c73f5 (commit)
from 01d9085c7db7c3c96c3a8ef9ebe049b4a3bbbb18 (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 28c3a49c00c1c142cfbaf685b189b3f6a88c73f5
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon May 7 19:39:10 2012 -0700
add display_svcnum & pkg_label to list_svcs selfservice API call, RT#17617
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index ac02fd6..88a5675 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -1603,12 +1603,14 @@ sub list_svcs {
my $part_pkg = $cust_pkg->part_pkg;
my %hash = (
- 'svcnum' => $_->svcnum,
- 'svcdb' => $svcdb,
- 'label' => $label,
- 'value' => $value,
- 'pkg_status' => $cust_pkg->status,
- 'readonly' => ( $part_svc->selfservice_access eq 'readonly' ),
+ 'svcnum' => $_->svcnum,
+ 'display_svcnum' => $_->display_svcnum,
+ 'svcdb' => $svcdb,
+ 'label' => $label,
+ 'value' => $value,
+ 'pkg_label' => $cust_pkg->pkg_label,
+ 'pkg_status' => $cust_pkg->status,
+ 'readonly' => ($part_svc->selfservice_access eq 'readonly'),
);
if ( $svcdb eq 'svc_acct' ) {
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm
index dacf41d..1ae46fb 100644
--- a/FS/FS/cust_svc.pm
+++ b/FS/FS/cust_svc.pm
@@ -322,6 +322,18 @@ sub check {
$self->SUPER::check;
}
+=item display_svcnum
+
+Returns the displayed service number for this service: agent_svcid if it has a
+value, svcnum otherwise
+
+=cut
+
+sub display_svcnum {
+ my $self = shift;
+ $self->agent_svcid || $self->svcnum;
+}
+
=item part_svc
Returns the definition for this service, as a FS::part_svc object (see
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 14 ++++++++------
FS/FS/cust_svc.pm | 12 ++++++++++++
2 files changed, 20 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list