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

This commit is contained in:
Maxime Kohlhaas 2014-06-28 17:17:37 +02:00
parent 2c493a4fe3
commit b7ee10a074
2 changed files with 3 additions and 1 deletions

View File

@ -590,6 +590,8 @@ class Expedition extends CommonObject
$cpt = $this->db->num_rows($resql);
for ($i = 0; $i < $cpt; $i++)
{
if($obj->qty <= 0) continue;
dol_syslog(get_class($this)."::valid movement index ".$i);
$obj = $this->db->fetch_object($resql);

View File

@ -163,7 +163,7 @@ if ($action == 'add')
{
$qty = "qtyl".$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;
$idl = "idl".$i;