25 require
'../../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
33 if (!empty($conf->projet->enabled)) {
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
39 $langs->loadLangs(array(
"compta",
"banks",
"bills",
"users",
"accountancy",
"categories"));
43 $action =
GETPOST(
'action',
'alpha');
45 $cancel =
GETPOST(
'cancel',
'aZ09');
46 $backtopage =
GETPOST(
'backtopage',
'alpha');
48 $accountid =
GETPOST(
"accountid") > 0 ?
GETPOST(
"accountid",
"int") : 0;
49 $label =
GETPOST(
"label",
"alpha");
52 $paymenttype =
GETPOST(
"paymenttype",
"aZ09");
53 $accountancy_code =
GETPOST(
"accountancy_code",
"alpha");
54 $projectid = (
GETPOST(
'projectid',
'int') ?
GETPOST(
'projectid',
'int') :
GETPOST(
'fk_project',
'int'));
55 if (!empty($conf->accounting->enabled) && !empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
56 $subledger_account =
GETPOST(
"subledger_account",
"alpha") > 0 ?
GETPOST(
"subledger_account",
"alpha") :
'';
58 $subledger_account =
GETPOST(
"subledger_account",
"alpha");
62 $socid =
GETPOST(
"socid",
"int");
63 if ($user->socid) $socid = $user->socid;
69 $hookmanager->initHooks(array(
'variouscard',
'globalcard'));
76 $parameters = array();
77 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
78 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
83 if ($action ==
'classin' && $user->rights->banque->modifier)
86 $object->setProject(
GETPOST(
'projectid'));
91 if ($action !=
'addlink')
93 $urltogo = $backtopage ? $backtopage :
dol_buildpath(
'/compta/bank/various_payment/list.php', 1);
94 header(
"Location: ".$urltogo);
97 if ($id > 0 || !empty($ref)) $ret = $object->fetch($id, $ref);
101 if ($action ==
'add')
107 if (empty($datev)) $datev = $datep;
110 $object->accountid =
GETPOST(
"accountid",
'int') > 0 ?
GETPOST(
"accountid",
"int") : 0;
111 $object->datev = $datev;
112 $object->datep = $datep;
114 $object->label =
GETPOST(
"label",
'restricthtml');
115 $object->note =
GETPOST(
"note",
'restricthtml');
117 $object->num_payment =
GETPOST(
"num_payment",
'alpha');
118 $object->chqemetteur =
GETPOST(
"chqemetteur",
'alpha');
119 $object->chqbank =
GETPOST(
"chqbank",
'alpha');
120 $object->fk_user_author = $user->id;
121 $object->category_transaction =
GETPOST(
"category_transaction",
'alpha');
123 $object->accountancy_code =
GETPOST(
"accountancy_code") > 0 ?
GETPOST(
"accountancy_code",
"alpha") :
"";
124 $object->subledger_account = $subledger_account;
127 $object->fk_project =
GETPOSTINT(
'fk_project');
129 if (empty($datep) || empty($datev))
131 $langs->load(
'errors');
132 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")), null,
'errors');
135 if (empty($object->amount))
137 $langs->load(
'errors');
138 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Amount")), null,
'errors');
141 if (!empty($conf->banque->enabled) && !$object->accountid > 0)
143 $langs->load(
'errors');
144 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"BankAccount")), null,
'errors');
147 if (empty($object->type_payment) || $object->type_payment < 0)
149 $langs->load(
'errors');
150 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"PaymentMode")), null,
'errors');
153 if (!empty($conf->accounting->enabled) && !$object->accountancy_code)
155 $langs->load(
'errors');
156 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountAccounting")), null,
'errors');
159 if ($object->sens < 0)
161 $langs->load(
'errors');
162 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Sens")), null,
'errors');
170 $ret = $object->create($user);
174 $urltogo = ($backtopage ? $backtopage : DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
175 header(
"Location: ".$urltogo);
187 if ($action ==
'delete')
189 $result = $object->fetch($id);
191 if ($object->rappro == 0)
195 $ret = $object->delete($user);
198 if ($object->fk_bank)
201 $result = $accountline->fetch($object->fk_bank);
202 if ($result > 0) $result = $accountline->delete($user);
208 header(
"Location: ".DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
211 $object->error = $accountline->error;
220 setEventMessages(
'Error try do delete a line linked to a conciliated bank transaction', null,
'errors');
224 if ($action ==
'setsubledger_account') {
227 $result = $object->fetch($id);
229 $object->subledger_account = $subledger_account;
231 $res = $object->update($user);
242 if ($action ==
'confirm_clone' && $confirm !=
'yes') { $action =
''; }
244 if ($action ==
'confirm_clone' && $confirm ==
'yes' && ($user->rights->banque->modifier))
254 $object->id = $object->ref = null;
256 if (
GETPOST(
'clone_label',
'alphanohtml')) {
257 $object->label =
GETPOST(
'clone_label',
'alphanohtml');
259 $object->label = $langs->trans(
"CopyOf").
' '.$object->label;
262 $newdatepayment =
dol_mktime(0, 0, 0,
GETPOST(
'clone_date_paymentmonth',
'int'),
GETPOST(
'clone_date_paymentday',
'int'),
GETPOST(
'clone_date_paymentyear',
'int'));
263 $newdatevalue =
dol_mktime(0, 0, 0,
GETPOST(
'clone_date_valuemonth',
'int'),
GETPOST(
'clone_date_valueday',
'int'),
GETPOST(
'clone_date_valueyear',
'int'));
264 if ($newdatepayment) $object->datep = $newdatepayment;
265 if (!empty($newdatevalue)) {
266 $object->datev = $newdatevalue;
268 $object->datev = $newdatepayment;
272 $object->sens =
GETPOST(
"clone_sens",
'int');
274 $object->sens = $object->sens;
277 if (
GETPOST(
"clone_amount",
"alpha")) {
280 $object->amount =
price2num($object->amount);
283 if ($object->check())
285 $id = $object->create($user);
291 header(
"Location: ".
$_SERVER[
"PHP_SELF"].
"?id=".$id);
316 llxHeader(
"", $langs->trans(
"VariousPayment"));
318 $form =
new Form($db);
319 if (!empty($conf->accounting->enabled)) $formaccounting =
new FormAccounting($db);
320 if (!empty($conf->projet->enabled)) $formproject =
new FormProjets($db);
325 $result = $object->fetch($id);
336 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/bankcateg.class.php';
339 foreach ($bankcateg->fetchAll() as $bankcategory) {
340 $options[$bankcategory->id] = $bankcategory->label;
348 if ($action ==
'create')
351 if (!empty($conf->use_javascript_ajax))
353 print "\n".
'<script type="text/javascript" language="javascript">';
354 print '$(document).ready(function () {
356 $("#selectpaymenttype").change(function() {
359 function setPaymentType()
361 var code = $("#selectpaymenttype option:selected").val();
362 if (code == \'CHQ\' || code == \'VIR\')
366 $(\'.fieldrequireddyn\').addClass(\'fieldrequired\');
368 if ($(\'#fieldchqemetteur\').val() == \'\')
370 var emetteur = jQuery(\'#thirdpartylabel\').val();
371 $(\'#fieldchqemetteur\').val(emetteur);
376 $(\'.fieldrequireddyn\').removeClass(\'fieldrequired\');
377 $(\'#fieldchqemetteur\').val(\'\');
384 print ' </script>'.
"\n";
387 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
388 print '<input type="hidden" name="token" value="'.newToken().
'">';
389 print '<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
390 print '<input type="hidden" name="action" value="add">';
396 print '<table class="border centpercent">';
399 print '<tr><td class="titlefieldcreate">';
400 print $form->editfieldkey(
'DatePayment',
'datep',
'', $object, 0,
'string',
'', 1).
'</td><td>';
401 print $form->selectDate((empty($datep) ?-1 : $datep),
"datep",
'',
'',
'',
'add', 1, 1);
406 print $form->editfieldkey(
'DateValue',
'datev',
'', $object, 0).
'</td><td>';
407 print $form->selectDate((empty($datev) ?-1 : $datev),
"datev",
'',
'',
'',
'add', 1, 1);
412 print $form->editfieldkey(
'Label',
'label',
'', $object, 0,
'string',
'', 1).
'</td><td>';
413 print '<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans(
"VariousPayment")).
'">';
418 print $form->editfieldkey(
'Amount',
'amount',
'', $object, 0,
'string',
'', 1).
'</td><td>';
419 print
'<input name="amount" id="amount" class="minwidth100 maxwidth150onsmartphone" value="'.$amount.
'">';
423 if (!empty($conf->banque->enabled))
426 print $form->editfieldkey(
'BankAccount',
'selectaccountid',
'', $object, 0,
'string',
'', 1).
'</td><td>';
427 $form->select_comptes($accountid,
"accountid", 0,
'', 2);
432 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'PaymentMode').
'</span></td><td>';
433 $form->select_types_paiements($paymenttype,
'paymenttype',
'', 2);
438 print
'<tr><td><label for="num_payment">'.$langs->trans(
'Numero');
439 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
440 print
'</label></td>';
441 print
'<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST(
"num_payment").
'"></td></tr>'.
"\n";
444 print
'<tr><td class="'.(GETPOST(
'paymenttype') ==
'CHQ' ?
'fieldrequired ' :
'').
'fieldrequireddyn"><label for="fieldchqemetteur">'.$langs->trans(
'CheckTransmitter');
445 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
446 print
'</label></td>';
447 print
'<td><input id="fieldchqemetteur" name="chqemetteur" size="30" type="text" value="'.GETPOST(
'chqemetteur',
'alphanohtml').
'"></td></tr>';
450 print
'<tr><td><label for="chqbank">'.$langs->trans(
'Bank');
451 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
452 print
'</label></td>';
453 print
'<td><input id="chqbank" name="chqbank" size="30" type="text" value="'.GETPOST(
'chqbank',
'alphanohtml').
'"></td></tr>';
456 if (!empty($conf->accounting->enabled)) {
458 print
'<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans(
"AccountAccounting").
'</td>';
460 print $formaccounting->select_account($accountancy_code,
'accountancy_code', 1, null, 1, 1);
463 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"AccountAccounting").
'</td>';
464 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.
'">';
469 if (!empty($conf->accounting->enabled)) {
470 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
472 if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
473 print $formaccounting->select_auxaccount($subledger_account,
'subledger_account', 1,
'');
475 print
'<input type="text" class="maxwidth200 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
479 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
480 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
486 $labelsens = $form->textwithpicto(
'Sens', $langs->trans(
"AccountingDirectionHelp"));
487 print $form->editfieldkey($labelsens,
'sens',
'', $object, 0,
'string',
'', 1).
'</td><td>';
488 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
489 print $form->selectarray(
'sens', $sensarray, $sens, 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth100', 1);
493 if (!empty($conf->projet->enabled))
498 $langs->load(
"projects");
500 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
502 $numproject = $formproject->select_projects(-1, $projectid,
'fk_project', 0, 0, 1, 1);
508 $parameters = array();
509 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
510 print $hookmanager->resPrint;
513 if (is_array($options) && count($options) && $conf->categorie->enabled) {
514 print
'<tr><td>'.$langs->trans(
"RubriquesTransactions").
'</td><td>';
515 print
img_picto(
'',
'category').Form::selectarray(
'category_transaction', $options,
GETPOST(
'category_transaction'), 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth300', 1);
523 print
'<div class="center">';
524 print
'<input type="submit" class="button button-save" value="'.$langs->trans(
"Save").
'">';
526 print
'<input type="button" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'" onclick="javascript:history.go(-1)">';
541 $alreadyaccounted = $object->getVentilExportCompta();
546 if ($action ===
'clone')
548 $set_value_help = $form->textwithpicto(
'', $langs->trans($langs->trans(
"AccountingDirectionHelp")));
549 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
551 $formquestion = array(
552 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.$object->label),
553 array(
'type' =>
'date',
'tdclass'=>
'fieldrequired',
'name' =>
'clone_date_payment',
'label' => $langs->trans(
"DatePayment"),
'value' => -1),
554 array(
'type' =>
'date',
'name' =>
'clone_date_value',
'label' => $langs->trans(
"DateValue"),
'value' => -1),
555 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)),
556 array(
'type' =>
'text',
'name' =>
'clone_amount',
'label' => $langs->trans(
"Amount"),
'value' =>
price($object->amount)),
557 array(
'type' =>
'select',
'name' =>
'clone_sens',
'label' => $langs->trans(
"Sens") .
' ' . $set_value_help,
'values' => $sensarray,
'default' => $object->sens),
560 print $form->formconfirm(
$_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneVariousPayment', $object->ref),
'confirm_clone', $formquestion,
'yes', 1, 350);
563 print
dol_get_fiche_head($head,
'card', $langs->trans(
"VariousPayment"), -1, $object->picto);
565 $morehtmlref =
'<div class="refidno">';
567 if (!empty($conf->projet->enabled))
569 $langs->load(
"projects");
570 $morehtmlref .= $langs->trans(
'Project').
' ';
571 if ($user->rights->banque->modifier)
573 if ($action !=
'classify') {
574 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&id='.$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> : ';
576 if ($action ==
'classify') {
578 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'">';
579 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
580 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
581 $morehtmlref .= $formproject->select_projects(0, $object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
582 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
583 $morehtmlref .=
'</form>';
585 $morehtmlref .= $form->form_project(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->socid, $object->fk_project,
'none', 0, 0, 0, 1);
588 if (!empty($object->fk_project)) {
590 $proj->fetch($object->fk_project);
591 $morehtmlref .= $proj->getNomUrl(1);
597 $morehtmlref .=
'</div>';
598 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/various_payment/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
600 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlright);
602 print
'<div class="fichecenter">';
603 print
'<div class="underbanner clearboth"></div>';
605 print
'<table class="border centpercent tableforfield">';
608 print
'<tr><td class="titlefield">'.$langs->trans(
"Label").
'</td><td>'.$object->label.
'</td></tr>';
612 print
'<td>'.$langs->trans(
"DatePayment").
'</td><td>';
617 print
'<tr><td>'.$langs->trans(
"DateValue").
'</td><td>';
622 if ($object->sens ==
'1') $sens = $langs->trans(
"Credit");
else $sens = $langs->trans(
"Debit");
623 print
'<tr><td>'.$langs->trans(
"Sens").
'</td><td>'.$sens.
'</td></tr>';
625 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td>'.
price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).
'</td></tr>';
628 print
'<tr><td class="nowrap">';
629 print $langs->trans(
"AccountAccounting");
631 if (!empty($conf->accounting->enabled))
634 $accountingaccount->fetch(
'', $object->accountancy_code, 1);
636 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
638 print $object->accountancy_code;
643 print
'<tr><td class="nowrap">';
644 print $form->editfieldkey(
'SubledgerAccount',
'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $user->rights->banque->modifier),
'string',
'', 0);
646 print $form->editfieldval(
'SubledgerAccount',
'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $user->rights->banque->modifier),
'string',
'', 0);
649 if (!empty($conf->banque->enabled))
651 if ($object->fk_account > 0)
654 $bankline->fetch($object->fk_bank);
657 print
'<td>'.$langs->trans(
'BankTransactionLine').
'</td>';
658 print
'<td colspan="3">';
659 print $bankline->getNomUrl(1, 0,
'showall');
666 $parameters = array(
'socid'=>$object->id);
667 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
673 print
'<div class="clearboth"></div>';
681 print
'<div class="tabsAction">'.
"\n";
687 if ($user->rights->banque->modifier)
689 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>";
693 if (empty($object->rappro))
695 if (!empty($user->rights->banque->modifier))
697 if ($alreadyaccounted) {
698 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"Accounted").
'">'.$langs->trans(
"Delete").
'</a></div>';
700 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.
'&action=delete&token='.
newToken().
'">'.$langs->trans(
"Delete").
'</a></div>';
703 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans(
"NotAllowed"))).
'">'.$langs->trans(
"Delete").
'</a></div>';
706 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"LinkedToAConciliatedTransaction").
'">'.$langs->trans(
"Delete").
'</a></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
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...
Class to manage various payments.
various_payment_prepare_head($object)
Prepare array with list of tabs.
Class to manage bank transaction lines.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage projects.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Class to manage bank categories.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
print $_SERVER["PHP_SELF"]
Edit parameters.
GETPOSTINT($paramname, $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_getIdFromCode($db, $key, $tablename, $fieldkey= 'code', $fieldid= 'id', $entityfilter=0)
Return an id or code from a code or id.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Class to manage accounting accounts.
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.