Merge pull request #22080 from atm-gauthier/fix_fk_expedition_missing_in_updateline
FIX : fk_expedition in $line can be usefull for triggers
This commit is contained in:
commit
c2772aab8b
@ -540,6 +540,7 @@ if (empty($reshook)) {
|
||||
$object->fetch($id);
|
||||
$lines = $object->lines;
|
||||
$line = new ExpeditionLigne($db);
|
||||
$line->fk_expedition = $object->id;
|
||||
|
||||
$num_prod = count($lines);
|
||||
for ($i = 0; $i < $num_prod; $i++) {
|
||||
@ -581,6 +582,7 @@ if (empty($reshook)) {
|
||||
for ($i = 0; $i < $num_prod; $i++) {
|
||||
if ($lines[$i]->id == $line_id) { // we have found line to update
|
||||
$line = new ExpeditionLigne($db);
|
||||
$line->fk_expedition = $object->id;
|
||||
|
||||
// Extrafields Lines
|
||||
$line->array_options = $extrafields->getOptionalsFromPost($object->table_element_line);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user