Change argument list CreateInvoiceFromOrder

* invoice data are not mandatory
Only order information are required
This commit is contained in:
cam.lafit 2017-05-18 10:36:37 +02:00
parent 545e41b858
commit 682f6f838e

View File

@ -254,7 +254,7 @@ $server->register(
$server->register(
'createInvoiceFromOrder',
// 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'),
array('authentication'=>'tns:authentication','id_order'=>'xsd:string','ref_order'=>'xsd:string','ref_ext_order'=>'xsd:string'),
// Exit values
array('result'=>'tns:result','id'=>'xsd:string','ref'=>'xsd:string','ref_ext'=>'xsd:string'),
$ns,
@ -653,13 +653,9 @@ function createInvoice($authentication,$invoice)
* @param string $id_order id of order to copy invoice from
* @param string $ref_order ref of order to copy invoice from
* @param string $ref_ext_order ref_ext of order to copy invoice from
* @param string $id_invoice invoice id
* @param string $ref_invoice invoice ref
* @param string $ref_ext_invoice invoice ref_ext
* @return array Array result
*/
function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='',
$id_invoice='', $ref_invoice='', $ref_ext_invoice='')
function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $ref_ext_order='')
{
global $db,$conf;
@ -680,8 +676,6 @@ function createInvoiceFromOrder($authentication,$id_order='', $ref_order='', $re
// Check parameters
if (empty($id_order) && empty($ref_order) && empty($ref_ext_order)) {
$error++; $errorcode='KO'; $errorlabel="order id or ref or ref_ext is mandatory.";
} else if (empty($id_invoice) && empty($ref_invoice) && empty($ref_ext_invoice)) {
$error++; $errorcode='KO'; $errorlabel="invoice id or ref or ref_ext is mandatory.";
}
//////////////////////