FIX: check for expedition batch lines
check if expedition batch lines are available before foreach
This commit is contained in:
parent
c571013fc9
commit
747b2af06b
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user