diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index a3f2e4c56db..2de8736b39f 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1816,7 +1816,7 @@ class ActionComm extends CommonObject $result .= $linkstart; if ($withpicto) { - $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1); + $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$label), ($overwritepicto ? $overwritepicto : 'action'), (($this->type_color && $overwritepicto) ? 'style="color: #'.$this->type_color.' !important;" ' : '').($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : ' class="'.(($withpicto != 2) ? 'paddingright ' : '').'"'), 0, 0, $notooltip ? 0 : 1); } $result .= dol_escape_htmltag($labelshort); $result .= $linkend; diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 1cc1244d8df..6f951eff6ea 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -200,7 +200,7 @@ class HookManager 'insertExtraFooter', 'printLeftBlock', 'formAddObjectLine', - 'formBuilddocOption', + 'formBuilddocOptions', 'showSocinfoOnPrint' ))) { $hooktype = 'output'; @@ -241,8 +241,8 @@ class HookManager $actionclassinstance->error = 0; $actionclassinstance->errors = array(); - if (getDolGlobalInt('MAIN_DEBUG_SHOW_EACH_QUALIFIED_HOOK_CALL') >= 2) { - // This his too much verbose, enabled in develop only + if (getDolGlobalInt('MAIN_DEBUG_HOOK')) { + // This his too much verbose, enabled if const enabled only dol_syslog(get_class($this)."::executeHooks Qualified hook found (hooktype=".$hooktype."). We call method ".get_class($actionclassinstance).'->'.$method.", context=".$context.", module=".$module.", action=".$action.((is_object($object) && property_exists($object, 'id')) ? ', object id='.$object->id : '').((is_object($object) && property_exists($object, 'element')) ? ', object element='.$object->element : ''), LOG_DEBUG); } @@ -283,7 +283,10 @@ class HookManager continue; } - //dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG); + if (getDolGlobalInt('MAIN_DEBUG_HOOK')) { + dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG); + } + $resactiontmp = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example) $resaction += $resactiontmp; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 0194c45b457..a4b493359d5 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -396,7 +396,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'submenus' => array(), ); - // Tickets and knowledge base + // Tickets and Knowledge base $tmpentry = array( 'enabled'=>(isModEnabled('ticket') || isModEnabled('knowledgemanagement')), 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), @@ -411,7 +411,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $menu_arr[] = array( 'name' => 'Ticket', 'link' => $link, - 'title' => "Tickets", + 'title' => isModEnabled('ticket') ? "Tickets" : "MenuKnowledgeRecordShort", 'level' => 0, 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, diff --git a/htdocs/hrm/lib/hrm_job.lib.php b/htdocs/hrm/lib/hrm_job.lib.php index 599ee1c2871..47858460182 100644 --- a/htdocs/hrm/lib/hrm_job.lib.php +++ b/htdocs/hrm/lib/hrm_job.lib.php @@ -61,7 +61,7 @@ function jobPrepareHead($object) $head[$h][2] = 'skill_tab'; $h++; - $head[$h][0] = DOL_URL_ROOT."/hrm/position.php?fk_job=".$object->id; + $head[$h][0] = DOL_URL_ROOT."/hrm/position.php?id=".$object->id; $head[$h][1] = $langs->trans("PositionsWithThisProfile"); $nbResources = 0; $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."hrm_job_user WHERE fk_job = ".((int) $object->id); diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index 4b0659bfe5c..ab287ec115d 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -89,10 +89,14 @@ $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->enti //if ($user->socid > 0) $socid = $user->socid; //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); -if (empty($conf->hrm->enabled)) accessforbidden(); -if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden(); +if (empty($conf->hrm->enabled)) { + accessforbidden(); +} +if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) { + accessforbidden(); +} -$MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : Skill::DEFAULT_MAX_RANK_PER_SKILL; +$MaxNumberSkill = getDolGlobalInt('HRM_MAXRANK', Skill::DEFAULT_MAX_RANK_PER_SKILL); /* @@ -167,7 +171,7 @@ if (empty($reshook)) { } // Actions to send emails - $triggersendname = 'hrm_SKILL_SENTBYMAIL'; + $triggersendname = 'HRM_SKILL_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_SKILL_TO'; $trackid = 'skill' . $object->id; include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; @@ -182,7 +186,7 @@ $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); -$title = $langs->trans("skill"); +$title = $langs->trans("Skill"); $help_url = ''; llxHeader('', $title, $help_url); @@ -468,9 +472,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } } -//*---------------------------------------------------------------------------- -//*---------------------------------------------------------------------------- - //*--------------------------------------------------------------------------- @@ -589,27 +590,11 @@ if ($action != "create" && $action != "edit") { } else { $sql .= " WHERE 1 = 1 "; } + $sql .= " AND fk_skill = ".((int) $id); - if (!empty($id)) { - $sql .= " AND fk_skill = " . ((int) $id) . " "; - } - - // if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. - if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; - } else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); - } + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + $num = $db->num_rows($resql); print '
' . "\n"; if ($optioncss != '') { diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 9cde66460d3..3025d67d793 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -118,7 +118,7 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines of images to show +NumberOfLinesToShow=Maximum number of lines of text to show on thumb images DefineTablePlan=Define tables plan GiftReceiptButton=Add a "Gift receipt" button GiftReceipt=Gift receipt @@ -137,11 +137,11 @@ YearNotDefined=Year is not defined TakeposBarcodeRuleToInsertProduct=Barcode rule to insert product TakeposBarcodeRuleToInsertProductDesc=Rule to extract the product reference + a quantity from a scanned barcode.
If empty (default value), application will use the full barcode scanned to find the product.

If defined, syntax must be:
ref:NB+qu:NB+qd:NB+other:NB
where NB is the number of characters to use to extract data from the scanned barcode with: AlreadyPrinted=Already printed -HideCategories=Hide categories +HideCategories=Hide the whole section of categories selection HideStockOnLine=Hide stock on line ShowOnlyProductInStock=Show the products in stock ShowCategoryDescription=Show category description -ShowProductReference=Show reference of products +ShowProductReference=Show reference or label of products UsePriceHT=Use price excl. taxes and not price incl. taxes TerminalName=Terminal %s TerminalNameDesc=Terminal name diff --git a/htdocs/langs/en_US/knowledgemanagement.lang b/htdocs/langs/en_US/knowledgemanagement.lang index 050ecbcc03a..acf1bd62f11 100644 --- a/htdocs/langs/en_US/knowledgemanagement.lang +++ b/htdocs/langs/en_US/knowledgemanagement.lang @@ -39,6 +39,7 @@ KnowledgeManagementAboutPage = Knowledge Management about page KnowledgeManagementArea = Knowledge Management MenuKnowledgeRecord = Knowledge base +MenuKnowledgeRecordShort = Knowledge base ListKnowledgeRecord = List of articles NewKnowledgeRecord = New article ValidateReply = Validate solution diff --git a/htdocs/takepos/admin/appearance.php b/htdocs/takepos/admin/appearance.php index 54ed2f642a2..d351b90ae8c 100644 --- a/htdocs/takepos/admin/appearance.php +++ b/htdocs/takepos/admin/appearance.php @@ -46,6 +46,9 @@ if (GETPOST('action', 'alpha') == 'set') { $res = dolibarr_set_const($db, "TAKEPOS_COLOR_THEME", GETPOST('TAKEPOS_COLOR_THEME', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_LINES_TO_SHOW", GETPOST('TAKEPOS_LINES_TO_SHOW', 'alpha'), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('TAKEPOS_SHOW_PRODUCT_REFERENCE')) { + $res = dolibarr_set_const($db, "TAKEPOS_SHOW_PRODUCT_REFERENCE", GETPOST('TAKEPOS_SHOW_PRODUCT_REFERENCE', 'alpha'), 'chaine', 0, '', $conf->entity); + } dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); @@ -91,72 +94,76 @@ print "\n"; // Color theme print ''; print $langs->trans("ColorTheme"); -print ''; +print ''; $array = array(0=>"Eldy", 1=>$langs->trans("Colorful")); print $form->selectarray('TAKEPOS_COLOR_THEME', $array, (empty($conf->global->TAKEPOS_COLOR_THEME) ? '0' : $conf->global->TAKEPOS_COLOR_THEME), 0); print "\n"; -// Hide category images to speed up +// Don't display category section print ''; -print $langs->trans('HideCategoryImages'); -print ''; -print ajax_constantonoff("TAKEPOS_HIDE_CATEGORY_IMAGES", array(), $conf->entity, 0, 0, 1, 0); +print $langs->trans('HideCategories'); +print ''; +print ajax_constantonoff("TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0); print "\n"; +// Hide category images to speed up +if (!getDolGlobalString('TAKEPOS_HIDE_CATEGORIES')) { + print ''; + print $langs->trans('HideCategoryImages'); + print ''; + print ajax_constantonoff("TAKEPOS_HIDE_CATEGORY_IMAGES", array(), $conf->entity, 0, 0, 1, 0); + print "\n"; +} + // Hide category images to speed up print ''; print $langs->trans('HideProductImages'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_HIDE_PRODUCT_IMAGES", array(), $conf->entity, 0, 0, 1, 0); print "\n"; +// View reference or label of products +print ''; +print $langs->trans('ShowProductReference'); +print ''; +$array = array("0"=>$langs->trans("Label"), 1=>$langs->trans("Ref").'+'.$langs->trans("Label"), 2=>$langs->trans("Ref")); +print $form->selectarray('TAKEPOS_SHOW_PRODUCT_REFERENCE', $array, getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE', 2), 0); +//print ajax_constantonoff("TAKEPOS_SHOW_PRODUCT_REFERENCE", array(), $conf->entity, 0, 0, 1, 0); +print "\n"; + // Lines to show print ''; print $langs->trans("NumberOfLinesToShow"); -print ''; +print ''; $array = array(1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5", 6=>"6"); print $form->selectarray('TAKEPOS_LINES_TO_SHOW', $array, getDolGlobalInt('TAKEPOS_LINES_TO_SHOW', 2), 0); print "\n"; -// D'ont display category -print ''; -print $langs->trans('HideCategories'); -print ''; -print ajax_constantonoff("TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0); -print "\n"; - // Hide stock on line print ''; print $langs->trans('HideStockOnLine'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_HIDE_STOCK_ON_LINE", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // Only the products in stock print ''; print $langs->trans('ShowOnlyProductInStock'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_PRODUCT_IN_STOCK", array(), $conf->entity, 0, 0, 1, 0); print "\n"; // View description of the categories print ''; print $langs->trans('ShowCategoryDescription'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0); print "\n"; -// View reference of products -print ''; -print $langs->trans('ShowProductReference'); -print ''; -print ajax_constantonoff("TAKEPOS_SHOW_PRODUCT_REFERENCE", array(), $conf->entity, 0, 0, 1, 0); -print "\n"; - // Use price excl. taxes (HT) and not price incl. taxes (TTC) print ''; print $langs->trans('UsePriceHT'); -print ''; +print ''; print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0); print "\n"; diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index ff6371fe735..32d7301b6fe 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -361,6 +361,8 @@ function LoadProducts(position, issubcat) { echo '$("#prodivdesc"+ishow).show();'; if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { echo '$("#prodesc"+ishow).html(data[parseInt(idata)][\'ref\'].bold() + \' - \' + data[parseInt(idata)][\'label\']);'; + } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { + echo '$("#prodesc"+ishow).html(data[parseInt(idata)][\'ref\'].bold());'; } else { echo '$("#prodesc"+ishow).html(data[parseInt(idata)][\'label\']);'; } @@ -449,9 +451,10 @@ function MoreProducts(moreorless) { $("#prodiv"+ishow).data("rowid",""); } else { $("#prodivdesc"+ishow).show(); - + $("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold() + ' - ' + data[parseInt(idata)]['label']); + + $("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold()); $("#prodesc"+ishow).html(data[parseInt(idata)]['label']); @@ -659,9 +662,10 @@ function Search2(keyCodeForEnter, moreorless) { $titlestring .= " + ' - ".dol_escape_js($langs->trans("Barcode").': ')."' + data[i]['barcode']"; ?> var titlestring = ; - - $("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']); + + $("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']); + + $("#prodesc" + i).html(data[i]['ref'].bold()); $("#prodesc" + i).html(data[i]['label']); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index c5c34f6a3a4..037f8ed6dad 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1560,6 +1560,8 @@ if ($placeid > 0) { } if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { $htmlforlines .= $form->textwithpicto($line->product_label ? '' . $line->product_ref . ' - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); + } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { + $htmlforlines .= $form->textwithpicto($line->product_ref ? ''.$line->product_ref.'' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); } else { $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); }