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
This commit is contained in:
cam.lafit 2017-05-18 10:28:48 +02:00
parent 94ca528860
commit 545e41b858

View File

@ -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;