32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
46$langs->loadLangs(array(
"admin",
"withdrawals"));
53$action =
GETPOST(
'action',
'aZ09');
54$type =
'paymentorder';
62if ($action ==
"set") {
67 if ($account->fetch(
$id) > 0) {
68 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT",
$id,
'chaine', 0,
'', $conf->entity);
96 if (
GETPOST(
"PAYMENTBYBANKTRANSFER_USER") > 0) {
97 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_USER",
GETPOST(
"PAYMENTBYBANKTRANSFER_USER"),
'chaine', 0,
'', $conf->entity);
114 if (
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS") !==
null &&
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS") !==
'') {
115 $res =
dolibarr_set_const($db,
"PAYMENTBYBANKTRANSFER_ADDDAYS",
GETPOST(
"PAYMENTBYBANKTRANSFER_ADDDAYS"),
'chaine', 0,
'', $conf->entity);
130if ($action ==
"addnotif") {
132 $bon->addNotification($db,
GETPOSTINT(
'user'), $action);
134 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
138if ($action ==
"deletenotif") {
140 $bon->deleteNotificationById(
GETPOSTINT(
'notif'));
142 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
151$form =
new Form($db);
153$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
155llxHeader(
'', $langs->trans(
"CreditTransferSetup"),
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-paymentbybanktransfer');
157$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>';
159print
load_fiche_titre($langs->trans(
"CreditTransferSetup"), $linkback,
'title_setup');
162print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'">';
163print
'<input type="hidden" name="token" value="'.newToken().
'">';
165print
'<table class="noborder centpercent">';
167print
'<tr class="liste_titre">';
168print
'<td>'.$langs->trans(
"Parameter").
'</td>';
173print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"BankToPayCreditTransfer").
'</td>';
175print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
176print $form->select_comptes(
getDolGlobalString(
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT'),
'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT', 0,
"courant=1", 1,
'', 0,
'minwidth200', 1);
188print
'<tr class="oddeven"><td class="fieldrequired">'.$langs->trans(
"ResponsibleUser").
'</td>';
190print
img_picto(
'',
'user',
'class="pictofixedwidth"');
191print $form->select_dolusers(
getDolGlobalString(
'PAYMENTBYBANKTRANSFER_USER'),
'PAYMENTBYBANKTRANSFER_USER', 1,
null, 0,
'',
'',
'0', 0, 0,
'', 0,
'',
'minwidth200 maxwidth500');
212print
'<tr class="oddeven"><td>'.$langs->trans(
"ADDDAYS").
'</td>';
213print
'<td class="left">';
214print
'<input type="number" name="PAYMENTBYBANKTRANSFER_ADDDAYS" value="' . $addDaysValue .
'" class="width50" min="0"></td>';
218print $form->buttonsSaveCancel(
"Save",
'');
$id
Support class for third parties, contacts, members, users or resources.
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).
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.
Class to manage bank accounts.
Class to manage withdrawal receipts.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a 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.