mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
@@ -9899,14 +9899,16 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
// Force values to default values when known
|
||||
foreach ($this->fields as $key => $value) {
|
||||
// If fields are already set, do nothing
|
||||
if (array_key_exists($key, $fields)) {
|
||||
continue;
|
||||
}
|
||||
if (property_exists($this, 'fields')) {
|
||||
foreach ($this->fields as $key => $value) {
|
||||
// If fields are already set, do nothing
|
||||
if (array_key_exists($key, $fields)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($value['default'])) {
|
||||
$this->$key = $value['default'];
|
||||
if (!empty($value['default'])) {
|
||||
$this->$key = $value['default'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ if (empty($reshook)) {
|
||||
$entrepot_id = 0;
|
||||
}
|
||||
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOST($qty, 'int'), $array_options[$i]);
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOSTINT($qty), $array_options[$i]);
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
|
||||
Reference in New Issue
Block a user