From 545e41b85872c839fa7a0ef14e417a2576b1a118 Mon Sep 17 00:00:00 2001 From: "cam.lafit" Date: Thu, 18 May 2017 10:28:48 +0200 Subject: [PATCH] Fix : CreateInvoiceFromOrder result * We should be return same informations as other CreateInvoice function * Also invoice data can't be converted correctly by NuSoap, we can have some PHP error with invoice object --- htdocs/webservices/server_invoice.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index a085d38e74d..99202cd72e4 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -256,7 +256,7 @@ $server->register( // Entry values array('authentication'=>'tns:authentication','id_order'=>'xsd:string','ref_order'=>'xsd:string','ref_ext_order'=>'xsd:string','id_invoice'=>'xsd:string','ref_invoice'=>'xsd:string','ref_ext_invoice'=>'xsd:string'), // Exit values - array('result'=>'tns:result','invoice'=>'tns:invoice'), + array('result'=>'tns:result','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'), $ns, $ns.'#createInvoiceFromOrder', $styledoc, @@ -735,8 +735,7 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re } else { - $objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''),'invoice'=>$newobject); - + $objectresp= array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref,'ref_ext'=>$newobject->ref_ext); } return $objectresp;