Update server_order.php

This commit is contained in:
Frédéric FRANCE 2019-12-09 23:56:46 +01:00 committed by GitHub
parent 67401d717a
commit 39da0bef9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -447,7 +447,7 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
'date' => $order->date ?dol_print_date($order->date, 'dayrfc') : '',
'date_creation' => $order->date_creation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
'date_validation' => $order->date_validation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
'date_modification' => $order->datem ?dol_print_date($order->datem, 'dayhourrfc') : '',
'date_modification' => $order->date_modification ?dol_print_date($order->date_modification, 'dayhourrfc') : '',
'remise' => $order->remise,
'remise_percent' => $order->remise_percent,
@ -531,10 +531,10 @@ function getOrdersForThirdParty($authentication, $idthirdparty)
{
$linesorders=array();
$sql.='SELECT c.rowid as orderid';
$sql.=' FROM '.MAIN_DB_PREFIX.'commande as c';
$sql.=" WHERE c.entity = ".$conf->entity;
if ($idthirdparty != 'all' ) $sql.=" AND c.fk_soc = ".$db->escape($idthirdparty);
$sql = 'SELECT c.rowid as orderid';
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c';
$sql .= " WHERE c.entity = ".$conf->entity;
if ($idthirdparty != 'all' ) $sql .= " AND c.fk_soc = ".$db->escape($idthirdparty);
$resql=$db->query($sql);
@ -677,7 +677,8 @@ function createOrder($authentication, $order)
// Init and check authentication
$objectresp = array();
$errorcode = ''; $errorlabel = '';
$errorcode = '';
$errorlabel = '';
$error = 0;
$fuser = check_authentication($authentication, $error, $errorcode, $errorlabel);
@ -820,7 +821,8 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
// Init and check authentication
$objectresp=array();
$errorcode='';$errorlabel='';
$errorcode='';
$errorlabel='';
$error=0;
if ($authentication['entity']) $conf->entity=$authentication['entity'];
$fuser=check_authentication($authentication, $error, $errorcode, $errorlabel);
@ -851,7 +853,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
$db->rollback();
$error++;
$errorcode = 'KO';
$errorlabel = $newobject->error;
$errorlabel = $order->error;
}
}
else
@ -859,7 +861,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
$db->rollback();
$error++;
$errorcode = 'KO';
$errorlabel = $newobject->error;
$errorlabel = $order->error;
}
}
else
@ -867,7 +869,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
$db->rollback();
$error++;
$errorcode = 'KO';
$errorlabel = $newobject->error;
$errorlabel = $order->error;
}
}