Fix missing oldcopy in trigger call
This commit is contained in:
parent
88d3bf0148
commit
81497687e9
@ -897,10 +897,7 @@ if (empty($reshook))
|
|||||||
$cancelbutton = GETPOST('cancel','alpha');
|
$cancelbutton = GETPOST('cancel','alpha');
|
||||||
if (!$cancelbutton) {
|
if (!$cancelbutton) {
|
||||||
|
|
||||||
$result = $object->fetch($id);
|
$object->oldcopy = dol_clone($object);
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $object->setValueFrom('ref_supplier', GETPOST('ref_supplier','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY');
|
$result = $object->setValueFrom('ref_supplier', GETPOST('ref_supplier','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -922,10 +919,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if (!$cancelbutton)
|
if (!$cancelbutton)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$object->oldcopy = dol_clone($object);
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = $object->setValueFrom('ref_customer', GETPOST('ref_customer','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY');
|
$result = $object->setValueFrom('ref_customer', GETPOST('ref_customer','alpha'), '', null, 'text', '', $user, 'CONTRACT_MODIFY');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user