29require
'../../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
37if (isModEnabled(
'project')) {
38 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
43$langs->loadLangs(array(
"compta",
"banks",
"bills",
"users",
"accountancy",
"categories"));
47$action =
GETPOST(
'action',
'alpha');
49$cancel =
GETPOST(
'cancel',
'aZ09');
50$backtopage =
GETPOST(
'backtopage',
'alpha');
53$label =
GETPOST(
"label",
"alpha");
56$paymenttype =
GETPOST(
"paymenttype",
"aZ09");
57$accountancy_code =
GETPOST(
"accountancy_code",
"alpha");
60 $subledger_account =
GETPOST(
"subledger_account",
"alpha") > 0 ?
GETPOST(
"subledger_account",
"alpha") :
'';
62 $subledger_account =
GETPOST(
"subledger_account",
"alpha");
68 $socid = $user->socid;
72$hookmanager->initHooks(array(
'variouscard',
'globalcard'));
78$permissiontoadd = $user->hasRight(
'banque',
'modifier');
79$permissiontodelete = $user->hasRight(
'banque',
'modifier');
87$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
94 if ($action !=
'addlink' && $action !=
'setaccountancy_code' && $action !=
'setsubledger_account') {
95 $urltogo = $backtopage ? $backtopage :
dol_buildpath(
'/compta/bank/various_payment/list.php', 1);
96 header(
"Location: ".$urltogo);
99 if ($id > 0 || !empty($ref)) {
100 $ret =
$object->fetch($id, $ref);
106 if ($action ==
'classin' && $permissiontoadd) {
111 if ($action ==
'add' && $permissiontoadd) {
133 $object->fk_user_author = $user->id;
136 $object->accountancy_code = (
GETPOST(
"accountancy_code") !=
'-1' ?
GETPOST(
"accountancy_code",
"alpha") :
"");
137 $object->subledger_account = $subledger_account;
142 if (empty($datep) || empty($datev)) {
143 $langs->load(
'errors');
144 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")),
null,
'errors');
148 $langs->load(
'errors');
149 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Amount")),
null,
'errors');
152 if (isModEnabled(
"bank") && !
$object->accountid > 0) {
153 $langs->load(
'errors');
154 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"BankAccount")),
null,
'errors');
158 $langs->load(
'errors');
159 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"PaymentMode")),
null,
'errors');
162 if (isModEnabled(
'accounting') && !
$object->accountancy_code) {
163 $langs->load(
'errors');
164 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountAccounting")),
null,
'errors');
168 $langs->load(
'errors');
169 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Sens")),
null,
'errors');
173 $bankaccount =
new Account($db);
174 $bankaccount->fetch(
$object->fk_account);
177 $currencyofpayment = $conf->currency;
181 if (isModEnabled(
'multicurrency') && $currencyofpayment != $bankaccount->currency_code) {
184 setEventMessages($langs->trans(
"ErrorVariousPaymentOnBankAccountWithADifferentCurrencyNotYetSupported"),
null,
'errors');
194 $urltogo = ($backtopage ? $backtopage : DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
195 header(
"Location: ".$urltogo);
207 if ($action ==
'confirm_delete' && $confirm ==
'yes' && $permissiontodelete) {
217 $result = $accountline->fetch(
$object->fk_bank);
219 $result = $accountline->delete($user);
225 header(
"Location: ".DOL_URL_ROOT.
'/compta/bank/various_payment/list.php');
228 $object->error = $accountline->error;
237 setEventMessages(
'Error try do delete a line linked to a conciliated bank transaction',
null,
'errors');
241 if ($action ==
'setaccountancy_code' && $permissiontodelete) {
246 $object->accountancy_code =
GETPOST(
'accountancy_code',
'alphanohtml');
257 if ($action ==
'setsubledger_account' && $permissiontodelete) {
262 $object->subledger_account = $subledger_account;
275if ($action ==
'confirm_clone' && $confirm !=
'yes') {
279if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
290 if (
GETPOST(
'clone_label',
'alphanohtml')) {
298 if ($newdatepayment) {
299 $object->datep = $newdatepayment;
301 if (!empty($newdatevalue)) {
302 $object->datev = $newdatevalue;
304 $object->datev = $newdatepayment;
307 if (GETPOSTISSET(
"clone_sens")) {
311 if (GETPOSTISSET(
"clone_amount")) {
323 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?id=".$id);
348$form =
new Form($db);
349if (isModEnabled(
'accounting')) {
352if (isModEnabled(
'project')) {
365$title =
$object->ref.
" - ".$langs->trans(
'Card');
366if ($action ==
'create') {
367 $title = $langs->trans(
"NewVariousPayment");
369$help_url =
'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
375require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/bankcateg.class.php';
378$arrayofbankcategs = $bankcateg->fetchAll();
380foreach ($arrayofbankcategs as $bankcategory) {
381 $options[$bankcategory->id] = $bankcategory->label;
385if ($action ==
'create') {
387 if (!empty($conf->use_javascript_ajax)) {
388 print
"\n".
'<script type="text/javascript">';
389 print
'$(document).ready(function () {
391 $("#selectpaymenttype").change(function() {
394 function setPaymentType()
396 console.log("setPaymentType");
397 var code = $("#selectpaymenttype option:selected").val();
398 if (code == \'CHQ\' || code == \'VIR\')
402 $(\'.fieldrequireddyn\').addClass(\'fieldrequired\');
404 if ($(\'#fieldchqemetteur\').val() == \'\')
406 var emetteur = jQuery(\'#thirdpartylabel\').val();
407 $(\'#fieldchqemetteur\').val(emetteur);
412 $(\'.fieldrequireddyn\').removeClass(\'fieldrequired\');
413 $(\'#fieldchqemetteur\').val(\'\');
420 print
' </script>'.
"\n";
423 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
424 print
'<input type="hidden" name="token" value="'.newToken().
'">';
425 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
426 print
'<input type="hidden" name="action" value="add">';
428 print
load_fiche_titre($langs->trans(
"NewVariousPayment"),
'',
'object_payment');
432 print
'<table class="border centpercent">';
435 print
'<tr><td class="titlefieldcreate">';
436 print $form->editfieldkey(
'DatePayment',
'datep',
'',
$object, 0,
'string',
'', 1).
'</td><td>';
437 print $form->selectDate((empty($datep) ? -1 : $datep),
"datep", 0, 0, 0,
'add', 1, 1);
442 print $form->editfieldkey(
'DateValue',
'datev',
'',
$object, 0).
'</td><td>';
443 print $form->selectDate((empty($datev) ? -1 : $datev),
"datev", 0, 0, 0,
'add', 1, 1);
448 print $form->editfieldkey(
'Label',
'label',
'',
$object, 0,
'string',
'', 1).
'</td><td>';
449 print
'<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans(
"VariousPayment")).
'">';
454 print $form->editfieldkey(
'Amount',
'amount',
'',
$object, 0,
'string',
'', 1).
'</td><td>';
455 print
'<input name="amount" id="amount" class="minwidth50 maxwidth100" value="'.$amount.
'">';
459 if (isModEnabled(
"bank")) {
461 print $form->editfieldkey(
'BankAccount',
'selectaccountid',
'',
$object, 0,
'string',
'', 1).
'</td><td>';
462 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
463 print $form->select_comptes($accountid,
"accountid", 0,
'', 2,
'', (isModEnabled(
'multicurrency') ? 1 : 0),
'', 1);
468 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'PaymentMode').
'</span></td><td>';
469 $form->select_types_paiements($paymenttype,
'paymenttype',
'', 2);
474 if (isModEnabled(
"bank")) {
475 print
'<tr><td><label for="num_payment">'.$langs->trans(
'Numero');
476 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
477 print
'</label></td>';
478 print
'<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST(
"num_payment").
'"></td></tr>'.
"\n";
481 print
'<tr><td class="'.(GETPOST(
'paymenttype') ==
'CHQ' ?
'fieldrequired ' :
'').
'fieldrequireddyn"><label for="fieldchqemetteur">'.$langs->trans(
'CheckTransmitter');
482 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
483 print
'</label></td>';
484 print
'<td><input id="fieldchqemetteur" name="chqemetteur" size="30" type="text" value="'.GETPOST(
'chqemetteur',
'alphanohtml').
'"></td></tr>';
487 print
'<tr><td><label for="chqbank">'.$langs->trans(
'Bank');
488 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
489 print
'</label></td>';
490 print
'<td><input id="chqbank" name="chqbank" size="30" type="text" value="'.GETPOST(
'chqbank',
'alphanohtml').
'"></td></tr>';
494 if (isModEnabled(
'project')) {
498 $langs->load(
"projects");
500 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
501 print
img_picto(
'',
'project',
'class="pictofixedwidth"');
502 print $formproject->select_projects(-1, $projectid,
'fk_project', 0, 0, 1, 1, 0, 0, 0,
'', 1);
507 $parameters = array();
508 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters,
$object, $action);
509 print $hookmanager->resPrint;
512 if (is_array($options) && count($options) && $conf->categorie->enabled) {
513 print
'<tr><td>'.$langs->trans(
"RubriquesTransactions").
'</td><td>';
514 print
img_picto(
'',
'category').Form::selectarray(
'category_transaction', $options,
GETPOST(
'category_transaction'), 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth300', 1);
518 print
'<tr><td colspan="2"><hr></td></tr>';
521 if (isModEnabled(
'accounting')) {
523 print
'<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans(
"AccountAccounting").
'</td>';
525 print $formaccounting->select_account($accountancy_code,
'accountancy_code', 1,
null, 1, 1);
528 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"AccountAccounting").
'</td>';
529 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.
'">';
534 if (isModEnabled(
'accounting')) {
535 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
538 print $formaccounting->select_auxaccount($subledger_account,
'subledger_account', 1,
'');
540 print
'<input type="text" class="maxwidth200 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
544 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
545 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
551 $labelsens = $form->textwithpicto($langs->trans(
'Sens'), $langs->trans(
"AccountingDirectionHelp"));
552 print $form->editfieldkey($labelsens,
'sens',
'',
$object, 0,
'string',
'', 1).
'</td><td>';
553 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
554 print $form->selectarray(
'sens', $sensarray, $sens, 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth100', 1);
561 print $form->buttonsSaveCancel();
568 $alreadyaccounted =
$object->getVentilExportCompta();
573 if ($action ===
'clone') {
574 $set_value_help = $form->textwithpicto(
'', $langs->trans($langs->trans(
"AccountingDirectionHelp")));
575 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
577 $formquestion = array(
578 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
579 array(
'type' =>
'date',
'tdclass' =>
'fieldrequired',
'name' =>
'clone_date_payment',
'label' => $langs->trans(
"DatePayment"),
'value' => -1),
580 array(
'type' =>
'date',
'name' =>
'clone_date_value',
'label' => $langs->trans(
"DateValue"),
'value' => -1),
581 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)),
582 array(
'type' =>
'text',
'name' =>
'clone_amount',
'label' => $langs->trans(
"Amount"),
'value' =>
price(
$object->amount)),
583 array(
'type' =>
'select',
'name' =>
'clone_sens',
'label' => $langs->trans(
"Sens").
' '.$set_value_help,
'values' => $sensarray,
'default' =>
$object->sens),
586 print $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneVariousPayment',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1, 350);
590 if ($action ==
'delete') {
591 $text = $langs->trans(
'ConfirmDeleteVariousPayment');
592 print $form->formconfirm($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, $langs->trans(
'DeleteVariousPayment'), $text,
'confirm_delete',
'',
'', 2);
597 $morehtmlref =
'<div class="refidno">';
599 if (isModEnabled(
'project')) {
600 $langs->load(
"projects");
602 if ($permissiontoadd) {
603 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
604 if ($action !=
'classify') {
605 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&token='.
newToken().
'&id='.
$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
607 if ($action ==
'classify') {
609 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
610 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
611 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
612 $morehtmlref .= $formproject->select_projects(-1,
$object->fk_project,
'projectid', 0, 0, 1, 1, 0, 0, 0,
'', 1, 0,
'maxwidth500 widthcentpercentminusxx');
613 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
614 $morehtmlref .=
'</form>';
616 $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');
619 if (!empty(
$object->fk_project)) {
621 $proj->fetch(
$object->fk_project);
622 $morehtmlref .= $proj->getNomUrl(1);
624 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
630 $morehtmlref .=
'</div>';
631 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/various_payment/list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
633 $morehtmlstatus =
'';
635 dol_banner_tab(
$object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
637 print
'<div class="fichecenter">';
638 print
'<div class="underbanner clearboth"></div>';
640 print
'<table class="border centpercent tableforfield">';
643 print
'<tr><td class="titlefield">'.$langs->trans(
"Label").
'</td><td>'.
$object->label.
'</td></tr>';
647 print
'<td>'.$langs->trans(
"DatePayment").
'</td><td>';
652 print
'<tr><td>'.$langs->trans(
"DateValue").
'</td><td>';
658 $sens = $langs->trans(
"Credit");
660 $sens = $langs->trans(
"Debit");
662 print
'<tr><td>'.$langs->trans(
"Sens").
'</td><td>'.$sens.
'</td></tr>';
664 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td><span class="amount">'.
price(
$object->amount, 0, $langs, 1, -1, -1, $conf->currency).
'</span></td></tr>';
668 if (isModEnabled(
'accounting')) {
669 print
'<tr><td class="nowrap">';
670 print $form->editfieldkey(
'AccountAccounting',
'accountancy_code',
$object->accountancy_code,
$object, (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
672 if ($action ==
'editaccountancy_code' && (!$alreadyaccounted && $permissiontoadd)) {
674 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'].
'?id='.
$object->id,
$object->accountancy_code,
'accountancy_code', 0, 1,
'', 1);
677 $accountingaccount->fetch(0,
$object->accountancy_code, 1);
679 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
683 print
'<tr><td class="nowrap">';
684 print $langs->trans(
"AccountAccounting");
686 print
$object->accountancy_code;
691 print
'<tr><td class="nowrap">';
692 print $form->editfieldkey(
'SubledgerAccount',
'subledger_account',
$object->subledger_account,
$object, (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
694 if ($action ==
'editsubledger_account' && (!$alreadyaccounted && $permissiontoadd)) {
696 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id,
$object->subledger_account,
'subledger_account', 1, 1,
'', 1);
698 print $form->editfieldval(
'SubledgerAccount',
'subledger_account',
$object->subledger_account,
$object, (!$alreadyaccounted && $permissiontoadd),
'string',
'',
null,
null,
'', 1,
'lengthAccounta');
705 $bankaccountnotfound = 0;
707 if (isModEnabled(
'bank')) {
709 print
'<td>'.$langs->trans(
'BankTransactionLine').
'</td>';
710 print
'<td colspan="3">';
713 $result = $bankline->fetch(
$object->fk_bank);
716 $bankaccountnotfound = 1;
718 print $bankline->getNomUrl(1, 0,
'showall');
721 $bankaccountnotfound = 1;
723 print
'<span class="opacitymedium">'.$langs->trans(
"NoRecordfound").
'</span>';
730 $parameters = array(
'socid' =>
$object->id);
731 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
737 print
'<div class="clearboth"></div>';
745 print
'<div class="tabsAction">'.
"\n";
751 if ($permissiontoadd) {
752 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>";
756 if (empty(
$object->rappro) || $bankaccountnotfound) {
757 if ($permissiontoadd) {
758 if ($alreadyaccounted) {
759 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"Accounted").
'">'.$langs->trans(
"Delete").
'</a></div>';
761 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.
'&action=delete&token='.
newToken().
'">'.$langs->trans(
"Delete").
'</a></div>';
764 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans(
"NotAllowed"))).
'">'.$langs->trans(
"Delete").
'</a></div>';
767 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"LinkedToAConciliatedTransaction").
'">'.$langs->trans(
"Delete").
'</a></div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
length_accounta($accounta)
Return Auxiliary accounting account of thirdparties with defined length.
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.
various_payment_prepare_head($object)
Prepare array with list of tabs.
Class to manage bank accounts.
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_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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)
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_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_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_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='')
Return an id or code from a code or id.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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.
GETPOSTFLOAT($paramname, $rounding='')
Return the value of a $_GET or $_POST supervariable, converted into float.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify 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.