Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
490d372ab9
@ -594,6 +594,7 @@ if (empty($reshook)) {
|
||||
$num_prod = count($lines);
|
||||
for ($i = 0; $i < $num_prod; $i++) {
|
||||
if ($lines[$i]->id == $line_id) { // we have found line to update
|
||||
$update_done = false;
|
||||
$line = new ExpeditionLigne($db);
|
||||
$line->fk_expedition = $object->id;
|
||||
|
||||
@ -634,6 +635,8 @@ if (empty($reshook)) {
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
} else {
|
||||
setEventMessages($lotStock->error, $lotStock->errors, 'errors');
|
||||
@ -676,6 +679,8 @@ if (empty($reshook)) {
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
} else {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
@ -693,6 +698,8 @@ if (empty($reshook)) {
|
||||
if ($object->create_line_batch($line, $line->array_options) < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -730,6 +737,8 @@ if (empty($reshook)) {
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
}
|
||||
unset($_POST[$stockLocation]);
|
||||
@ -744,6 +753,8 @@ if (empty($reshook)) {
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
unset($_POST[$qty]);
|
||||
}
|
||||
@ -756,10 +767,17 @@ if (empty($reshook)) {
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
} else {
|
||||
$update_done=true;
|
||||
}
|
||||
unset($_POST[$qty]);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($update_done)) {
|
||||
$line->id = $lines[$i]->id;
|
||||
$line->insertExtraFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user