30require
'../../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
48require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
50 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
55$langs->loadLangs(array(
"accountancy",
"banks",
"bills",
"categories",
"compta",
"users"));
59$action =
GETPOST(
'action',
'alpha');
61$cancel =
GETPOST(
'cancel',
'alpha');
62$backtopage =
GETPOST(
'backtopage',
'alpha');
65$label =
GETPOST(
"label",
"alpha");
68$paymenttype =
GETPOST(
"paymenttype",
"aZ09");
69$accountancy_code =
GETPOST(
"accountancy_code",
"alpha");
72 $subledger_account =
GETPOST(
"subledger_account",
"alpha") > 0 ?
GETPOST(
"subledger_account",
"alpha") :
'';
74 $subledger_account =
GETPOST(
"subledger_account",
"alpha");
80 $socid = $user->socid;
84$hookmanager->initHooks(array(
'variouscard',
'globalcard'));
90$extrafields->fetch_name_optionals_label(
$object->table_element);
92$permissiontoadd = $user->hasRight(
'banque',
'modifier');
93$permissiontodelete = $user->hasRight(
'banque',
'modifier');
100$parameters = array();
101$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
106if (empty($reshook)) {
108 if ($action !=
'addlink' && $action !=
'setaccountancy_code' && $action !=
'setsubledger_account') {
109 $urltogo = $backtopage ? $backtopage :
dol_buildpath(
'/compta/bank/various_payment/list.php', 1);
110 header(
"Location: ".$urltogo);
120 if ($action ==
'classin' && $permissiontoadd) {
125 if ($action ==
'add' && $permissiontoadd) {
147 $object->fk_user_author = $user->id;
150 $object->accountancy_code = (
GETPOST(
"accountancy_code") !=
'-1' ?
GETPOST(
"accountancy_code",
"alpha") :
"");
151 $object->subledger_account = $subledger_account;
157 $ret = $extrafields->setOptionalsFromPost(
null, $object);
163 setEventMessages($langs->trans(
"ErrorAccountNotCentralized").
". " . $langs->trans(
"RemoveSubsidiaryAccountOrAdjustTheGeneralAccount"),
null,
'errors');
166 if (empty($datep) || empty($datev)) {
167 $langs->load(
'errors');
168 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")),
null,
'errors');
172 $langs->load(
'errors');
173 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Amount")),
null,
'errors');
177 $langs->load(
'errors');
178 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"BankAccount")),
null,
'errors');
182 $langs->load(
'errors');
183 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"PaymentMode")),
null,
'errors');
187 $langs->load(
'errors');
188 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountAccounting")),
null,
'errors');
192 $langs->load(
'errors');
193 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Sens")),
null,
'errors');
199 $bankaccount->fetch((
int)
$object->fk_account);
203 $currencyofpayment =
$conf->currency;
205 if (
isModEnabled(
'multicurrency') && $currencyofpayment != $bankaccount->currency_code) {
208 setEventMessages($langs->trans(
"ErrorVariousPaymentOnBankAccountWithADifferentCurrencyNotYetSupported"),
null,
'errors');
218 $urltogo = ($backtopage ? $backtopage :
dolBuildUrl(DOL_URL_ROOT.
'/compta/bank/various_payment/list.php'));
219 header(
"Location: ".$urltogo);
231 if ($action ==
'confirm_delete' && $confirm ==
'yes' && $permissiontodelete) {
242 $result = $accountline->fetch(
$object->fk_bank);
244 $result = $accountline->delete($user);
250 header(
"Location: ".
dolBuildUrl(DOL_URL_ROOT.
'/compta/bank/various_payment/list.php'));
253 $object->error = $accountline ? $accountline->error :
'No AccountLine';
262 setEventMessages(
'Error try do delete a line linked to a conciliated bank transaction',
null,
'errors');
266 if ($action ==
'setaccountancy_code' && $permissiontodelete) {
271 $object->accountancy_code =
GETPOST(
'accountancy_code',
'alphanohtml');
282 if ($action ==
'setsubledger_account' && $permissiontodelete) {
287 $object->subledger_account = $subledger_account;
300if ($action ==
'confirm_clone' && $confirm !=
'yes') {
304if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
315 if (
GETPOST(
'clone_label',
'alphanohtml')) {
323 if ($newdatepayment) {
324 $object->datep = $newdatepayment;
326 if (!empty($newdatevalue)) {
327 $object->datev = $newdatevalue;
329 $object->datev = $newdatepayment;
332 if (GETPOSTISSET(
"clone_sens")) {
336 if (GETPOSTISSET(
"clone_amount")) {
348 header(
"Location: ".
dolBuildUrl($_SERVER[
"PHP_SELF"], [
"id" => $id]));
377 $formaccounting =
null;
394$title =
$object->ref.
" - ".$langs->trans(
'Card');
395if ($action ==
'create') {
396 $title = $langs->trans(
"NewVariousPayment");
398$help_url =
'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
404require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/bankcateg.class.php';
407$arrayofbankcategs = $bankcateg->fetchAll();
409foreach ($arrayofbankcategs as $bankcategory) {
410 $options[$bankcategory->id] = $bankcategory->label;
414if ($action ==
'create') {
416 if (!empty(
$conf->use_javascript_ajax)) {
418 <script
type=
"text/javascript">
419 $(document).ready(
function() {
421 $(
"#selectpaymenttype").change(
function() {
425 function setPaymentType() {
426 console.log(
"setPaymentType");
427 var code = $(
"#selectpaymenttype option:selected").val();
428 if (code ==
"CHQ" || code ==
"VIR") {
430 $(
'.fieldrequireddyn').addClass(
'fieldrequired');
432 if ($(
'#fieldchqemetteur').val() ==
'') {
433 var emetteur = jQuery(
'#thirdpartylabel').val();
434 $(
'#fieldchqemetteur').val(emetteur);
437 $(
".fieldrequireddyn").removeClass(
"fieldrequired");
438 $(
"#fieldchqemetteur").val(
"");
442 function toggleSubledger() {
443 var isCentral = $(
"#accountancy_code option:selected").data(
"centralized");
444 console.log(
"the selected general ledger account is centralised?", isCentral);
446 $(
"#subledger_account").prop(
"disabled",
false);
448 $(
"#subledger_account").prop(
"disabled",
true);
453 $(
"#accountancy_code").on(
"change", toggleSubledger);
454 $(
"#accountancy_code").on(
"select2:select", toggleSubledger);
460 print
'<form action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'" method="POST">';
461 print
'<input type="hidden" name="token" value="'.newToken().
'">';
462 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
463 print
'<input type="hidden" name="action" value="add">';
465 print
load_fiche_titre($langs->trans(
"NewVariousPayment"),
'',
'object_payment');
469 print
'<table class="border centpercent">';
472 print
'<tr><td class="titlefieldcreate">';
473 print $form->editfieldkey(
'DatePayment',
'datep',
'', $object, 0,
'string',
'', 1).
'</td><td>';
474 print $form->selectDate((empty($datep) ? -1 : $datep),
"datep", 0, 0, 0,
'add', 1, 1);
479 print $form->editfieldkey(
'DateValue',
'datev',
'', $object, 0).
'</td><td>';
480 print $form->selectDate((empty($datev) ? -1 : $datev),
"datev", 0, 0, 0,
'add', 1, 1);
485 print $form->editfieldkey(
'Label',
'label',
'', $object, 0,
'string',
'', 1).
'</td><td>';
486 print
'<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans(
"VariousPayment")).
'">';
491 print $form->editfieldkey(
'Amount',
'amount',
'', $object, 0,
'string',
'', 1).
'</td><td>';
492 print
'<input name="amount" id="amount" class="minwidth50 maxwidth100" value="'.$amount.
'">';
493 print
' '.$langs->getCurrencySymbol();
499 print $form->editfieldkey(
'BankAccount',
'selectaccountid',
'', $object, 0,
'string',
'', 1).
'</td><td>';
500 print
img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
501 print $form->select_comptes($accountid,
"accountid", 0,
'', 2,
'', (
isModEnabled(
'multicurrency') ? 1 : 0),
'', 1);
506 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'PaymentMode').
'</span></td><td>';
507 $form->select_types_paiements($paymenttype,
'paymenttype',
'', 2);
513 print
'<tr><td><label for="num_payment">'.$langs->trans(
'Numero');
514 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
515 print
'</label></td>';
516 print
'<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST(
"num_payment").
'"></td></tr>'.
"\n";
519 print
'<tr><td class="'.(GETPOST(
'paymenttype') ==
'CHQ' ?
'fieldrequired ' :
'').
'fieldrequireddyn"><label for="fieldchqemetteur">'.$langs->trans(
'CheckTransmitter');
520 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeMaker").
')</em>';
521 print
'</label></td>';
522 print
'<td><input id="fieldchqemetteur" name="chqemetteur" size="30" type="text" value="'.GETPOST(
'chqemetteur',
'alphanohtml').
'"></td></tr>';
525 print
'<tr><td><label for="chqbank">'.$langs->trans(
'Bank');
526 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeBank").
')</em>';
527 print
'</label></td>';
528 print
'<td><input id="chqbank" name="chqbank" size="30" type="text" value="'.GETPOST(
'chqbank',
'alphanohtml').
'"></td></tr>';
536 $langs->load(
"projects");
538 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
539 print
img_picto(
'',
'project',
'class="pictofixedwidth"');
540 print $formproject->select_projects(-1, (
string) $projectid,
'fk_project', 0, 0, 1, 1, 0, 0, 0,
'', 1);
545 print
$object->showOptionals($extrafields,
'create');
547 $parameters = array();
548 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
549 print $hookmanager->resPrint;
552 if (is_array($options) && count($options) &&
isModEnabled(
'category')) {
553 print
'<tr><td>'.$langs->trans(
"RubriquesTransactions").
'</td><td>';
554 print
img_picto(
'',
'category',
'class="pictofixedwidth"') .
Form::selectarray(
'category_transaction', $options,
GETPOST(
'category_transaction'), 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth300', 1);
558 print
'<tr><td colspan="2"><hr></td></tr>';
564 print
'<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans(
"AccountAccounting").
'</td>';
566 print $formaccounting->select_account($accountancy_code,
'accountancy_code', 1, array(), 1, 1);
569 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"AccountAccounting").
'</td>';
570 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.
'">';
577 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
579 print $formaccounting->select_auxaccount($subledger_account,
'subledger_account', 1,
'');
582 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
583 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
589 $labelsens = $form->textwithpicto($langs->trans(
'Sens'), $langs->trans(
"AccountingDirectionHelp"));
590 print $form->editfieldkey($labelsens,
'sens',
'', $object, 0,
'string',
'', 1).
'</td><td>';
592 '0' => array(
'label' => $langs->trans(
"Debit")),
593 '1' => array(
'label' => $langs->trans(
"Credit"))
596 include_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
598 $sensarray[
'1'][
'disabled'] = 1;
601 print $form->selectarray(
'sens', $sensarray, $sens, 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth100', 1);
608 print $form->buttonsSaveCancel();
615 $alreadyaccounted =
$object->getVentilExportCompta();
620 if ($action ===
'clone') {
621 $set_value_help = $form->textwithpicto(
'', $langs->trans($langs->trans(
"AccountingDirectionHelp")));
622 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
624 $formquestion = array(
625 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
626 array(
'type' =>
'date',
'tdclass' =>
'fieldrequired',
'name' =>
'clone_date_payment',
'label' => $langs->trans(
"DatePayment"),
'value' => -1),
627 array(
'type' =>
'date',
'name' =>
'clone_date_value',
'label' => $langs->trans(
"DateValue"),
'value' => -1),
628 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)),
629 array(
'type' =>
'text',
'name' =>
'clone_amount',
'label' => $langs->trans(
"Amount"),
'value' =>
price(
$object->amount)),
630 array(
'type' =>
'select',
'name' =>
'clone_sens',
'label' => $langs->trans(
"Sens").
' ' . $set_value_help,
'values' => $sensarray,
'default' => (
string)
$object->sens),
633 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneVariousPayment',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1, 350);
637 if ($action ==
'delete') {
638 $text = $langs->trans(
'ConfirmDeleteVariousPayment');
639 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'DeleteVariousPayment'), $text,
'confirm_delete',
'',
'', 2);
644 $morehtmlref =
'<div class="refidno">';
647 $langs->load(
"projects");
649 if ($permissiontoadd) {
650 $morehtmlref .=
img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
651 if ($action !=
'classify') {
652 $morehtmlref .=
'<a class="editfielda" href="' .
dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">' .
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
654 if ($action ==
'classify') {
656 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
657 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
658 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
659 $morehtmlref .= $formproject->select_projects(-1, (
string)
$object->fk_project,
'projectid', 0, 0, 1, 1, 0, 0, 0,
'', 1, 0,
'maxwidth500 widthcentpercentminusxx');
660 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
661 $morehtmlref .=
'</form>';
663 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, (property_exists($object,
'socid') ?
$object->socid : 0), (
string)
$object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
666 if (!empty(
$object->fk_project)) {
668 $proj->fetch(
$object->fk_project);
669 $morehtmlref .= $proj->getNomUrl(1);
671 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
677 $morehtmlref .=
'</div>';
678 $linkback =
'<a href="' . DOL_URL_ROOT .
'/compta/bank/various_payment/list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
680 $morehtmlstatus =
'';
682 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
684 print
'<div class="fichecenter">';
685 print
'<div class="underbanner clearboth"></div>';
687 print
'<table class="border centpercent tableforfield">';
690 print
'<tr><td class="titlefield">'.$langs->trans(
"Label").
'</td><td>'.
$object->label.
'</td></tr>';
694 print
'<td>'.$langs->trans(
"DatePayment").
'</td><td>';
699 print
'<tr><td>'.$langs->trans(
"DateValue").
'</td><td>';
705 $sens = $langs->trans(
"Credit");
707 $sens = $langs->trans(
"Debit");
709 print
'<tr><td>'.$langs->trans(
"Sens").
'</td><td>'.$sens.
'</td></tr>';
711 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td><span class="amount">' .
price(
$object->amount, 0, $langs, 1, -1, -1,
$conf->currency).
'</span></td></tr>';
717 print
'<tr><td class="nowrap">';
718 print $form->editfieldkey(
'AccountAccounting',
'accountancy_code',
$object->accountancy_code, $object, (
int) (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
720 if ($action ==
'editaccountancy_code' && (!$alreadyaccounted && $permissiontoadd)) {
722 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id,
$object->accountancy_code,
'accountancy_code', 0, 1,
'', 1);
725 $accountingaccount->fetch(0,
$object->accountancy_code, 1);
727 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
731 print
'<tr><td class="nowrap">';
732 print $langs->trans(
"AccountAccounting");
734 print
$object->accountancy_code;
739 print
'<tr><td class="nowrap">';
740 print $form->editfieldkey(
'SubledgerAccount',
'subledger_account',
$object->subledger_account, $object, (
int) (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
742 if ($action ==
'editsubledger_account' && (!$alreadyaccounted && $permissiontoadd)) {
745 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id,
$object->subledger_account,
'subledger_account', 1, 1,
'', 1);
747 print $form->editfieldval(
'SubledgerAccount',
'subledger_account',
$object->subledger_account, $object, (!$alreadyaccounted && $permissiontoadd),
'string',
'',
null,
null,
'', 1,
'lengthAccounta');
754 $bankaccountnotfound = 0;
758 print
'<td>'.$langs->trans(
'BankTransactionLine').
'</td>';
759 print
'<td colspan="3">';
762 $result = $bankline->fetch(
$object->fk_bank);
765 $bankaccountnotfound = 1;
767 print $bankline->getNomUrl(1, 0,
'showall');
770 $bankaccountnotfound = 1;
772 print
'<span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span>';
779 $parameters = array(
'socid' =>
$object->id);
780 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
786 print
'<div class="clearboth"></div>';
794 print
'<div class="tabsAction">' .
"\n";
800 if ($permissiontoadd) {
801 print
'<div class="inline-block divButAction"><a class="butAction butActionClone" href="' .
dolBuildUrl(DOL_DOCUMENT_ROOT.
"/compta/bank/various_payment/card.php", [
'id' =>
$object->id,
'action' =>
'clone']).
'">'.$langs->trans(
"ToClone") .
"</a></div>";
805 if (empty(
$object->rappro) || $bankaccountnotfound) {
806 if ($permissiontoadd) {
807 if ($alreadyaccounted) {
808 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"Accounted").
'">'.$langs->trans(
"Delete").
'</a></div>';
810 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?id='.$object->id.
'&action=delete&token=' . newToken().
'">'.$langs->trans(
"Delete").
'</a></div>';
813 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans(
"NotAllowed"))).
'">'.$langs->trans(
"Delete").
'</a></div>';
816 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"LinkedToAConciliatedTransaction").
'">'.$langs->trans(
"Delete").
'</a></div>';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
length_accounta($accounta)
Return Auxiliary accounting account of thirdparties with defined length.
checkGeneralAccountAllowsAuxiliary($db, $general_account, $auxiliary_account, $general_account_id=0)
Check if a general accounting account allows the use of an auxiliary account.
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.
various_payment_prepare_head($object)
Prepare array with list of tabs.
isALNERunningVersion($blockedlogtestalreadydone=0, $blockedlogmodulealreadydone=0)
Return if the application is executed with the LNE requirements on.
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...
dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='', $useCache=true)
Return an id or code from a code or id.
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_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
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.
GETPOSTFLOAT($paramname, $rounding='', $option=2)
Return the value of a $_GET or $_POST supervariable, converted into float.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
isModEnabled($module)
Is Dolibarr module enabled.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
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.