dolibarr/htdocs/admin/bank.php

559 lines
18 KiB
PHP
Raw Permalink Normal View History

<?php
2018-04-20 11:17:45 +02:00
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
2016-04-03 11:56:31 +02:00
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
2018-04-20 11:17:45 +02:00
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
2010-12-20 17:49:52 +01:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
2013-03-22 17:10:17 +01:00
* \file htdocs/admin/bank.php
* \ingroup bank
* \brief Page to setup the bank module
*/
2023-10-09 13:23:22 +02:00
2013-03-22 17:10:17 +01:00
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
add baseline exclude for phpstan (#31632) * add baseline exclude for phpstan * update * update * update * update * update * merge * restore one filter * delete old errors * fix * fix * fix * $moreforfilter can t be empty * fix * enable check * refresh baseline * add phpdoc * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
2018-05-26 18:41:16 +02:00
// Load translation files required by the page
$langs->loadLangs(array("admin", "companies", "bills", "other", "banks"));
2020-09-16 19:39:50 +02:00
$action = GETPOST('action', 'aZ09');
$actionsave = GETPOST('save', 'alpha');
$value = GETPOST('value', 'alpha');
$label = GETPOST('label', 'alpha');
$scandir = GETPOST('scan_dir', 'alpha');
2016-10-01 20:45:50 +02:00
$type = 'bankaccount';
2024-05-31 13:55:45 +02:00
if (!$user->admin) {
accessforbidden();
}
$error = 0;
/*
* Actions
*/
2024-05-31 13:55:45 +02:00
if (in_array($action, array('setBANK_DISABLE_DIRECT_INPUT'))) {
$constname = preg_replace('/^set/', '', $action);
$constvalue = GETPOSTINT('value');
$res = dolibarr_set_const($db, $constname, $constvalue, 'yesno', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
2019-09-20 07:02:14 +02:00
// Order display of bank account
if ($action == 'setbankorder') {
2021-02-26 22:04:03 +01:00
if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity) > 0) {
} else {
dol_print_error($db);
}
}
// Auto report last num releve on conciliate
if ($action == 'setreportlastnumreleve') {
2021-02-26 22:04:03 +01:00
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 1, 'chaine', 0, '', $conf->entity) > 0) {
} else {
dol_print_error($db);
}
2020-05-21 09:35:30 +02:00
} elseif ($action == 'unsetreportlastnumreleve') {
2021-02-26 22:04:03 +01:00
if (dolibarr_set_const($db, "BANK_REPORT_LAST_NUM_RELEVE", 0, 'chaine', 0, '', $conf->entity) > 0) {
} else {
dol_print_error($db);
}
}
// Colorize movements
if ($action == 'setbankcolorizemovement') {
2021-02-26 22:04:03 +01:00
if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 1, 'chaine', 0, '', $conf->entity) > 0) {
} else {
dol_print_error($db);
}
2020-05-21 09:35:30 +02:00
} elseif ($action == 'unsetbankcolorizemovement') {
2021-02-26 22:04:03 +01:00
if (dolibarr_set_const($db, "BANK_COLORIZE_MOVEMENT", 0, 'chaine', 0, '', $conf->entity) > 0) {
} else {
dol_print_error($db);
}
}
2021-02-26 22:04:03 +01:00
if ($actionsave) {
$db->begin();
2023-12-04 11:41:14 +01:00
$i = 1;
$errorsaved = 0;
$error = 0;
// Save colors
2021-02-26 22:04:03 +01:00
while ($i <= 2) {
$color = GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha');
2021-02-26 22:04:03 +01:00
if ($color == '-1') {
$color = '';
}
$res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
2021-02-26 22:04:03 +01:00
if (!($res > 0)) {
$error++;
}
$i++;
}
2021-02-26 22:04:03 +01:00
if (!$error) {
$db->commit();
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
$db->rollback();
2021-02-26 22:04:03 +01:00
if (empty($errorsaved)) {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
}
if ($action == 'specimen') {
$modele = GETPOST('module', 'alpha');
if ($modele == 'sepamandate') {
$object = new CompanyBankAccount($db);
} else {
$object = new Account($db);
}
$object->initAsSpecimen();
// Search template files
$file = '';
$classname = '';
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir) {
$file = dol_buildpath($reldir."core/modules/bank/doc/pdf_".$modele.".modules.php", 0);
if (file_exists($file)) {
$classname = "pdf_".$modele;
break;
}
}
if ($classname !== '') {
require_once $file;
$module = new $classname($db);
2024-03-24 21:35:36 +01:00
'@phan-var-force ModeleBankAccountDoc $module';
if ($module->write_file($object, $langs) > 0) {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=bank&file=SPECIMEN.pdf");
return;
} else {
setEventMessages($module->error, null, 'errors');
dol_syslog($module->error, LOG_ERR);
}
} else {
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
2016-10-01 20:45:50 +02:00
}
// Activate a model
if ($action == 'set') {
$ret = addDocumentModel($value, $type, $label, $scandir);
2020-05-21 09:35:30 +02:00
} elseif ($action == 'del') {
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
2021-02-26 22:04:03 +01:00
if ($conf->global->BANKADDON_PDF == "$value") {
dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity);
2021-02-26 22:04:03 +01:00
}
}
2021-02-26 22:04:03 +01:00
} elseif ($action == 'setdoc') {
// Set default model
if (dolibarr_set_const($db, "BANKADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
// The constant that was read before the new set
// We therefore requires a variable to have a coherent view
$conf->global->BANKADDON_PDF = $value;
}
// On active le modele
$ret = delDocumentModel($value, $type);
if ($ret > 0) {
$ret = addDocumentModel($value, $type, $label, $scandir);
}
2016-10-01 20:45:50 +02:00
}
/*
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
2016-10-01 20:45:50 +02:00
llxHeader("", $langs->trans("BankSetupModule"), '', '', 0, 0, '', '', '', 'mod-admin page-bank');
2016-10-01 20:45:50 +02:00
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
2019-03-14 11:48:25 +01:00
print load_fiche_titre($langs->trans("BankSetupModule"), $linkback, 'title_setup');
print '<form name="bankmovementcolorconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="save">';
2014-11-10 13:18:27 +01:00
$head = bank_admin_prepare_head(null);
2020-10-22 22:50:03 +02:00
print dol_get_fiche_head($head, 'general', $langs->trans("BankSetupModule"), -1, 'account');
2014-11-10 13:18:27 +01:00
//Show bank account order
2016-10-01 20:45:50 +02:00
print load_fiche_titre($langs->trans("BankOrderShow"), '', '');
2023-10-09 13:23:22 +02:00
print '<div class="div-table-responsive-no-min">';
2019-11-05 21:24:41 +01:00
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
2023-10-09 13:23:22 +02:00
print '<td>'.$langs->trans("Name").'</td>';
print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Example").'</td>';
print '<td class="center">'.$langs->trans("Status").'</td>';
print "</tr>\n";
Fix: Initialise array variables before assigning fields (#28725) * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields
2024-03-09 02:43:57 +01:00
$bankorder = array();
$bankorder[0][0] = $langs->trans("BankOrderGlobal");
$bankorder[0][1] = $langs->trans("BankOrderGlobalDesc");
$bankorder[0][2] = 'BankCode DeskCode BankAccountNumber BankAccountNumberKey';
$bankorder[1][0] = $langs->trans("BankOrderES");
$bankorder[1][1] = $langs->trans("BankOrderESDesc");
$bankorder[1][2] = 'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
$i = 0;
$nbofbank = count($bankorder);
while ($i < $nbofbank) {
print '<tr class="oddeven">';
print '<td>'.$bankorder[$i][0]."</td><td>\n";
print $bankorder[$i][1];
print '</td>';
print '<td class="nowrap">';
$tmparray = explode(' ', $bankorder[$i][2]);
foreach ($tmparray as $key => $val) {
2021-02-26 22:04:03 +01:00
if ($key > 0) {
print ', ';
2021-02-26 22:04:03 +01:00
}
print $langs->trans($val);
}
print "</td>\n";
if (getDolGlobalInt('BANK_SHOW_ORDER_OPTION') == $i) {
print '<td class="center">';
print img_picto($langs->trans("Activated"), 'on');
print '</td>';
} else {
2023-10-09 13:23:22 +02:00
print '<td class="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbankorder&token='.newToken().'&value='.((int) $i).'">';
print img_picto($langs->trans("Disabled"), 'off');
print '</a></td>';
}
print '</tr>'."\n";
$i++;
}
2010-12-20 17:49:52 +01:00
print '</table>'."\n";
2023-10-09 13:23:22 +02:00
print "</div>";
2016-10-01 20:45:50 +02:00
print '<br><br>';
/*
* Document templates generators
*/
2021-11-05 14:23:19 +01:00
2016-10-01 20:45:50 +02:00
print load_fiche_titre($langs->trans("BankAccountModelModule"), '', '');
// Load array def with activated templates
$def = array();
$sql = "SELECT nom";
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
2020-09-19 21:19:04 +02:00
$sql .= " WHERE type = '".$db->escape($type)."'";
$sql .= " AND entity = ".$conf->entity;
2016-10-01 20:45:50 +02:00
$resql = $db->query($sql);
if ($resql) {
$i = 0;
$num_rows = $db->num_rows($resql);
while ($i < $num_rows) {
$array = $db->fetch_array($resql);
if (is_array($array)) {
array_push($def, $array[0]);
}
$i++;
}
2020-05-21 09:35:30 +02:00
} else {
dol_print_error($db);
2016-10-01 20:45:50 +02:00
}
2023-10-09 13:23:22 +02:00
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'."\n";
2023-10-09 13:23:22 +02:00
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>';
2023-10-09 13:23:22 +02:00
print '<td class="minwidth100">'.$langs->trans("Description").'</td>';
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
2023-10-09 13:23:22 +02:00
print '</tr>'."\n";
2016-10-01 20:45:50 +02:00
clearstatcache();
foreach ($dirmodels as $reldir) {
foreach (array('', '/doc') as $valdir) {
$dir = dol_buildpath($reldir."core/modules/bank".$valdir);
if (is_dir($dir)) {
$handle = opendir($dir);
if (is_resource($handle)) {
Fix: Initialise array variables before assigning fields (#28725) * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields * Fix: Initialise array variables before assigning fields
2024-03-09 02:43:57 +01:00
$filelist = array();
while (($file = readdir($handle)) !== false) {
$filelist[] = $file;
}
closedir($handle);
arsort($filelist);
foreach ($filelist as $file) {
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
if (file_exists($dir.'/'.$file)) {
$name = substr($file, 4, dol_strlen($file) - 16);
$classname = substr($file, 0, dol_strlen($file) - 12);
require_once $dir.'/'.$file;
$module = new $classname($db);
Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563) * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint in phan config to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjects * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Fix: MemberNumRefNumbers getExample does not take any arguments Found thanks to adding the typing for phan! * Qual: Correct forced type for $module * Qual: Ignore phan false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Ignore false positive * Qual: phan/Ignore false positive, replace depr.prop with method * Qual: Fix typing for count by adding is_array check * Qual: replace depr.prop `nom` with method * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Fix depr.prop with getter and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: Improve typing for mymodule template * Make info method arguments match calls * Make PrintingDriver abstract class because we added abstract methods * Add phpdoc typing for phan * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update header wit correct information * Update getExample method signature * Update getExample method signature * Correct reference to class in comment * Force php phan typing for numbering modules * Correct $_GLOBALS to $GLOBALS * Add phpdoc to indicat type of properties * Correct default to null * Improve getNextValue typehint * Improve getNextValue typehint * Qual: Improve ModeleNumRefTakepos typing * Qual: Improve ModeleNumRefRecruitmentJobPosition typing * Fix default for $langs * Do not use non-existing ModeleNumRefTakepos::nom * Allow getNextValue argument to be null * Correct $_GLOBAL into $GLOBALS * Improve typing for ldap functions * Allow null for outputlangs argument * Improve typing for printOriginLine * Improve typing for linkedObject access * Fix PhanTypeMismatchArgumentNullableInternal and optimize * Fix PhanPossiblyUndeclaredVariable by setting default value * Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4 * getToolTip does not accept null, changed to '' * Improve getNextValue typing * Change PrintingDriver back to normal class (instantiated) And add errors for functions that should be overloaded * Adjust pringOriginLine typing to match parent * Fix phpdoc for getNextValue * Fix phan typing * Add/Improve phpdoc typing hints * Qual: Adjustments to match typing * Update typing for unit, use GETPOSTINT * ModeleNumRefTask needs Project * Fix several notices appearing after update from develop * Index for choices is int, use GETPOSTINT * Qual: Ignore empty foreach * Force BOMLine on object line * phan typing to indicate that linked objects are BOM * Type the correct variable name (phan) * Add typing for $langs * Type to CommonNumRefGenerator (no class for availabilities) * Resolve several phan notices after update from dev branch * Extra typing fixes * Move common attributes to parent class (phan) * Add typing to Calendar class * Improve typing hints * Add typing to pdf_eagle_proforma * Qual: Add typing for token in generic_oauthcallback.php * Add typing for objMod * Correct getNextValue function signature (phpstan) * Fix typing (phpstan) * Update version declarations (fix phpstan) * Fix phpstan typing issues * Adjust typing (phpstan) * Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
'@phan-var-force ModeleBankAccountDoc $module';
$modulequalified = 1;
2023-11-27 12:24:18 +01:00
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
$modulequalified = 0;
2021-02-26 22:04:03 +01:00
}
2023-11-27 12:24:18 +01:00
if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
$modulequalified = 0;
2021-02-26 22:04:03 +01:00
}
if ($modulequalified) {
print '<tr class="oddeven"><td width="100">';
print(empty($module->name) ? $name : $module->name);
print "</td><td>\n";
2021-02-26 22:04:03 +01:00
if (method_exists($module, 'info')) {
Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563) * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint in phan config to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjects * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Fix: MemberNumRefNumbers getExample does not take any arguments Found thanks to adding the typing for phan! * Qual: Correct forced type for $module * Qual: Ignore phan false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Ignore false positive * Qual: phan/Ignore false positive, replace depr.prop with method * Qual: Fix typing for count by adding is_array check * Qual: replace depr.prop `nom` with method * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Fix depr.prop with getter and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: Improve typing for mymodule template * Make info method arguments match calls * Make PrintingDriver abstract class because we added abstract methods * Add phpdoc typing for phan * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update header wit correct information * Update getExample method signature * Update getExample method signature * Correct reference to class in comment * Force php phan typing for numbering modules * Correct $_GLOBALS to $GLOBALS * Add phpdoc to indicat type of properties * Correct default to null * Improve getNextValue typehint * Improve getNextValue typehint * Qual: Improve ModeleNumRefTakepos typing * Qual: Improve ModeleNumRefRecruitmentJobPosition typing * Fix default for $langs * Do not use non-existing ModeleNumRefTakepos::nom * Allow getNextValue argument to be null * Correct $_GLOBAL into $GLOBALS * Improve typing for ldap functions * Allow null for outputlangs argument * Improve typing for printOriginLine * Improve typing for linkedObject access * Fix PhanTypeMismatchArgumentNullableInternal and optimize * Fix PhanPossiblyUndeclaredVariable by setting default value * Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4 * getToolTip does not accept null, changed to '' * Improve getNextValue typing * Change PrintingDriver back to normal class (instantiated) And add errors for functions that should be overloaded * Adjust pringOriginLine typing to match parent * Fix phpdoc for getNextValue * Fix phan typing * Add/Improve phpdoc typing hints * Qual: Adjustments to match typing * Update typing for unit, use GETPOSTINT * ModeleNumRefTask needs Project * Fix several notices appearing after update from develop * Index for choices is int, use GETPOSTINT * Qual: Ignore empty foreach * Force BOMLine on object line * phan typing to indicate that linked objects are BOM * Type the correct variable name (phan) * Add typing for $langs * Type to CommonNumRefGenerator (no class for availabilities) * Resolve several phan notices after update from dev branch * Extra typing fixes * Move common attributes to parent class (phan) * Add typing to Calendar class * Improve typing hints * Add typing to pdf_eagle_proforma * Qual: Add typing for token in generic_oauthcallback.php * Add typing for objMod * Correct getNextValue function signature (phpstan) * Fix typing (phpstan) * Update version declarations (fix phpstan) * Fix phpstan typing issues * Adjust typing (phpstan) * Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
2021-02-26 22:04:03 +01:00
} else {
print $module->description;
}
print '</td>';
// Active
if (in_array($name, $def)) {
print '<td class="center">'."\n";
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>';
print '</td>';
} else {
print '<td class="center">'."\n";
2024-08-17 17:00:36 +02:00
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&token='.newToken().'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>";
}
// Default
print '<td class="center">';
if (getDolGlobalString('BANKADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
}
print '</td>';
// Info
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
if ($module->type == 'pdf') {
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
}
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentMode") . ': ' . yn($module->option_modereg, 1, 1);
//$htmltooltip .= '<br>' . $langs->trans("PaymentConditions") . ': ' . yn($module->option_condreg, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
// $htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
// $htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
//$htmltooltip .= '<br>' . $langs->trans("WatermarkOnDraftOrders") . ': ' . yn($module->option_draft_watermark, 1, 1);
print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 'info');
print '</td>';
// Preview
print '<td class="center">';
if ($module->type == 'pdf') {
2020-12-03 13:19:35 +01:00
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
} else {
2025-01-08 17:45:28 +01:00
print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
}
print '</td>';
print "</tr>\n";
}
}
}
}
}
}
}
2016-10-01 20:45:50 +02:00
}
print '</table>';
2023-10-09 13:23:22 +02:00
print '</div>';
2016-10-01 20:45:50 +02:00
print '<br><br>';
print load_fiche_titre($langs->trans("BankColorizeMovement"), '', '');
2023-10-09 13:23:22 +02:00
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'."\n";
2023-10-09 13:23:22 +02:00
print '<tr class="liste_titre">'."\n";
2025-01-24 13:12:48 +01:00
print '<td colspan="4">'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="75"></td>'."\n";
print "</tr>\n";
2016-10-01 20:45:50 +02:00
2023-10-09 13:23:22 +02:00
print '<tr class="oddeven"><td colspan="4">';
print $langs->trans('BankColorizeMovementDesc');
print "</td>";
// Active
2023-06-05 13:56:57 +02:00
if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
print '<td class="center">'."\n";
2022-05-31 11:00:21 +02:00
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement&token='.newToken().'">';
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>';
print '</td>';
2020-05-21 09:35:30 +02:00
} else {
print '<td class="center">'."\n";
2022-05-31 11:00:21 +02:00
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>";
}
print "</tr>\n";
2023-06-05 13:56:57 +02:00
if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) {
$i = 1;
2021-02-26 22:04:03 +01:00
while ($i <= 2) {
$key = $i;
$color = 'BANK_COLORIZE_MOVEMENT_COLOR'.$key;
print '<tr class="oddeven">';
// Label
print '<td colspan="4" width="180" class="nowrap">'.$langs->trans("BankColorizeMovementName".$key)."</td>";
// Color
print '<td class="nowrap right">';
Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563) * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add typing hint in phan config to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint to fix phan notice. * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjectBlock * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for linkedObjects * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) # Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints) Add/improve typing hint for PhanPluginUnknownObjectMethodCall * Fix: MemberNumRefNumbers getExample does not take any arguments Found thanks to adding the typing for phan! * Qual: Correct forced type for $module * Qual: Ignore phan false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Ignore false positive * Qual: phan/Ignore false positive, replace depr.prop with method * Qual: Fix typing for count by adding is_array check * Qual: replace depr.prop `nom` with method * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Fix depr.prop with getter and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: phan/Correct module type and ignore false positive * Qual: Improve typing for mymodule template * Make info method arguments match calls * Make PrintingDriver abstract class because we added abstract methods * Add phpdoc typing for phan * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update getExample function signature for compatibility * Update header wit correct information * Update getExample method signature * Update getExample method signature * Correct reference to class in comment * Force php phan typing for numbering modules * Correct $_GLOBALS to $GLOBALS * Add phpdoc to indicat type of properties * Correct default to null * Improve getNextValue typehint * Improve getNextValue typehint * Qual: Improve ModeleNumRefTakepos typing * Qual: Improve ModeleNumRefRecruitmentJobPosition typing * Fix default for $langs * Do not use non-existing ModeleNumRefTakepos::nom * Allow getNextValue argument to be null * Correct $_GLOBAL into $GLOBALS * Improve typing for ldap functions * Allow null for outputlangs argument * Improve typing for printOriginLine * Improve typing for linkedObject access * Fix PhanTypeMismatchArgumentNullableInternal and optimize * Fix PhanPossiblyUndeclaredVariable by setting default value * Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4 * getToolTip does not accept null, changed to '' * Improve getNextValue typing * Change PrintingDriver back to normal class (instantiated) And add errors for functions that should be overloaded * Adjust pringOriginLine typing to match parent * Fix phpdoc for getNextValue * Fix phan typing * Add/Improve phpdoc typing hints * Qual: Adjustments to match typing * Update typing for unit, use GETPOSTINT * ModeleNumRefTask needs Project * Fix several notices appearing after update from develop * Index for choices is int, use GETPOSTINT * Qual: Ignore empty foreach * Force BOMLine on object line * phan typing to indicate that linked objects are BOM * Type the correct variable name (phan) * Add typing for $langs * Type to CommonNumRefGenerator (no class for availabilities) * Resolve several phan notices after update from dev branch * Extra typing fixes * Move common attributes to parent class (phan) * Add typing to Calendar class * Improve typing hints * Add typing to pdf_eagle_proforma * Qual: Add typing for token in generic_oauthcallback.php * Add typing for objMod * Correct getNextValue function signature (phpstan) * Fix typing (phpstan) * Update version declarations (fix phpstan) * Fix phpstan typing issues * Adjust typing (phpstan) * Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, array(), 'right hideifnotset');
print '</td>';
print "</tr>";
$i++;
}
}
print '</table>';
2023-10-09 13:23:22 +02:00
print '</div>';
print '<br><br>';
/*
* Document templates generators
*/
2021-11-05 14:23:19 +01:00
2018-12-04 13:09:58 +01:00
print load_fiche_titre($langs->trans("Other"), '', '');
2023-10-09 13:23:22 +02:00
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'."\n";
2023-10-09 13:23:22 +02:00
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Parameter").'</td>';
print "<td></td>\n";
print "</tr>\n";
// Disable direct input
2024-05-31 13:55:45 +02:00
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';
2024-05-31 13:55:45 +02:00
if (getDolGlobalString('BANK_DISABLE_DIRECT_INPUT')) {
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="center"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
// Autofill bank statement
print '<tr class="oddeven"><td>'."\n";
print $langs->trans('AutoReportLastAccountStatement');
print '</td>';
// Active
2023-06-05 13:56:57 +02:00
if (getDolGlobalString('BANK_REPORT_LAST_NUM_RELEVE')) {
print '<td class="center">'."\n";
2022-05-31 11:00:21 +02:00
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetreportlastnumreleve&token='.newToken().'">';
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>';
print '</td>';
2020-05-21 09:35:30 +02:00
} else {
print '<td class="center">'."\n";
2022-05-31 11:00:21 +02:00
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setreportlastnumreleve&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>";
}
print "</tr>\n";
// Allow SEPA Mandate OnLine Sign
2023-06-05 13:56:57 +02:00
if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT')) {
print '<tr class="oddeven">';
print '<td>'.$form->textwithpicto($langs->trans("AllowOnLineSign"), $langs->trans("AllowOnLineSignDesc")).'</td>';
2023-10-09 13:23:22 +02:00
print '<td class="center">';
print ajax_constantonoff('SOCIETE_RIB_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature"));
print '</td></tr>';
}
print '</table>';
2023-10-09 13:23:22 +02:00
print '</div>';
2020-10-27 18:19:31 +01:00
print dol_get_fiche_end();
2021-09-02 21:35:36 +02:00
print $form->buttonsSaveCancel("Save", '');
print "</form>\n";
2018-07-28 17:26:56 +02:00
// End of page
llxFooter();
$db->close();