From b51ac49f902640294cd920c3357af7de95806e04 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 18 Aug 2021 07:15:05 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/product/card.php | 44 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 261d55948a8..ede9be76ef7 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -114,14 +114,12 @@ if (!empty($user->socid)) { // Load object modCodeProduct $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); -if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') -{ - $module = substr($module, 0, dol_strlen($module) - 4); +if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/product/'.$module.'.php'); -if ($result > 0) -{ - $modCodeProduct = new $module(); +if ($result > 0) { + $modCodeProduct = new $module(); } $object = new Product($db); @@ -259,11 +257,11 @@ if (empty($reshook)) { $error++; } if (empty($ref)) { - if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) { - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors'); - $action = "create"; - $error++; - } + if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors'); + $action = "create"; + $error++; + } } if (!empty($duration_value) && empty($duration_unit)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors'); @@ -1099,18 +1097,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print dol_get_fiche_head(''); print ''; - - if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) { - print ''; - $tmpcode = ''; - if (!empty($modCodeProduct->code_auto)) { - $tmpcode = $modCodeProduct->getNextValue($object, $type); - } - print ''; + + if (empty($conf->global->PRODUCT_GENERATE_REF_AFTER_FORM)) { + print ''; + $tmpcode = ''; + if (!empty($modCodeProduct->code_auto)) { + $tmpcode = $modCodeProduct->getNextValue($object, $type); + } + print ''; } // Label
'.$langs->trans("Ref").''; - if ($refalreadyexists) { - print $langs->trans("RefAlreadyExists"); - } - print '
'.$langs->trans("Ref").''; + if ($refalreadyexists) { + print $langs->trans("RefAlreadyExists"); + } + print '