commit
83205e6963
@ -759,6 +759,7 @@ if (empty($reshook))
|
||||
|
||||
$qty = GETPOST('qty' . $predef);
|
||||
$remise_percent = GETPOST('remise_percent' . $predef);
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
|
||||
// Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
|
||||
@ -51,7 +51,7 @@ function shipping_prepare_head($object)
|
||||
{
|
||||
// delivery link
|
||||
$object->fetchObjectLinked($object->id,$object->element);
|
||||
if (count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery
|
||||
if (is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery
|
||||
{
|
||||
// Take first one element of array
|
||||
$tmp = reset($object->linkedObjectsIds['delivery']);
|
||||
|
||||
@ -307,7 +307,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
$diff_array=array_diff_assoc($qtyordred,$qtyshipped);
|
||||
if (count($diff_array)==0) {
|
||||
//No diff => mean everythings is shipped
|
||||
$ret=$object->setStatut(Commande::STATUS_CLOSED, $object->origin_id, $object->origin);
|
||||
$ret=$object->setStatut(Commande::STATUS_CLOSED, $object->origin_id, $object->origin, 'ORDER_CLOSE');
|
||||
if ($ret<0) {
|
||||
$this->error=$object->error; $this->errors=$object->errors;
|
||||
return $ret;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user