Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-26 07:24:00 +00:00
parent 836b811449
commit ebd3b00016
3 changed files with 11 additions and 16 deletions

View File

@ -189,12 +189,12 @@ if (empty($reshook)) {
$objectutil->socid = $socid; $objectutil->socid = $socid;
$result = $objectutil->createFromClone($user, $id); $result = $objectutil->createFromClone($user, $id);
if ($result > 0) { if ($result > 0) {
header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result);
exit(); exit();
} else { } else {
$langs->load("errors"); $langs->load("errors");
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$action = ''; $action = '';
} }
} // Change status of invoice } // Change status of invoice
elseif ($action == 'reopen' && $usercanreopen) { elseif ($action == 'reopen' && $usercanreopen) {

View File

@ -1007,8 +1007,7 @@ class FormCompany extends Form
{ {
global $conf, $langs; global $conf, $langs;
if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) {
{
return '' ; return '' ;
} }
@ -1035,8 +1034,7 @@ class FormCompany extends Form
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
$out .= '<option value="1,3"'.($selected == '1,3' ? ' selected' : '').'>'.$langs->trans('Customer').'</option>'; $out .= '<option value="1,3"'.($selected == '1,3' ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
} }
if (!empty($conf->fournisseur->enabled)) if (!empty($conf->fournisseur->enabled)) {
{
$out .= '<option value="4"'.($selected == '4' ? ' selected' : '').'>'.$langs->trans('Supplier').'</option>'; $out .= '<option value="4"'.($selected == '4' ? ' selected' : '').'>'.$langs->trans('Supplier').'</option>';
} }
$out .= '<option value="0"'.($selected == '0' ? ' selected' : '').'>'.$langs->trans('Other').'</option>'; $out .= '<option value="0"'.($selected == '0' ? ' selected' : '').'>'.$langs->trans('Other').'</option>';

View File

@ -244,20 +244,17 @@ if (!empty($conf->projet->enabled)) {
if (!empty($conf->contrat->enabled)) { if (!empty($conf->contrat->enabled)) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid";
} }
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) 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)"; $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) if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) {
{
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid";
} }
// Add table from hooks // Add table from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
if (!$user->rights->societe->client->voir && empty($socid)) if (!$user->rights->societe->client->voir && empty($socid)) {
{
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
} }
$sql .= ", ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."societe as s";