[freeside-commits] branch FREESIDE_4_BRANCH updated. b7fcb9f53c2f6170d1f403e38a9ee9f1fa6f723a

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


The branch, FREESIDE_4_BRANCH has been updated
       via  b7fcb9f53c2f6170d1f403e38a9ee9f1fa6f723a (commit)
      from  e1df3e5503eb0050b5c68fbd574f78a2f8ca62ff (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 b7fcb9f53c2f6170d1f403e38a9ee9f1fa6f723a
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Mar 26 13:18:41 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