Skip to content
Snippets Groups Projects
Commit b7ee10a0 authored by Maxime Kohlhaas's avatar Maxime Kohlhaas
Browse files

New : can add all products in a shipment, even if qty is 0 with SHIPMENT_GETS_ALL_ORDER_PRODUCTS

parent 2c493a4f
No related branches found
No related tags found
No related merge requests found
...@@ -590,6 +590,8 @@ class Expedition extends CommonObject ...@@ -590,6 +590,8 @@ class Expedition extends CommonObject
$cpt = $this->db->num_rows($resql); $cpt = $this->db->num_rows($resql);
for ($i = 0; $i < $cpt; $i++) for ($i = 0; $i < $cpt; $i++)
{ {
if($obj->qty <= 0) continue;
dol_syslog(get_class($this)."::valid movement index ".$i); dol_syslog(get_class($this)."::valid movement index ".$i);
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
......
...@@ -163,7 +163,7 @@ if ($action == 'add') ...@@ -163,7 +163,7 @@ if ($action == 'add')
{ {
$qty = "qtyl".$i; $qty = "qtyl".$i;
if (! isset($batch_line[$i])) { if (! isset($batch_line[$i])) {
if (GETPOST($qty,'int') > 0) if (GETPOST($qty,'int') > 0 || (GETPOST($qty,'int') == 0 && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS))
{ {
$ent = "entl".$i; $ent = "entl".$i;
$idl = "idl".$i; $idl = "idl".$i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment