Moved update function after updatePrice
This commit is contained in:
parent
7f0d81d255
commit
9bc4b9f0bc
@ -179,12 +179,6 @@ if (empty($reshook))
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && $object->update($object->id, $user) < 1) {
|
|
||||||
$error++;
|
|
||||||
setEventMessage($object->error, 'errors');
|
|
||||||
$action = 'edit_price';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -215,6 +209,11 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error && $object->update($object->id, $user) < 0) {
|
||||||
|
$error++;
|
||||||
|
setEventMessage($object->error, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
$action = '';
|
$action = '';
|
||||||
setEventMessage($langs->trans("RecordSaved"));
|
setEventMessage($langs->trans("RecordSaved"));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user