Skip to content

Commit

Permalink
Change argument list CreateInvoiceFromOrder
Browse files Browse the repository at this point in the history
* invoice data are not mandatory
Only order information are required
  • Loading branch information
camlafit committed May 18, 2017
1 parent 545e41b commit 682f6f8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions htdocs/webservices/server_invoice.php
Expand Up @@ -254,7 +254,7 @@
$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,
Expand Down Expand Up @@ -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;

Expand All @@ -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.";
}

//////////////////////
Expand Down

0 comments on commit 682f6f8

Please sign in to comment.