Skip to content

Commit

Permalink
Merge pull request #11030 from atm-florian/9.0
Browse files Browse the repository at this point in the history
fix #11023
  • Loading branch information
eldy committed Apr 19, 2019
2 parents 113c2dd + 83cf08f commit 83205e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions htdocs/comm/propal/card.php
Expand Up @@ -759,6 +759,7 @@

$qty = GETPOST('qty' . $predef);
$remise_percent = GETPOST('remise_percent' . $predef);
if (empty($remise_percent)) $remise_percent=0;

// Extrafields
$extrafieldsline = new ExtraFields($db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/sendings.lib.php
Expand Up @@ -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']);
Expand Down
Expand Up @@ -307,7 +307,7 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
$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;
Expand Down

0 comments on commit 83205e6

Please sign in to comment.