Moved update function after updatePrice

This commit is contained in:
Marcos García de La Fuente 2015-11-08 16:45:42 +01:00
parent 7f0d81d255
commit 9bc4b9f0bc

View File

@ -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) {
$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)) {
$action = '';
setEventMessage($langs->trans("RecordSaved"));