Fix empty value
This commit is contained in:
parent
817a9594ae
commit
e9e100410a
@ -108,7 +108,9 @@ $item->fieldAttr = array(
|
||||
$item = $formSetup->newItem('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID');
|
||||
$item->nameText = $langs->trans('PaymentConditionsShortRetainedWarranty');
|
||||
$form->load_cache_conditions_paiements();
|
||||
$item->fieldOutputOverride = $form->cache_conditions_paiements[$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID]['label'];
|
||||
if (!empty($conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID) && isset($form->cache_conditions_paiements[$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID]['label'])) {
|
||||
$item->fieldOutputOverride = $form->cache_conditions_paiements[$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID]['label'];
|
||||
}
|
||||
$item->fieldInputOverride = $form->getSelectConditionsPaiements($conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID, 'INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID', -1, 1);
|
||||
|
||||
|
||||
|
||||
@ -605,7 +605,7 @@ class FormSetupItem
|
||||
global $langs, $db, $conf, $form;
|
||||
$this->db = $db;
|
||||
|
||||
if (!empty($form) && is_object($form) && get_class($form) == 'Form') { // form class have cache inside so I use it for optimise
|
||||
if (!empty($form) && is_object($form) && get_class($form) == 'Form') { // the form class has a cache inside so I am using it to optimize
|
||||
$this->form = $form;
|
||||
} else {
|
||||
$this->form = new Form($this->db);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user