[freeside-commits] branch master updated. a2408d6aa3cce0e3673ae75d14414178c4c24987

Ivan ivan at 420.am
Sat Mar 26 13:18:41 PDT 2016


The branch, master has been updated
       via  a2408d6aa3cce0e3673ae75d14414178c4c24987 (commit)
      from  262b72cb1a8052daf7ae7246af15965f6ed78109 (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 a2408d6aa3cce0e3673ae75d14414178c4c24987
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Mar 26 13:18:40 2016 -0700

    webservice infrastructure, RT#33849

diff --git a/FS/FS/ClientAPI/Freeside.pm b/FS/FS/ClientAPI/Freeside.pm
index 4e25f02..90fa550 100644
--- a/FS/FS/ClientAPI/Freeside.pm
+++ b/FS/FS/ClientAPI/Freeside.pm
@@ -30,12 +30,12 @@ sub freesideinc_service {
   my($username, $_password) = ($1,$2);
 
   my $svc_external = qsearchs({
-    'table'     => 'svc_external',
+    'table'     => 'svc_acct',
     'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum )',
     'hashref'   => { 'username'  => $username,
                      '_password' => $_password,
                    },
-    'extra_sql' => " AND svcpart = $svcpart",
+    'extra_sql' => "AND svcpart = $svcpart",
   })
     or return { 'error' => 'bad support-key' };
 
@@ -43,8 +43,9 @@ sub freesideinc_service {
   # but for now, everybody can use everything
 
   #record it happened
+  my $custnum = $svc_external->cust_svc->cust_pkg->custnum;
   my $webservice_log = new FS::webservice_log {
-    'custnum'  => $svc_external->cust_svc->cust_pkg->custnum,
+    'custnum'  => $custnum,
     'svcnum'   => $svc_external->svcnum,
     'method'   => $packet->{'method'},
     'quantity' => $packet->{'quantity'} || 1,
@@ -52,8 +53,9 @@ sub freesideinc_service {
   my $error = $webservice_log->insert;
   return { 'error' => $error } if $error;
 
-  return { 'error' => '' };
-
+  return { 'error'   => '',
+           'custnum' => $custnum,
+         };
 }
 
 1;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/Freeside.pm |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list