FIX update_extras on fourn card

This commit is contained in:
atm-quentin 2018-02-01 09:31:04 +01:00
parent bdfbe462df
commit c80fa48225

View File

@ -101,6 +101,21 @@ if (empty($reshook))
$result=$object->setPaymentMethods(GETPOST('mode_reglement_supplier_id','int'));
if ($result < 0) dol_print_error($db,$object->error);
}
if ($action == 'update_extras') {
$object->fetch($id);
// Fill array 'array_options' with data from update form
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
if ($ret < 0) $error++;
if (! $error)
{
$result = $object->insertExtraFields();
if ($result < 0) $error++;
}
if ($error) $action = 'edit_extras';
}
}