29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
35 $langs->loadLangs(array(
"admin",
"withdrawals"));
42 $action =
GETPOST(
'action',
'aZ09');
43 $type =
'paymentorder';
50 if ($action ==
"set") {
53 $id =
GETPOST(
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT',
'int');
55 if ($account->fetch($id) > 0) {
56 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT", $id,
'chaine', 0,
'', $conf->entity);
84 if (
GETPOST(
"PAYMENTBYBANKTRANSFER_USER") > 0) {
85 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_USER",
GETPOST(
"PAYMENTBYBANKTRANSFER_USER"),
'chaine', 0,
'', $conf->entity);
102 if (
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS") ||
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS") ==
"") {
103 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_ADDDAYS",
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS"),
'chaine', 0,
'', $conf->entity);
116 if ($action ==
"addnotif") {
118 $bon->addNotification($db,
GETPOST(
'user',
'int'), $action);
120 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
124 if ($action ==
"deletenotif") {
126 $bon->deleteNotificationById(
GETPOST(
'notif',
'int'));
128 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
139 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
141 llxHeader(
'', $langs->trans(
"CreditTransferSetup"));
143 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
145 print
load_fiche_titre($langs->trans(
"CreditTransferSetup"), $linkback,
'title_setup');
148 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'">';
149 print
'<input type="hidden" name="token" value="'.newToken().
'">';
151 print
'<table class="noborder centpercent">';
153 print
'<tr class="liste_titre">';
154 print
'<td>'.$langs->trans(
"Parameter").
'</td>';
155 print
'<td>'.$langs->trans(
"Value").
'</td>';
159 print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"BankToPayCreditTransfer").
'</td>';
161 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
162 print
$form->select_comptes($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT,
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 0,
"courant=1", 1,
'', 0,
'minwidth200', 1);
174 print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"ResponsibleUser").
'</td>';
176 print
img_picto(
'',
'user',
'class="pictofixedwidth"');
177 print
$form->select_dolusers($conf->global->PAYMENTBYBANKTRANSFER_USER,
'PAYMENTBYBANKTRANSFER_USER', 1,
'', 0,
'',
'', 0, 0, 0,
'', 0,
'',
'minwidth200 maxwidth500');
196 print
'<tr class="oddeven"><td>'.$langs->trans(
"ADDDAYS").
'</td>';
197 print
'<td class="left">';
198 if (!$conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS) {
199 $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS = 0;
201 print
'<input type="text" name="PAYMENTBYBANKTRANSFER_ADDDAYS" value="'.$conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS.
'" class="width50"></td>';
205 print
$form->buttonsSaveCancel(
"Save",
'');
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).
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank accounts.
Class to manage withdrawal receipts.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.