clean code
This commit is contained in:
parent
85a594aa61
commit
f043345706
@ -2612,6 +2612,7 @@ class Societe extends CommonObject
|
|||||||
$datas = [];
|
$datas = [];
|
||||||
|
|
||||||
$option = $params['option'] ?? '';
|
$option = $params['option'] ?? '';
|
||||||
|
$nofetch = empty($params['nofetch']) ? false : true;
|
||||||
$name = $this->name;
|
$name = $this->name;
|
||||||
|
|
||||||
if (!empty($this->name_alias) && empty($noaliasinname)) {
|
if (!empty($this->name_alias) && empty($noaliasinname)) {
|
||||||
@ -2724,6 +2725,12 @@ class Societe extends CommonObject
|
|||||||
if (isModEnabled('accounting') && $this->fournisseur) {
|
if (isModEnabled('accounting') && $this->fournisseur) {
|
||||||
$datas['accountancysuppliercode'] = '<br><b>'.$langs->trans('SupplierAccountancyCode').':</b> '.$this->code_compta_fournisseur;
|
$datas['accountancysuppliercode'] = '<br><b>'.$langs->trans('SupplierAccountancyCode').':</b> '.$this->code_compta_fournisseur;
|
||||||
}
|
}
|
||||||
|
// show categories for this record only in ajax to not overload lists
|
||||||
|
if (isModEnabled('categorie') && !$nofetch) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
|
$form = new Form($this->db);
|
||||||
|
$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1);
|
||||||
|
}
|
||||||
|
|
||||||
$datas['divclose'] = '</div>';
|
$datas['divclose'] = '</div>';
|
||||||
|
|
||||||
@ -2789,6 +2796,7 @@ class Societe extends CommonObject
|
|||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'objecttype' => $this->element,
|
'objecttype' => $this->element,
|
||||||
'option' => $option,
|
'option' => $option,
|
||||||
|
'nofetch' => 1,
|
||||||
];
|
];
|
||||||
$classfortooltip = 'classfortooltip';
|
$classfortooltip = 'classfortooltip';
|
||||||
$dataparams = '';
|
$dataparams = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user