diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 8a0d6764590..ec87c9bc489 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -216,20 +216,6 @@ if ($num) { } } -print "\n"; - -print "
\n"; - -/* - * Export model - */ -print ''; - -print ''; -print ''; -print ''; - - print ''; print ''; if (!$conf->use_javascript_ajax) { @@ -238,12 +224,13 @@ if (!$conf->use_javascript_ajax) { print ""; } else { print ''; } print ""; + print "
'.$langs->trans("Modelcsv").'
'.$langs->trans("Selectmodelcsv").''; - $listmodelcsv = $accountancyexport->getType(); - print $form->selectarray("ACCOUNTING_EXPORT_MODELCSV", $listmodelcsv, getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV'), 0, 0, 0, '', 0, 0, 0, '', '', 1); + $listofexporttemplates = $accountancyexport->getType(1); + print $form->selectarray("ACCOUNTING_EXPORT_MODELCSV", $listofexporttemplates, getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV'), 0, 0, 0, '', 0, 0, 0, '', '', 1); print '
"; print "
\n"; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 9fe06170b7f..40315b46433 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -116,14 +116,14 @@ class AccountancyExport /** * Array with all export type available (key + label) * - * @return array of type + * @param int $mode Mode of list: 0=flat list, 1=rich list + * @return array of type */ - public function getType() + public function getType($mode = 0) { global $langs, $hookmanager; - $listofexporttypes = array( - self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'), + $listofspecialformatexport = array( self::$EXPORT_TYPE_CEGID => $langs->trans('Modelcsv_CEGID'), self::$EXPORT_TYPE_COALA => $langs->trans('Modelcsv_COALA'), self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'), @@ -140,17 +140,37 @@ class AccountancyExport self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'), self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinumv3'), self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinumv5'), - self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'), - self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'), self::$EXPORT_TYPE_ISUITEEXPERT => 'Export iSuite Expert', ); + $listofgenericformatexport = array( + self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'), + self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'), + self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'), + ); + + if (empty($mode)) { + $listofexporttypes = $listofgenericformatexport + $listofspecialformatexport; + ksort($listofexporttypes, SORT_NUMERIC); + } else { + ksort($listofspecialformatexport, SORT_NUMERIC); + $listofexporttypes = array(); + $i = 0; + foreach ($listofgenericformatexport as $key => $val) { + $i++; + $listofexporttypes[$key] = array('id' => $key, 'label' => $val, 'position' => $i); + } + $listofexporttypes['separator_'.$i] = array('id' => 0, 'label' => '----------------', 'position' => $i, 'disabled' => 'disabled'); + foreach ($listofspecialformatexport as $key => $val) { + $i++; + $listofexporttypes[$key] = array('id' => $key, 'label' => $val, 'position' => $i); + } + } + // allow modules to define export formats $parameters = array(); $reshook = $hookmanager->executeHooks('getType', $parameters, $listofexporttypes); - ksort($listofexporttypes, SORT_NUMERIC); - return $listofexporttypes; } diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 14afbbbe7d8..8e88ed464bd 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -77,11 +77,6 @@ class AccountingJournal extends CommonObject */ public $active; - /** - * @var AccountingJournal[] array of lines - */ - public $lines; - /** * @var array Accounting account cached */ @@ -159,88 +154,6 @@ class AccountingJournal extends CommonObject return -1; } - /** - * Load object in memory from the database - * - * @param string $sortorder Sort Order - * @param string $sortfield Sort field - * @param int $limit limit - * @param int $offset offset limit - * @param string|array $filter filter array - * @param string $filtermode filter mode (AND or OR) - * @return int Return integer <0 if KO, >0 if OK - */ - public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') - { - $sql = "SELECT rowid, code, label, nature, active"; - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - $sql .= ' WHERE 1 = 1'; - $sql .= " AND entity IN (".getEntity('accountancy').")"; - - // Manage filter - if (is_array($filter)) { - $sqlwhere = array(); - if (count($filter) > 0) { - foreach ($filter as $key => $value) { - if ($key == 't.code' || $key == 't.label' || $key == 't.nature') { - $sqlwhere[] = $key." = '".$this->db->escape($value)."'"; - } elseif ($key == 't.rowid' || $key == 't.active') { - $sqlwhere[] = $key.'='.((int) $value); - } - } - } - if (count($sqlwhere) > 0) { - $sql .= " AND ".implode(" ".$this->db->sanitize($filtermode)." ", $sqlwhere); - } - - $filter = ''; - } - - // Manage filter - $errormessage = ''; - $sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage); - if ($errormessage) { - $this->errors[] = $errormessage; - dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); - return -1; - } - - if (!empty($sortfield)) { - $sql .= $this->db->order($sortfield, $sortorder); - } - if (!empty($limit)) { - $sql .= $this->db->plimit($limit + 1, $offset); - } - $this->lines = array(); - - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $num = $this->db->num_rows($resql); - - while ($obj = $this->db->fetch_object($resql)) { - $line = new self($this->db); - - $line->id = $obj->rowid; - $line->code = $obj->code; - $line->label = $obj->label; - $line->nature = $obj->nature; - $line->active = $obj->active; - - $this->lines[] = $line; - } - - $this->db->free($resql); - - return $num; - } else { - $this->errors[] = 'Error '.$this->db->lasterror(); - dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); - - return -1; - } - } - /** * Return clickable name (with picto eventually) * @@ -253,7 +166,7 @@ class AccountingJournal extends CommonObject */ public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0) { - global $langs, $conf, $user, $hookmanager; + global $langs, $conf, $hookmanager; if (!empty($conf->dol_no_mouse_hover)) { $notooltip = 1; // Force disable tooltips diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 54d164532f6..3ee0106e7d6 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -507,8 +507,8 @@ if ($result) { } print ''; - print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1)); + print ''; $trunclength = getDolGlobalInt('ACCOUNTING_LENGTH_DESCRIPTION', 32); print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); print ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index d02757a297a..0581675d33f 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -663,8 +663,8 @@ if ($result) { print ''; // Description of line - print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc, 1)); + print ''; $trunclength = getDolGlobalInt('ACCOUNTING_LENGTH_DESCRIPTION', 32); print $form->textwithtooltip(dol_trunc($text, $trunclength), $facture_static_det->desc); print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 66c43e2eb7a..c38582aca6a 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -66,7 +66,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "other", "compta", "banks", "bills", "donations", "loan", "accountancy", "trips", "salaries", "hrm", "members")); -// Multi journal +// Multi journal&search_status=-1 $id_journal = GETPOSTINT('id_journal'); $date_startmonth = GETPOSTINT('date_startmonth'); @@ -1138,8 +1138,10 @@ if (empty($action) || $action == 'view') { // Button to write into Ledger if (getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER') == '-1' || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') == '-1' - || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == "" || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1' - || getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSERERPORT') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSERERPORT') == '-1') { + || (isModEnabled("salaries") && (getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == "" || getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') == '-1')) + || (isModEnabled("expensereport") && (getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT') == "" || getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT') == '-1'))) { + + print($desc ? '' : '
').'
'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); $desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}'); $desc = str_replace('{link}', ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'', $desc); diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 938b5c699c9..894c594f2a1 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -517,8 +517,8 @@ if ($result) { */ // Supplier invoice label - print ''; - print $objp->invoice_label; + print ''; + print dol_escape_htmltag($objp->invoice_label); print ''; // Date invoice @@ -537,8 +537,8 @@ if ($result) { } print ''; - print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1)); + print ''; $trunclength = getDolGlobalInt('ACCOUNTING_LENGTH_DESCRIPTION', 32); print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); print ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 4366f498749..ed41745fac0 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -690,8 +690,8 @@ if ($result) { print ''; // Description of line - print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc, 1)); + print ''; $trunclength = getDolGlobalInt('ACCOUNTING_LENGTH_DESCRIPTION', 32); print $form->textwithtooltip(dol_trunc($text, $trunclength), $facturefourn_static_det->desc); print ''; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 2c9084fa89c..ff8c77b8628 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -204,7 +204,7 @@ if ($result) { // Show break line print ''; - print ''; + print ''; print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName(); print ''; print ''; @@ -222,7 +222,7 @@ if ($result) { print ''; // Picto and label of module - print ''; + print ''; //print img_object('', $picto, 'class="pictoobjectwidth"').' '.$objMod->getName(); print ''; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 106be0c0b25..92ff8ff8450 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -1084,8 +1084,8 @@ while ($i < $imaxinloop) { // Description if (!empty($arrayfields['a.note']['checked'])) { - print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 1)); + print ''; print $form->textwithtooltip(dol_trunc($text, 48), $actionstatic->note_private); print ''; } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 4795d238d6a..8b32d9d9220 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -87,8 +87,8 @@ $search_dv_end = dol_mktime(0, 0, 0, GETPOSTINT('search_end_dvmonth'), GETPOSTIN $search_thirdparty_user = GETPOST("search_thirdparty", 'alpha') ? GETPOST("search_thirdparty", 'alpha') : GETPOST("thirdparty", 'alpha'); $search_req_nb = GETPOST("req_nb", 'alpha'); $search_num_releve = GETPOST("search_num_releve", 'alpha'); -$search_conciliated = GETPOSTINT("search_conciliated"); -$search_fk_bordereau = GETPOSTINT("search_fk_bordereau"); +$search_conciliated = GETPOST("search_conciliated", 'int'); +$search_fk_bordereau = GETPOST("search_fk_bordereau", 'int'); $optioncss = GETPOST('optioncss', 'alpha'); $toselect = GETPOST('toselect', 'array'); $num_releve = GETPOST("num_releve", "alpha"); @@ -152,7 +152,7 @@ $search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '' $arrayfields = array( 'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1,'position' => 10), 'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1,'position' => 20), - 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => 1,'position' => 30), + 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => -1,'position' => 30), 'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40), 'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50), 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60), diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 76a3f8e2abd..12a0dff52ec 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -58,7 +58,7 @@ $mode = GETPOST('mode', 'aZ'); $search_ref = GETPOST('search_ref', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $search_number = GETPOST('search_number', 'alpha'); -$search_status = GETPOST('search_status') ? GETPOST('search_status', 'alpha') : 'opened'; // 'all' or '' means 'opened' +$search_status = GETPOST('search_status', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $search_category_list = ""; @@ -212,10 +212,10 @@ if (!empty($extrafields->attributes[$object->table_element]['label']) && is_arra $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; } $sql .= " WHERE b.entity IN (".getEntity('bank_account').")"; -if ($search_status == 'opened') { +if ($search_status === 'opened') { $sql .= " AND clos = 0"; } -if ($search_status == 'closed') { +if ($search_status === 'closed') { $sql .= " AND clos = 1"; } if ($search_ref != '') { @@ -334,7 +334,7 @@ if ($search_label != '') { if ($search_number != '') { $param .= '&search_number='.urlencode($search_number); } -if ($search_status != '') { +if ($search_status != '' && $search_status != '-1') { $param .= '&search_status='.urlencode($search_status); } if ($show_files) { diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index be37aea25f6..0542b30a4e3 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -98,7 +98,7 @@ class FormAccounting extends Form $sql = "SELECT rowid, code, label, nature, entity, active"; $sql .= " FROM ".$this->db->prefix()."accounting_journal"; $sql .= " WHERE active = 1"; - $sql .= " AND entity = ".$conf->entity; + $sql .= " AND entity = ".((int) $conf->entity); if ($nature && is_numeric($nature)) { $sql .= " AND nature = ".((int) $nature); } diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 41f73e38718..a36047df657 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -19,7 +19,7 @@ insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, left insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 7__+MAX_llx_menu__, 'projet', 'isModEnabled("project")', __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->hasRight("projet","lire")', '', 2, 32, __ENTITY__, ''); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 5__+MAX_llx_menu__, 'propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', 'isModEnabled("propal") || isModEnabled("commande") || isModEnabled("supplier_order") || isModEnabled("contrat") || isModEnabled("ficheinter")', __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->hasRight("societe","lire") || $user->hasRight("societe","contact","lire")', '', 2, 40, __ENTITY__, ''); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 6__+MAX_llx_menu__, 'facture|don|tax|salaries|loan|banque', 'isModEnabled("comptabilite") || isModEnabled("accounting") || isModEnabled("invoice") || isModEnabled("don") || isModEnabled("tax") || isModEnabled("salaries") || isModEnabled("supplier_invoice") || isModEnabled("loan") || isModEnabled("banque")', __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->hasRight("facture","lire") || $user->hasRight("don","lire") || $user->hasRight("tax","charges","lire") || $user->hasRight("salaries","read") || $user->hasRight("loan","read") || $user->hasRight("banque","lire") || $user->hasRight("fournisseur","facture","lire") || $user->hasRight("supplier_invoice","read")', '', 2, 50, __ENTITY__, ''); -insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 14__+MAX_llx_menu__, 'banque|prelevement', 'isModEnabled("banque") || isModEnabled("prelevement")', __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->hasRight("banque","lire") || $user->hasRight("prelevement","bons","lire")', '', 0, 52, __ENTITY__, ''); +insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 14__+MAX_llx_menu__, 'banque|prelevement', 'isModEnabled("banque") || isModEnabled("prelevement")', __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?search_status=opened&mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->hasRight("banque","lire") || $user->hasRight("prelevement","bons","lire")', '', 0, 52, __ENTITY__, ''); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 9__+MAX_llx_menu__, 'comptabilite|accounting|asset', 'isModEnabled("comptabilite") || isModEnabled("accounting") || isModEnabled("asset")', __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->hasRight("compta","resultat","lire") || $user->hasRight("accounting","mouvements","lire") || $user->hasRight("asset","read")', '', 2, 54, __ENTITY__, ''); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 8__+MAX_llx_menu__, '', '', __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__, ''); insert into llx_menu (rowid, module, enabled, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity, prefix) values ( 13__+MAX_llx_menu__, 'adherent', 'isModEnabled("adherent")', __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->hasRight("adherent","lire")', '', 2, 19, __ENTITY__, ''); @@ -400,7 +400,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("prelevement") && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2517__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Statistics', 1, 'withdrawals', '$user->hasRight("prelevement","bons","lire")', '', 2, 6, __ENTITY__); -- Bank -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque")', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->hasRight("banque","lire")', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque")', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?search_status=opened&mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->hasRight("banque","lire")', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?mainmenu=bank&action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->hasRight("banque","configurer")', '', 0, 0, __ENTITY__); -- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2602__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/categ.php?mainmenu=bank&leftmenu=bank', 'Rubriques', 1, 'categories', '$user->hasRight("banque","configurer")', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'isModEnabled("banque") && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2603__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/bankentries_list.php?mainmenu=bank&leftmenu=bank', 'ListTransactions', 1, 'banks', '$user->hasRight("banque","lire")', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index c12fbc08c45..0d91d521370 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -374,7 +374,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $i = 0; if ($numr > 0) { - $newmenu->add('/compta/bank/list.php', $langs->trans("BankAccounts"), 0, $user->hasRight('banque', 'lire')); + $newmenu->add('/compta/bank/list.php?search_status=opened', $langs->trans("BankAccounts"), 0, $user->hasRight('banque', 'lire')); } while ($i < $numr) { diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 8d108688cf5..d41472c6528 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -334,7 +334,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ); $menu_arr[] = array( 'name' => 'Bank', - 'link' => '/compta/bank/list.php?mainmenu=bank&leftmenu=', + 'link' => '/compta/bank/list.php?mainmenu=bank&leftmenu=&search_status=opened', 'title' => "MenuBankCash", 'level' => 0, 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), @@ -1989,10 +1989,10 @@ function get_left_menu_bank($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = // Bank-Cash account if (isModEnabled('bank')) { - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank&search_status=opened", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank&search_status=opened", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index c91dfd164bc..851690956a4 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -372,7 +372,7 @@ DateValidationAndLock=Date validation and lock ConfirmExportFile=Confirmation of the generation of the accounting export file ? ExportDraftJournal=Export draft journal Modelcsv=Model of export -Selectmodelcsv=Select a model of export +Selectmodelcsv=Select the default format for export Modelcsv_normal=Classic export Modelcsv_CEGID=Export for CEGID Expert Comptabilité Modelcsv_COALA=Export for Sage Coala diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 7ea503d532c..673f568a7e4 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1943,12 +1943,6 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select .divmainbodylarge { margin-left: 10px !important; margin-right: 10px !important; } - .tdoverflowonsmartphone { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ max-width: 100px; overflow: hidden; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 34f26193d76..bef0116fa62 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2098,12 +2098,6 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select .divmainbodylarge { margin-left: 10px; margin-right: 10px; } - .tdoverflowonsmartphone { - max-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } .tdoverflowmax100onsmartphone { /* For tdoverflow, the max-midth become a minimum ! */ max-width: 100px; overflow: hidden; diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 5a5c452e6ee..a8c74b3852b 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -345,7 +345,7 @@ if ($object->id > 0) { // Show break line print ''; // Picto and label of module - print ''; + print ''; print img_object('', $picto, 'class="pictoobjectwidth paddingright"').' '.$objMod->getName(); print ''; print ''; @@ -382,7 +382,7 @@ if ($object->id > 0) { // Picto and label of module - print ''; + print ''; print ''; //print img_object('', $picto, 'class="inline-block pictoobjectwidth"').' '.$objMod->getName(); print ''; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 6fda1372180..0dcb1182ba2 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -589,7 +589,7 @@ if ($result) { print ''; // Picto and label of module - print ''; + print ''; print ''; // Permission and tick (2 columns)