30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/societe/class/companybankaccount.class.php';
46$langs->loadLangs(array(
"admin",
"companies",
"bills",
"other",
"banks"));
48$action =
GETPOST(
'action',
'aZ09');
49$actionsave =
GETPOST(
'save',
'alpha');
50$value =
GETPOST(
'value',
'alpha');
51$label =
GETPOST(
'label',
'alpha');
52$scandir =
GETPOST(
'scan_dir',
'alpha');
66if (in_array($action, array(
'setBANK_DISABLE_DIRECT_INPUT'))) {
67 $constname = preg_replace(
'/^set/',
'', $action);
75 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
77 setEventMessages($langs->trans(
"Error"),
null,
'mesgs');
82if ($action ==
'setbankorder') {
90if ($action ==
'setreportlastnumreleve') {
95} elseif ($action ==
'unsetreportlastnumreleve') {
103if ($action ==
'setbankcolorizemovement') {
106 dol_print_error($db);
108} elseif ($action ==
'unsetbankcolorizemovement') {
111 dol_print_error($db);
124 $color =
GETPOST(
'BANK_COLORIZE_MOVEMENT_COLOR'.$i,
'alpha');
125 if ($color ==
'-1') {
138 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
141 if (empty($errorsaved)) {
142 setEventMessages($langs->trans(
"Error"),
null,
'errors');
148if ($action ==
'specimen') {
149 $modele =
GETPOST(
'module',
'alpha');
151 if ($modele ==
'sepamandate') {
161 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
162 foreach ($dirmodels as $reldir) {
163 $file =
dol_buildpath($reldir.
"core/modules/bank/doc/pdf_".$modele.
".modules.php", 0);
164 if (file_exists($file)) {
165 $classname =
"pdf_".$modele;
170 if ($classname !==
'') {
174 '@phan-var-force ModeleBankAccountDoc $module';
177 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=bank&file=SPECIMEN.pdf");
180 setEventMessages(
$module->error,
null,
'errors');
184 setEventMessages($langs->trans(
"ErrorModuleNotFound"),
null,
'errors');
185 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
190if ($action ==
'set') {
192} elseif ($action ==
'del') {
199} elseif ($action ==
'setdoc') {
204 $conf->global->BANKADDON_PDF = $value;
220$form =
new Form($db);
223$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
225llxHeader(
"", $langs->trans(
"BankSetupModule"),
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-bank');
227$linkback =
'<a href="'.dolBuildUrl(DOL_URL_ROOT.
'/admin/modules.php', [
'restore_lastsearch_values' => 1]).
'">'.img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
229print
load_fiche_titre($langs->trans(
"BankSetupModule"), $linkback,
'title_setup');
231print
'<form name="bankmovementcolorconfig" action="'.$_SERVER[
"PHP_SELF"].
'" method="post" spellcheck="false">';
232print
'<input type="hidden" name="token" value="'.newToken().
'">';
233print
'<input type="hidden" name="action" value="save">';
236print
dol_get_fiche_head($head,
'general', $langs->trans(
"BankSetupModule"), -1,
'account');
241print
'<div class="div-table-responsive-no-min">';
242print
'<table class="noborder centpercent">';
243print
'<tr class="liste_titre">';
244print
'<td>'.$langs->trans(
"Name").
'</td>';
245print
'<td class="minwidth100">'.$langs->trans(
"Description").
'</td>';
246print
'<td>'.$langs->trans(
"Example").
'</td>';
247print
'<td class="center">'.$langs->trans(
"Status").
'</td>';
251$bankorder[0][0] = $langs->trans(
"BankOrderGlobal");
252$bankorder[0][1] = $langs->trans(
"BankOrderGlobalDesc");
253$bankorder[0][2] =
'BankCode DeskCode BankAccountNumber BankAccountNumberKey';
254$bankorder[1][0] = $langs->trans(
"BankOrderES");
255$bankorder[1][1] = $langs->trans(
"BankOrderESDesc");
256$bankorder[1][2] =
'BankCode DeskCode BankAccountNumberKey BankAccountNumber';
260$nbofbank = count($bankorder);
261while ($i < $nbofbank) {
262 print
'<tr class="oddeven">';
263 print
'<td>'.$bankorder[$i][0].
"</td><td>\n";
264 print $bankorder[$i][1];
266 print
'<td class="nowrap">';
267 $tmparray = explode(
' ', $bankorder[$i][2]);
268 foreach ($tmparray as $key => $val) {
272 print $langs->trans($val);
277 print
'<td class="center">';
278 print img_picto($langs->trans(
"Activated"),
'on');
281 print
'<td class="center"><a href="'.$_SERVER[
'PHP_SELF'].
'?action=setbankorder&token='.
newToken().
'&value='.((int) $i).
'">';
282 print img_picto($langs->trans(
"Disabled"),
'off');
289print
'</table>'.
"\n";
299printDocumentModelList($type,
'bank',
'BANKADDON_PDF', $langs->trans(
"BankAccountModelModule"), array(
300 'Logo' =>
'option_logo',
301 'MultiLanguage' =>
'option_multilang',
308print
'<div class="div-table-responsive-no-min">';
309print
'<table class="noborder centpercent">'.
"\n";
310print
'<tr class="liste_titre">'.
"\n";
311print
'<td colspan="4">'.$langs->trans(
"Parameter").
'</td>';
312print
'<td align="center" width="75"></td>'.
"\n";
315print
'<tr class="oddeven"><td colspan="4">';
316print $langs->trans(
'BankColorizeMovementDesc');
320 print
'<td class="center">'.
"\n";
321 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetbankcolorizemovement&token='.
newToken().
'">';
322 print img_picto($langs->trans(
"Enabled"),
'switch_on');
326 print
'<td class="center">'.
"\n";
327 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setbankcolorizemovement&token='.
newToken().
'">'.img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
337 $color =
'BANK_COLORIZE_MOVEMENT_COLOR'.$key;
339 print
'<tr class="oddeven">';
342 print
'<td colspan="4" width="180" class="nowrap">'.$langs->trans(
"BankColorizeMovementName".$key).
"</td>";
344 print
'<td class="nowrap right">';
345 print $formother->selectColor((
GETPOST(
"BANK_COLORIZE_MOVEMENT_COLOR".$key) ?
GETPOST(
"BANK_COLORIZE_MOVEMENT_COLOR".$key) :
getDolGlobalString($color)),
"BANK_COLORIZE_MOVEMENT_COLOR".$key,
'', 1, array(),
'right hideifnotset');
363print
'<div class="div-table-responsive-no-min">';
364print
'<table class="noborder centpercent">'.
"\n";
365print
'<tr class="liste_titre">'.
"\n";
366print
'<td>'.$langs->trans(
"Parameter").
'</td>';
371print
'<tr class="oddeven">';
372print
'<td>'.$langs->trans(
"BANK_DISABLE_DIRECT_INPUT").
'</td>';
374 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setBANK_DISABLE_DIRECT_INPUT&value=0">';
375 print img_picto($langs->trans(
"Activated"),
'switch_on');
378 print
'<td class="center"><a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?token='.
newToken().
'&action=setBANK_DISABLE_DIRECT_INPUT&value=1">';
379 print img_picto($langs->trans(
"Disabled"),
'switch_off');
385print
'<tr class="oddeven"><td>'.
"\n";
386print $langs->trans(
'AutoReportLastAccountStatement');
390 print
'<td class="center">'.
"\n";
391 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetreportlastnumreleve&token='.
newToken().
'">';
392 print img_picto($langs->trans(
"Enabled"),
'switch_on');
396 print
'<td class="center">'.
"\n";
397 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setreportlastnumreleve&token='.
newToken().
'">'.img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
404 print
'<tr class="oddeven">';
405 print
'<td>'.$form->textwithpicto($langs->trans(
"AllowOnLineSign"), $langs->trans(
"AllowOnLineSignDesc")).
'</td>';
406 print
'<td class="center">';
407 print ajax_constantonoff(
'SOCIETE_RIB_ALLOW_ONLINESIGN', array(),
null, 0, 0, 0, 2, 0, 1,
'',
'',
'inline-block', 0, $langs->transnoentitiesnoconv(
"WarningOnlineSignature",
"https://www.dolistore.com"));
416print $form->buttonsSaveCancel(
"Save",
'');
if(! $sortfield) if(! $sortorder) $object
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
bank_admin_prepare_head($object=null)
Prepare array with list of tabs.
Class to manage bank accounts.
Class to manage bank accounts description of third parties.
if(! $sortfield) if(! $sortorder) $module
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.