diff options
author | ivan <ivan> | 2010-07-27 06:51:44 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-27 06:51:44 +0000 |
commit | 2bbfc3379be19a01094d55ac6ba53a1360f1797f (patch) | |
tree | ebd884d0194fea8f8bae2d576026b5c2efd1eda6 | |
parent | 2b96da0344fe5f46caf80257890312de444d935b (diff) |
extend maestro status API for the multi-service scenario, RT#9334
-rw-r--r-- | httemplate/misc/maestro-customer_status.cgi | 4 | ||||
-rw-r--r-- | httemplate/misc/maestro-customer_status.html | 6 | ||||
-rwxr-xr-x | httemplate/view/cust_main/packages.html | 3 | ||||
-rw-r--r-- | httemplate/view/cust_main/packages/services.html | 5 |
4 files changed, 12 insertions, 6 deletions
diff --git a/httemplate/misc/maestro-customer_status.cgi b/httemplate/misc/maestro-customer_status.cgi index 8e82a02de..ffeb53c91 100644 --- a/httemplate/misc/maestro-customer_status.cgi +++ b/httemplate/misc/maestro-customer_status.cgi @@ -7,10 +7,10 @@ my($custnum, $svcnum) = $cgi->keywords; if ( $custnum =~ /^(\d+)$/ ) { use FS::Maestro; - $return = FS::Maestro::customer_status($1, $svcnum); + $uri->query_form( FS::Maestro::customer_status($1) ); } else { - $return = { 'error' => 'No custnum' }; + $uri->query_form( { 'error' => 'No custnum' } ); } </%init> diff --git a/httemplate/misc/maestro-customer_status.html b/httemplate/misc/maestro-customer_status.html index 0c45bcd4b..8acae2b2a 100644 --- a/httemplate/misc/maestro-customer_status.html +++ b/httemplate/misc/maestro-customer_status.html @@ -3,11 +3,11 @@ my $return; -my($query) = $cgi->keywords; -if ( $query =~ /^(\d+)$/ ) { +my($custnum, $svcnum) = $cgi->keywords; +if ( $custnum =~ /^(\d+)$/ ) { use FS::Maestro; - $return = FS::Maestro::customer_status($1); + $return = FS::Maestro::customer_status($1, $svcnum); } else { $return = { 'error' => 'No custnum' }; diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 3ac4861c3..811ac3c98 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -159,7 +159,8 @@ my %conf_opt = ( #for services.html 'svc_external-skip_manual' => $conf->exists('svc_external-skip_manual'), 'legacy_link' => $conf->exists('legacy_link'), - 'svc_broadband-manage_link' => $conf->config('svc_broadband-manage_link'), + 'svc_broadband-manage_link' => scalar($conf->config('svc_broadband-manage_link')), + 'maestro-status_test' => $conf->exists('maestro-status_test'), ); #subroutines diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index 0fe7931d8..6e30922c5 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -58,6 +58,11 @@ % if ( $curuser->access_right('Unprovision customer service') ) { <FONT SIZE="-2">( <%svc_unprovision_link($cust_svc)%> )</FONT> % } + +% if ( $part_svc->svcdb eq 'svc_pbx' && $opt{'maestro-status_test'} ){ + <FONT SIZE="-2">( <A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $cust_pkg->custnum.'+'.$cust_svc->svcnum %>">Test maestro status</A> )</FONT> +% } + </TD> </TR> % } |