Merge branch '13.0' of github.com:Dolibarr/dolibarr into 13.0_new_collapse_batch_detail

This commit is contained in:
Gauthier PC portable 024 2021-04-20 09:06:05 +02:00
commit e5df10133e
2 changed files with 8 additions and 4 deletions

View File

@ -223,6 +223,10 @@ if (!empty($conf->contrat->enabled)) {
}
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (f.rowid = ef.fk_object)";
if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid";
// Add table from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
if (!$user->rights->societe->client->voir && empty($socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
$sql .= " WHERE f.entity IN (".getEntity('intervention').")";

View File

@ -97,7 +97,7 @@ if (empty($reshook))
$object->fk_parent = (int) GETPOST("fk_parent", "int");
$object->label = (string) GETPOST("libelle", "alpha");
$object->description = (string) GETPOST("desc", "alpha");
$object->statut = GETPOST("statut");
$object->statut = GETPOST("statut", "int");
$object->lieu = (string) GETPOST("lieu", "alpha");
$object->address = (string) GETPOST("address", "alpha");
$object->zip = (string) GETPOST("zipcode", "alpha");
@ -160,7 +160,7 @@ if (empty($reshook))
{
if ($object->fetch($id))
{
$object->label = GETPOST("libelle");
$object->label = GETPOST("libelle");
$object->fk_parent = GETPOST("fk_parent");
$object->description = GETPOST("desc");
$object->statut = GETPOST("statut");
@ -169,8 +169,8 @@ if (empty($reshook))
$object->zip = GETPOST("zipcode");
$object->town = GETPOST("town");
$object->country_id = GETPOST("country_id");
$object->phone = GETPOST("phone");
$object->fax = GETPOST("fax");
$object->phone = GETPOST("phone");
$object->fax = GETPOST("fax");
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);