Merge pull request #12671 from frederic34/patch-8
Update server_order.php
This commit is contained in:
commit
968c9ae874
@ -447,7 +447,7 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
|
|||||||
'date' => $order->date ?dol_print_date($order->date, 'dayrfc') : '',
|
'date' => $order->date ?dol_print_date($order->date, 'dayrfc') : '',
|
||||||
'date_creation' => $order->date_creation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
|
'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_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' => $order->remise,
|
||||||
'remise_percent' => $order->remise_percent,
|
'remise_percent' => $order->remise_percent,
|
||||||
@ -531,10 +531,10 @@ function getOrdersForThirdParty($authentication, $idthirdparty)
|
|||||||
{
|
{
|
||||||
$linesorders=array();
|
$linesorders=array();
|
||||||
|
|
||||||
$sql.='SELECT c.rowid as orderid';
|
$sql = 'SELECT c.rowid as orderid';
|
||||||
$sql.=' FROM '.MAIN_DB_PREFIX.'commande as c';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande as c';
|
||||||
$sql.=" WHERE c.entity = ".$conf->entity;
|
$sql .= " WHERE c.entity = ".$conf->entity;
|
||||||
if ($idthirdparty != 'all' ) $sql.=" AND c.fk_soc = ".$db->escape($idthirdparty);
|
if ($idthirdparty != 'all' ) $sql .= " AND c.fk_soc = ".$db->escape($idthirdparty);
|
||||||
|
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
@ -677,7 +677,8 @@ function createOrder($authentication, $order)
|
|||||||
|
|
||||||
// Init and check authentication
|
// Init and check authentication
|
||||||
$objectresp = array();
|
$objectresp = array();
|
||||||
$errorcode = ''; $errorlabel = '';
|
$errorcode = '';
|
||||||
|
$errorlabel = '';
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$fuser = check_authentication($authentication, $error, $errorcode, $errorlabel);
|
$fuser = check_authentication($authentication, $error, $errorcode, $errorlabel);
|
||||||
|
|
||||||
@ -820,7 +821,8 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
|||||||
|
|
||||||
// Init and check authentication
|
// Init and check authentication
|
||||||
$objectresp=array();
|
$objectresp=array();
|
||||||
$errorcode='';$errorlabel='';
|
$errorcode='';
|
||||||
|
$errorlabel='';
|
||||||
$error=0;
|
$error=0;
|
||||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||||
$fuser=check_authentication($authentication, $error, $errorcode, $errorlabel);
|
$fuser=check_authentication($authentication, $error, $errorcode, $errorlabel);
|
||||||
@ -851,7 +853,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
$error++;
|
$error++;
|
||||||
$errorcode = 'KO';
|
$errorcode = 'KO';
|
||||||
$errorlabel = $newobject->error;
|
$errorlabel = $order->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -859,7 +861,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
$error++;
|
$error++;
|
||||||
$errorcode = 'KO';
|
$errorcode = 'KO';
|
||||||
$errorlabel = $newobject->error;
|
$errorlabel = $order->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -867,7 +869,7 @@ function validOrder($authentication, $id = '', $id_warehouse = 0)
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
$error++;
|
$error++;
|
||||||
$errorcode = 'KO';
|
$errorcode = 'KO';
|
||||||
$errorlabel = $newobject->error;
|
$errorlabel = $order->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user