29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
35$langs->loadLangs(array(
"admin",
"withdrawals"));
42$action =
GETPOST(
'action',
'aZ09');
43$type =
'paymentorder';
50if ($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);
116if ($action ==
"addnotif") {
118 $bon->addNotification($db,
GETPOST(
'user',
'int'), $action);
120 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
124if ($action ==
"deletenotif") {
126 $bon->deleteNotificationById(
GETPOST(
'notif',
'int'));
128 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
137$form =
new Form($db);
139$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
141llxHeader(
'', $langs->trans(
"CreditTransferSetup"));
143$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
145print
load_fiche_titre($langs->trans(
"CreditTransferSetup"), $linkback,
'title_setup');
148print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'">';
149print
'<input type="hidden" name="token" value="'.newToken().
'">';
151print
'<table class="noborder centpercent">';
153print
'<tr class="liste_titre">';
154print
'<td>'.$langs->trans(
"Parameter").
'</td>';
155print
'<td>'.$langs->trans(
"Value").
'</td>';
159print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"BankToPayCreditTransfer").
'</td>';
161print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
162print $form->select_comptes($conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT,
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 0,
"courant=1", 1,
'', 0,
'minwidth200', 1);
174print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"ResponsibleUser").
'</td>';
176print
img_picto(
'',
'user',
'class="pictofixedwidth"');
177print $form->select_dolusers($conf->global->PAYMENTBYBANKTRANSFER_USER,
'PAYMENTBYBANKTRANSFER_USER', 1,
'', 0,
'',
'', 0, 0, 0,
'', 0,
'',
'minwidth200 maxwidth500');
196print
'<tr class="oddeven"><td>'.$langs->trans(
"ADDDAYS").
'</td>';
197print
'<td class="left">';
198if (!$conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS) {
199 $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS = 0;
201print
'<input type="text" name="PAYMENTBYBANKTRANSFER_ADDDAYS" value="' .
getDolGlobalString(
'PAYMENTBYBANKTRANSFER_ADDDAYS').
'" class="width50"></td>';
205print $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.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.