Merge pull request #2161 from fappels/3.7

FIX: check for expedition batch lines
This commit is contained in:
Laurent Destailleur 2014-12-20 13:20:24 +01:00
commit b0ae8cfb9e

View File

@ -604,9 +604,11 @@ class Expedition extends CommonObject
if (! empty($conf->productbatch->enabled)) {
$details=ExpeditionLigneBatch::FetchAll($this->db,$obj->rowid);
foreach ($details as $dbatch) {
$result=$mouvS->livraison_batch($dbatch->fk_origin_stock,$dbatch->dluo_qty);
if ($result < 0) { $error++; $this->errors[]=$mouvS->$error; break 2; }
if (! empty($details)) {
foreach ($details as $dbatch) {
$result=$mouvS->livraison_batch($dbatch->fk_origin_stock,$dbatch->dluo_qty);
if ($result < 0) { $error++; $this->errors[]=$mouvS->$error; break 2; }
}
}
}
}