28require
'../../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
36if (isModEnabled(
'project')) {
37 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
42$langs->loadLangs(array(
"compta",
"banks",
"bills",
"users",
"accountancy",
"categories"));
46$action =
GETPOST(
'action',
'alpha');
48$cancel =
GETPOST(
'cancel',
'aZ09');
49$backtopage =
GETPOST(
'backtopage',
'alpha');
51$accountid =
GETPOST(
"accountid") > 0 ?
GETPOST(
"accountid",
"int") : 0;
52$label =
GETPOST(
"label",
"alpha");
55$paymenttype =
GETPOST(
"paymenttype",
"aZ09");
56$accountancy_code =
GETPOST(
"accountancy_code",
"alpha");
57$projectid = (
GETPOST(
'projectid',
'int') ?
GETPOST(
'projectid',
'int') :
GETPOST(
'fk_project',
'int'));
59 $subledger_account =
GETPOST(
"subledger_account",
"alpha") > 0 ?
GETPOST(
"subledger_account",
"alpha") :
'';
61 $subledger_account =
GETPOST(
"subledger_account",
"alpha");
65$socid =
GETPOST(
"socid",
"int");
67 $socid = $user->socid;
74$hookmanager->initHooks(array(
'variouscard',
'globalcard'));
76$permissiontoadd = $user->hasRight(
'banque',
'modifier');
84$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
91 if ($action !=
'addlink' && $action !=
'setaccountancy_code' && $action !=
'setsubledger_account') {
92 $urltogo = $backtopage ? $backtopage :
dol_buildpath(
'/compta/bank/various_payment/list.php', 1);
93 header(
"Location: ".$urltogo);
96 if ($id > 0 || !empty($ref)) {
97 $ret = $object->fetch($id, $ref);
103 if ($action ==
'classin' && $permissiontoadd) {
105 $object->setProject(
GETPOST(
'projectid',
'int'));
108 if ($action ==
'add') {
118 $object->accountid =
GETPOST(
"accountid",
'int') > 0 ?
GETPOST(
"accountid",
"int") : 0;
119 $object->datev = $datev;
120 $object->datep = $datep;
122 $object->label =
GETPOST(
"label",
'restricthtml');
123 $object->note =
GETPOST(
"note",
'restricthtml');
125 $object->num_payment =
GETPOST(
"num_payment",
'alpha');
126 $object->chqemetteur =
GETPOST(
"chqemetteur",
'alpha');
127 $object->chqbank =
GETPOST(
"chqbank",
'alpha');
128 $object->fk_user_author = $user->id;
129 $object->category_transaction =
GETPOST(
"category_transaction",
'alpha');
131 $object->accountancy_code =
GETPOST(
"accountancy_code") > 0 ?
GETPOST(
"accountancy_code",
"alpha") :
"";
132 $object->subledger_account = $subledger_account;
135 $object->fk_project =
GETPOSTINT(
'fk_project');
137 if (empty($datep) || empty($datev)) {
138 $langs->load(
'errors');
139 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")),
null,
'errors');
142 if (empty($object->amount)) {
143 $langs->load(
'errors');
144 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Amount")),
null,
'errors');
147 if (isModEnabled(
"banque") && !$object->accountid > 0) {
148 $langs->load(
'errors');
149 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"BankAccount")),
null,
'errors');
152 if (empty($object->type_payment) || $object->type_payment < 0) {
153 $langs->load(
'errors');
154 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"PaymentMode")),
null,
'errors');
157 if (isModEnabled(
'accounting') && !$object->accountancy_code) {
158 $langs->load(
'errors');
159 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountAccounting")),
null,
'errors');
162 if ($object->sens < 0) {
163 $langs->load(
'errors');
164 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Sens")),
null,
'errors');
171 $ret = $object->create($user);
174 $urltogo = ($backtopage ? $backtopage : DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
175 header(
"Location: ".$urltogo);
187 if ($action ==
'confirm_delete' && $confirm ==
'yes') {
188 $result = $object->fetch($id);
190 if ($object->rappro == 0) {
193 $ret = $object->delete($user);
195 if ($object->fk_bank) {
197 $result = $accountline->fetch($object->fk_bank);
199 $result = $accountline->delete($user);
205 header(
"Location: ".DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
208 $object->error = $accountline->error;
217 setEventMessages(
'Error try do delete a line linked to a conciliated bank transaction',
null,
'errors');
221 if ($action ==
'setaccountancy_code') {
224 $result = $object->fetch($id);
226 $object->accountancy_code =
GETPOST(
'accountancy_code',
'alphanohtml');
228 $res = $object->update($user);
237 if ($action ==
'setsubledger_account') {
240 $result = $object->fetch($id);
242 $object->subledger_account = $subledger_account;
244 $res = $object->update($user);
255if ($action ==
'confirm_clone' && $confirm !=
'yes') {
259if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
266 if ($object->id > 0) {
267 $object->id = $object->ref =
null;
269 if (
GETPOST(
'clone_label',
'alphanohtml')) {
270 $object->label =
GETPOST(
'clone_label',
'alphanohtml');
272 $object->label = $langs->trans(
"CopyOf").
' '.$object->label;
275 $newdatepayment =
dol_mktime(0, 0, 0,
GETPOST(
'clone_date_paymentmonth',
'int'),
GETPOST(
'clone_date_paymentday',
'int'),
GETPOST(
'clone_date_paymentyear',
'int'));
276 $newdatevalue =
dol_mktime(0, 0, 0,
GETPOST(
'clone_date_valuemonth',
'int'),
GETPOST(
'clone_date_valueday',
'int'),
GETPOST(
'clone_date_valueyear',
'int'));
277 if ($newdatepayment) {
278 $object->datep = $newdatepayment;
280 if (!empty($newdatevalue)) {
281 $object->datev = $newdatevalue;
283 $object->datev = $newdatepayment;
286 if (GETPOSTISSET(
"clone_sens")) {
287 $object->sens =
GETPOST(
"clone_sens",
'int');
289 $object->sens = $object->sens;
292 if (
GETPOST(
"clone_amount",
"alpha")) {
295 $object->amount =
price2num($object->amount);
298 if ($object->check()) {
299 $id = $object->create($user);
304 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$id);
328$form =
new Form($db);
329if (isModEnabled(
'accounting')) {
332if (isModEnabled(
'project')) {
338 $result = $object->fetch($id);
345$title = $object->ref.
" - ".$langs->trans(
'Card');
346if ($action ==
'create') {
347 $title = $langs->trans(
"NewVariousPayment");
349$help_url =
'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
355require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/bankcateg.class.php';
358foreach ($bankcateg->fetchAll() as $bankcategory) {
359 $options[$bankcategory->id] = $bankcategory->label;
363if ($action ==
'create') {
365 if (!empty($conf->use_javascript_ajax)) {
366 print
"\n".
'<script type="text/javascript">';
367 print
'$(document).ready(function () {
369 $("#selectpaymenttype").change(function() {
372 function setPaymentType()
374 console.log("setPaymentType");
375 var code = $("#selectpaymenttype option:selected").val();
376 if (code == \'CHQ\' || code == \'VIR\')
380 $(\'.fieldrequireddyn\').addClass(\'fieldrequired\');
382 if ($(\'#fieldchqemetteur\').val() == \'\')
384 var emetteur = jQuery(\'#thirdpartylabel\').val();
385 $(\'#fieldchqemetteur\').val(emetteur);
390 $(\'.fieldrequireddyn\').removeClass(\'fieldrequired\');
391 $(\'#fieldchqemetteur\').val(\'\');
398 print
' </script>'.
"\n";
401 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
402 print
'<input type="hidden" name="token" value="'.newToken().
'">';
403 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
404 print
'<input type="hidden" name="action" value="add">';
406 print
load_fiche_titre($langs->trans(
"NewVariousPayment"),
'',
'object_payment');
410 print
'<table class="border centpercent">';
413 print
'<tr><td class="titlefieldcreate">';
414 print $form->editfieldkey(
'DatePayment',
'datep',
'', $object, 0,
'string',
'', 1).
'</td><td>';
415 print $form->selectDate((empty($datep) ? -1 : $datep),
"datep",
'',
'',
'',
'add', 1, 1);
420 print $form->editfieldkey(
'DateValue',
'datev',
'', $object, 0).
'</td><td>';
421 print $form->selectDate((empty($datev) ? -1 : $datev),
"datev",
'',
'',
'',
'add', 1, 1);
426 print $form->editfieldkey(
'Label',
'label',
'', $object, 0,
'string',
'', 1).
'</td><td>';
427 print
'<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans(
"VariousPayment")).
'">';
432 print $form->editfieldkey(
'Amount',
'amount',
'', $object, 0,
'string',
'', 1).
'</td><td>';
433 print
'<input name="amount" id="amount" class="minwidth50 maxwidth100" value="'.$amount.
'">';
437 if (isModEnabled(
"banque")) {
439 print $form->editfieldkey(
'BankAccount',
'selectaccountid',
'', $object, 0,
'string',
'', 1).
'</td><td>';
440 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
441 print $form->select_comptes($accountid,
"accountid", 0,
'', 2,
'', 0,
'', 1);
446 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'PaymentMode').
'</span></td><td>';
447 $form->select_types_paiements($paymenttype,
'paymenttype',
'', 2);
452 if (isModEnabled(
"banque")) {
453 print
'<tr><td><label for="num_payment">'.$langs->trans(
'Numero');
454 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
455 print
'</label></td>';
456 print
'<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST(
"num_payment").
'"></td></tr>'.
"\n";
459 print
'<tr><td class="'.(GETPOST(
'paymenttype') ==
'CHQ' ?
'fieldrequired ' :
'').
'fieldrequireddyn"><label for="fieldchqemetteur">'.$langs->trans(
'CheckTransmitter');
460 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
461 print
'</label></td>';
462 print
'<td><input id="fieldchqemetteur" name="chqemetteur" size="30" type="text" value="'.GETPOST(
'chqemetteur',
'alphanohtml').
'"></td></tr>';
465 print
'<tr><td><label for="chqbank">'.$langs->trans(
'Bank');
466 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
467 print
'</label></td>';
468 print
'<td><input id="chqbank" name="chqbank" size="30" type="text" value="'.GETPOST(
'chqbank',
'alphanohtml').
'"></td></tr>';
472 if (isModEnabled(
'accounting')) {
474 print
'<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans(
"AccountAccounting").
'</td>';
476 print $formaccounting->select_account($accountancy_code,
'accountancy_code', 1,
null, 1, 1);
479 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"AccountAccounting").
'</td>';
480 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.
'">';
485 if (isModEnabled(
'accounting')) {
486 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
489 print $formaccounting->select_auxaccount($subledger_account,
'subledger_account', 1,
'');
491 print
'<input type="text" class="maxwidth200 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
495 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
496 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
502 $labelsens = $form->textwithpicto($langs->trans(
'Sens'), $langs->trans(
"AccountingDirectionHelp"));
503 print $form->editfieldkey($labelsens,
'sens',
'', $object, 0,
'string',
'', 1).
'</td><td>';
504 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
505 print $form->selectarray(
'sens', $sensarray, $sens, 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth100', 1);
509 if (isModEnabled(
'project')) {
513 $langs->load(
"projects");
515 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
516 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
517 print $formproject->select_projects(-1, $projectid,
'fk_project', 0, 0, 1, 1, 0, 0, 0,
'', 1);
522 $parameters = array();
523 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
524 print $hookmanager->resPrint;
527 if (is_array($options) && count($options) && $conf->categorie->enabled) {
528 print
'<tr><td>'.$langs->trans(
"RubriquesTransactions").
'</td><td>';
529 print
img_picto(
'',
'category').Form::selectarray(
'category_transaction', $options,
GETPOST(
'category_transaction'), 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth300', 1);
537 print $form->buttonsSaveCancel();
550 $alreadyaccounted = $object->getVentilExportCompta();
555 if ($action ===
'clone') {
556 $set_value_help = $form->textwithpicto(
'', $langs->trans($langs->trans(
"AccountingDirectionHelp")));
557 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
559 $formquestion = array(
560 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.$object->label),
561 array(
'type' =>
'date',
'tdclass'=>
'fieldrequired',
'name' =>
'clone_date_payment',
'label' => $langs->trans(
"DatePayment"),
'value' => -1),
562 array(
'type' =>
'date',
'name' =>
'clone_date_value',
'label' => $langs->trans(
"DateValue"),
'value' => -1),
563 array(
'type' =>
'other',
'tdclass'=>
'fieldrequired',
'name' =>
'clone_accountid',
'label' => $langs->trans(
"BankAccount"),
'value' => $form->select_comptes($object->fk_account,
"accountid", 0,
'', 1,
'', 0,
'minwidth200', 1)),
564 array(
'type' =>
'text',
'name' =>
'clone_amount',
'label' => $langs->trans(
"Amount"),
'value' =>
price($object->amount)),
565 array(
'type' =>
'select',
'name' =>
'clone_sens',
'label' => $langs->trans(
"Sens").
' '.$set_value_help,
'values' => $sensarray,
'default' => $object->sens),
568 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneVariousPayment', $object->ref),
'confirm_clone', $formquestion,
'yes', 1, 350);
572 if ($action ==
'delete') {
573 $text = $langs->trans(
'ConfirmDeleteVariousPayment');
574 print $form->formconfirm($_SERVER[
'PHP_SELF'].
'?id='.$object->id, $langs->trans(
'DeleteVariousPayment'), $text,
'confirm_delete',
'',
'', 2);
577 print
dol_get_fiche_head($head,
'card', $langs->trans(
"VariousPayment"), -1, $object->picto);
579 $morehtmlref =
'<div class="refidno">';
581 if (isModEnabled(
'project')) {
582 $langs->load(
"projects");
584 if ($permissiontoadd) {
585 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
586 if ($action !=
'classify') {
587 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.newToken().
'&id='.$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
589 if ($action ==
'classify') {
591 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'">';
592 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
593 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
594 $morehtmlref .= $formproject->select_projects(-1, $object->fk_project,
'projectid', 0, 0, 1, 1, 0, 0, 0,
'', 1, 0,
'maxwidth500 widthcentpercentminusxx');
595 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
596 $morehtmlref .=
'</form>';
598 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.$object->id, (property_exists($object,
'socid') ? $object->socid : 0), $object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
601 if (!empty($object->fk_project)) {
603 $proj->fetch($object->fk_project);
604 $morehtmlref .= $proj->getNomUrl(1);
606 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
612 $morehtmlref .=
'</div>';
613 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/various_payment/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
617 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlright);
619 print
'<div class="fichecenter">';
620 print
'<div class="underbanner clearboth"></div>';
622 print
'<table class="border centpercent tableforfield">';
625 print
'<tr><td class="titlefield">'.$langs->trans(
"Label").
'</td><td>'.$object->label.
'</td></tr>';
629 print
'<td>'.$langs->trans(
"DatePayment").
'</td><td>';
634 print
'<tr><td>'.$langs->trans(
"DateValue").
'</td><td>';
639 if ($object->sens ==
'1') {
640 $sens = $langs->trans(
"Credit");
642 $sens = $langs->trans(
"Debit");
644 print
'<tr><td>'.$langs->trans(
"Sens").
'</td><td>'.$sens.
'</td></tr>';
646 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td><span class="amount">'.
price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).
'</span></td></tr>';
650 if (isModEnabled(
'accounting')) {
651 print
'<tr><td class="nowrap">';
652 print $form->editfieldkey(
'AccountAccounting',
'accountancy_code', $object->accountancy_code, $object, (!$alreadyaccounted && $user->hasRight(
'banque',
'modifier')),
'string',
'', 0);
654 if ($action ==
'editaccountancy_code') {
655 print $form->editfieldval(
'AccountAccounting',
'accountancy_code', $object->accountancy_code, $object, (!$alreadyaccounted && $user->hasRight(
'banque',
'modifier')),
'string',
'', 0);
658 $accountingaccount->fetch(
'', $object->accountancy_code, 1);
660 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
664 print
'<tr><td class="nowrap">';
665 print $langs->trans(
"AccountAccounting");
667 print $object->accountancy_code;
672 print
'<tr><td class="nowrap">';
673 print $form->editfieldkey(
'SubledgerAccount',
'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
675 print $form->editfieldval(
'SubledgerAccount',
'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0,
null,
'', 1,
'lengthAccounta');
678 $bankaccountnotfound = 0;
680 if (isModEnabled(
'banque')) {
682 print
'<td>'.$langs->trans(
'BankTransactionLine').
'</td>';
683 print
'<td colspan="3">';
684 if ($object->fk_bank > 0) {
686 $result = $bankline->fetch($object->fk_bank);
689 $bankaccountnotfound = 1;
691 print $bankline->getNomUrl(1, 0,
'showall');
694 $bankaccountnotfound = 1;
696 print
'<span class="opacitymedium">'.$langs->trans(
"NoRecordfound").
'</span>';
703 $parameters = array(
'socid'=>$object->id);
704 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
710 print
'<div class="clearboth"></div>';
718 print
'<div class="tabsAction">'.
"\n";
724 if ($permissiontoadd) {
725 print
'<div class="inline-block divButAction"><a class="butAction" href="'.dol_buildpath(
"/compta/bank/various_payment/card.php", 1).
'?id='.$object->id.
'&action=clone">'.$langs->trans(
"ToClone").
"</a></div>";
729 if (empty($object->rappro) || $bankaccountnotfound) {
730 if ($permissiontoadd) {
731 if ($alreadyaccounted) {
732 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"Accounted").
'">'.$langs->trans(
"Delete").
'</a></div>';
734 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.
'&action=delete&token='.newToken().
'">'.$langs->trans(
"Delete").
'</a></div>';
737 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans(
"NotAllowed"))).
'">'.$langs->trans(
"Delete").
'</a></div>';
740 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"LinkedToAConciliatedTransaction").
'">'.$langs->trans(
"Delete").
'</a></div>';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
various_payment_prepare_head($object)
Prepare array with list of tabs.
Class to manage bank transaction lines.
Class to manage accounting accounts.
Class to manage bank categories.
Class to manage various payments.
Class to manage projects.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return value of a param into GET or POST supervariable.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='')
Return an id or code from a code or id.
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.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.