Merge pull request #18174 from defrance/patch-169

somme error on v14 fresh install
This commit is contained in:
Laurent Destailleur 2021-08-17 19:32:07 +02:00 committed by GitHub
commit 7487b23391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View File

@ -525,6 +525,7 @@ $viewmode .= '<span class="marginrightonly"></span>'; // To add a space before t
$newcardbutton = '';
$newparam = '';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) {
$tmpforcreatebutton = dol_getdate(dol_now(), true);

View File

@ -67,6 +67,8 @@ $socid = 0;
if ($user->socid) {
$socid = $user->socid;
}
$allowed = 0;
if (!empty($user->rights->accounting->chartofaccount)) {
$allowed = 1; // Dictionary with list of banks accounting account allowed to manager of chart account
}
@ -191,7 +193,7 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account as b";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
if (!empty($extrafields->attributes[$object->table_element]['label']) && 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 (b.rowid = ef.fk_object)";
}
@ -333,12 +335,12 @@ $objecttmp = new Account($db);
$trackid = 'bank'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
if ($sall) {
foreach ($fieldstosearchall as $key => $val) {
$fieldstosearchall[$key] = $langs->trans($val);
}
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>';
}
//if ($sall) {
// foreach ($fieldstosearchall as $key => $val) {
// $fieldstosearchall[$key] = $langs->trans($val);
// }
// print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>';
//}
$moreforfilter = '';

View File

@ -1077,7 +1077,7 @@ class FormCompany extends Form
$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
$out .= '</form>';
} else {
if ($selected) {
if ($selected > 0) {
$arr = $this->typent_array(0);
$typent = $arr[$selected];
$out .= $typent;

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Charles-Fr Benke <charles.fr@benke.fr>
* Copyright (C) 2014-2021 Charlene Benke <charlene.r@benke.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
@ -286,6 +286,7 @@ $sql .= $db->order("s.tms", "DESC");
$sql .= $db->plimit($max, 0);
//print $sql;
$lastmodified="";
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);

View File

@ -50,6 +50,7 @@ $socid = 0;
if ($user->socid) {
$socid = $user->socid;
}
$userid = $user->id;
// Security check
$result = restrictedArea($user, 'ticket', 0, '', '', '', '');
@ -96,7 +97,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
$endyear = GETPOST($param_year, 'int');
$shownb = GETPOST($param_shownb, 'alpha');
$showtot = GETPOST($param_showtot, 'alpha');
} else {
} elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) {
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true);
$endyear = $tmparray['year'];
$shownb = $tmparray['shownb'];
@ -104,6 +105,7 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
}
if (empty($shownb) && empty($showtot)) {
$showtot = 1;
$shownb = 0;
}
$nowarray = dol_getdate(dol_now(), true);