Merge remote-tracking branch 'upstream/develop' into fixphpstan2
This commit is contained in:
commit
5c451ed387
10 changed files with 71 additions and 69 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">' . "\n";
|
||||
if ($optioncss != '') {
|
||||
|
|
|
|||
|
|
@ -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.<br>If empty (default value), application will use the full barcode scanned to find the product.<br><br>If defined, syntax must be:<br><b>ref:NB+qu:NB+qd:NB+other:NB</b><br>where NB is the number of characters to use to extract data from the scanned barcode with: <ul><li><b>ref</b> : product reference</li><li><b>qu</b> : quantity to set when inserting item (units)<l/i><li><b>qd</b> : quantity to set when inserting item (decimals)</li><li><b>other</b> : others characters</li></ul>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 "</tr>\n";
|
|||
// Color theme
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ColorTheme");
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
$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 "</td></tr>\n";
|
||||
|
||||
// Hide category images to speed up
|
||||
// Don't display category section
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HideCategoryImages');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_CATEGORY_IMAGES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print $langs->trans('HideCategories');
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Hide category images to speed up
|
||||
if (!getDolGlobalString('TAKEPOS_HIDE_CATEGORIES')) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HideCategoryImages');
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_CATEGORY_IMAGES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Hide category images to speed up
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HideProductImages');
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_PRODUCT_IMAGES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// View reference or label of products
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowProductReference');
|
||||
print '</td><td>';
|
||||
$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 "</td></tr>\n";
|
||||
|
||||
// Lines to show
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("NumberOfLinesToShow");
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
$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 "</td></tr>\n";
|
||||
|
||||
// D'ont display category
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HideCategories');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_CATEGORIES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Hide stock on line
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('HideStockOnLine');
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_HIDE_STOCK_ON_LINE", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Only the products in stock
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowOnlyProductInStock');
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_PRODUCT_IN_STOCK", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// View description of the categories
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowCategoryDescription');
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_SHOW_CATEGORY_DESCRIPTION", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// View reference of products
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('ShowProductReference');
|
||||
print '<td colspan="2">';
|
||||
print ajax_constantonoff("TAKEPOS_SHOW_PRODUCT_REFERENCE", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Use price excl. taxes (HT) and not price incl. taxes (TTC)
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans('UsePriceHT');
|
||||
print '<td colspan="2">';
|
||||
print '</td><td>';
|
||||
print ajax_constantonoff("TAKEPOS_CHANGE_PRICE_HT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
<?php
|
||||
if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { ?>
|
||||
<?php if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { ?>
|
||||
$("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold() + ' - ' + data[parseInt(idata)]['label']);
|
||||
<?php } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { ?>
|
||||
$("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold());
|
||||
<?php } else { ?>
|
||||
$("#prodesc"+ishow).html(data[parseInt(idata)]['label']);
|
||||
<?php } ?>
|
||||
|
|
@ -659,9 +662,10 @@ function Search2(keyCodeForEnter, moreorless) {
|
|||
$titlestring .= " + ' - ".dol_escape_js($langs->trans("Barcode").': ')."' + data[i]['barcode']";
|
||||
?>
|
||||
var titlestring = <?php echo $titlestring; ?>;
|
||||
<?php
|
||||
if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { ?>
|
||||
$("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']);
|
||||
<?php if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { ?>
|
||||
$("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']);
|
||||
<?php } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { ?>
|
||||
$("#prodesc" + i).html(data[i]['ref'].bold());
|
||||
<?php } else { ?>
|
||||
$("#prodesc" + i).html(data[i]['label']);
|
||||
<?php } ?>
|
||||
|
|
|
|||
|
|
@ -1560,6 +1560,8 @@ if ($placeid > 0) {
|
|||
}
|
||||
if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) {
|
||||
$htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext);
|
||||
} elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) {
|
||||
$htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : 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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue