31require
'../../../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/bank.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
48require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
49require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
52 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
56$langs->loadLangs(array(
"accountancy",
"banks",
"bills",
"categories",
"compta",
"users"));
60$action =
GETPOST(
'action',
'alpha');
62$cancel =
GETPOST(
'cancel',
'alpha');
63$backtopage =
GETPOST(
'backtopage',
'alpha');
66$label =
GETPOST(
"label",
"alpha");
69$paymenttype =
GETPOST(
"paymenttype",
"aZ09");
70$accountancy_code =
GETPOST(
"accountancy_code",
"alpha");
73 $subledger_account =
GETPOST(
"subledger_account",
"alpha") > 0 ?
GETPOST(
"subledger_account",
"alpha") :
'';
75 $subledger_account =
GETPOST(
"subledger_account",
"alpha");
81 $socid = $user->socid;
85$hookmanager->initHooks(array(
'variouscard',
'globalcard'));
91 $resqlent = $db->query(
"SELECT rowid FROM ".MAIN_DB_PREFIX.
"payment_various WHERE rowid = ".((
int) $id).
" AND entity IN (".
getEntity(
'payment_various').
")");
92 if (!$resqlent || !$db->num_rows($resqlent)) {
100include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
102$extrafields->fetch_name_optionals_label(
$object->table_element);
104$permissiontoadd = $user->hasRight(
'banque',
'modifier');
105$permissiontodelete = $user->hasRight(
'banque',
'modifier');
112$parameters = array();
113$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
115 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
118if (empty($reshook)) {
120 if ($action !=
'addlink' && $action !=
'setaccountancy_code' && $action !=
'setsubledger_account') {
121 $urltogo = $backtopage ? $backtopage :
dol_buildpath(
'/compta/bank/various_payment/list.php', 1);
122 header(
"Location: ".$urltogo);
129 if ($action ==
'classin' && $permissiontoadd) {
133 if ($action ==
'add' && $permissiontoadd) {
155 $object->fk_user_author = $user->id;
158 $object->accountancy_code = (
GETPOST(
"accountancy_code") !=
'-1' ?
GETPOST(
"accountancy_code",
"alpha") :
"");
159 $object->subledger_account = $subledger_account;
165 $ret = $extrafields->setOptionalsFromPost(
null, $object);
171 setEventMessages($langs->trans(
"ErrorAccountNotCentralized").
". " . $langs->trans(
"RemoveSubsidiaryAccountOrAdjustTheGeneralAccount"),
null,
'errors');
174 if (empty($datep) || empty($datev)) {
175 $langs->load(
'errors');
176 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Date")),
null,
'errors');
180 $langs->load(
'errors');
181 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Amount")),
null,
'errors');
185 $langs->load(
'errors');
186 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"BankAccount")),
null,
'errors');
190 $langs->load(
'errors');
191 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"PaymentMode")),
null,
'errors');
195 $langs->load(
'errors');
196 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountAccounting")),
null,
'errors');
200 $langs->load(
'errors');
201 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Sens")),
null,
'errors');
205 $bankaccount =
new Account($db);
207 $bankaccount->fetch((
int)
$object->fk_account);
211 $currencyofpayment =
$conf->currency;
213 if (
isModEnabled(
'multicurrency') && $currencyofpayment != $bankaccount->currency_code) {
216 setEventMessages($langs->trans(
"ErrorVariousPaymentOnBankAccountWithADifferentCurrencyNotYetSupported"),
null,
'errors');
226 $urltogo = ($backtopage ? $backtopage :
dolBuildUrl(DOL_URL_ROOT.
'/compta/bank/various_payment/list.php'));
227 header(
"Location: ".$urltogo);
239 if ($action ==
'confirm_delete' && $confirm ==
'yes' && $permissiontodelete) {
249 $result = $accountline->fetch(
$object->fk_bank);
251 $result = $accountline->delete($user);
257 header(
"Location: ".
dolBuildUrl(DOL_URL_ROOT.
'/compta/bank/various_payment/list.php'));
260 $object->error = $accountline ? $accountline->error :
'No AccountLine';
269 setEventMessages(
'Error try do delete a line linked to a conciliated bank transaction',
null,
'errors');
273 if ($action ==
'setaccountancy_code' && $permissiontodelete) {
276 $object->accountancy_code =
GETPOST(
'accountancy_code',
'alphanohtml');
287 if ($action ==
'setsubledger_account' && $permissiontodelete) {
290 $object->subledger_account = $subledger_account;
303if ($action ==
'confirm_clone' && $confirm !=
'yes') {
307if ($action ==
'confirm_clone' && $confirm ==
'yes' && $permissiontoadd) {
316 if (
GETPOST(
'clone_label',
'alphanohtml')) {
324 if ($newdatepayment) {
325 $object->datep = $newdatepayment;
327 if (!empty($newdatevalue)) {
328 $object->datev = $newdatevalue;
330 $object->datev = $newdatepayment;
333 if (
GETPOSTINT(
'selectclone_accountid') > 0) {
354 header(
"Location: ".
dolBuildUrl($_SERVER[
"PHP_SELF"], [
"id" => $id]));
370 dol_print_error($db,
$object->error);
379$form =
new Form($db);
383 $formaccounting =
null;
391if ($action !=
'create' && !
$object->id) {
395$title =
$object->ref.
" - ".$langs->trans(
'Card');
396if ($action ==
'create') {
397 $title = $langs->trans(
"NewVariousPayment");
399$help_url =
'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
405require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/bankcateg.class.php';
408$arrayofbankcategs = $bankcateg->fetchAll();
410foreach ($arrayofbankcategs as $bankcategory) {
411 $options[$bankcategory->id] = $bankcategory->label;
415if ($action ==
'create') {
417 if (!empty(
$conf->use_javascript_ajax)) {
419 <script
type=
"text/javascript">
420 $(document).ready(
function() {
422 $(
"#selectpaymenttype").change(
function() {
426 function setPaymentType() {
427 console.log(
"setPaymentType");
428 var code = $(
"#selectpaymenttype option:selected").val();
429 if (code ==
"CHQ" || code ==
"VIR") {
431 $(
'.fieldrequireddyn').addClass(
'fieldrequired');
433 if ($(
'#fieldchqemetteur').val() ==
'') {
434 var emetteur = jQuery(
'#thirdpartylabel').val();
435 $(
'#fieldchqemetteur').val(emetteur);
438 $(
".fieldrequireddyn").removeClass(
"fieldrequired");
439 $(
"#fieldchqemetteur").val(
"");
443 function toggleSubledger() {
444 var isCentral = $(
"#accountancy_code option:selected").data(
"centralized");
445 console.log(
"the selected general ledger account is centralised?", isCentral);
447 $(
"#subledger_account").prop(
"disabled",
false);
449 $(
"#subledger_account").prop(
"disabled",
true);
454 $(
"#accountancy_code").on(
"change", toggleSubledger);
455 $(
"#accountancy_code").on(
"select2:select", toggleSubledger);
461 print
'<form action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'" method="POST">';
462 print
'<input type="hidden" name="token" value="'.newToken().
'">';
463 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
464 print
'<input type="hidden" name="action" value="add">';
466 print
load_fiche_titre($langs->trans(
"NewVariousPayment"),
'',
'object_payment');
470 print
'<table class="border centpercent">';
473 print
'<tr><td class="titlefieldcreate">';
474 print $form->editfieldkey(
'DatePayment',
'datep',
'', $object, 0,
'string',
'', 1).
'</td><td>';
475 print $form->selectDate((empty($datep) ? -1 : $datep),
"datep", 0, 0, 0,
'add', 1, 1);
480 print $form->editfieldkey(
'DateValue',
'datev',
'', $object, 0).
'</td><td>';
481 print $form->selectDate((empty($datev) ? -1 : $datev),
"datev", 0, 0, 0,
'add', 1, 1);
486 print $form->editfieldkey(
'Label',
'label',
'', $object, 0,
'string',
'', 1).
'</td><td>';
487 print
'<input name="label" id="label" class="minwidth300 maxwidth150onsmartphone" value="'.($label ? $label : $langs->trans(
"VariousPayment")).
'">';
492 print $form->editfieldkey(
'Amount',
'amount',
'', $object, 0,
'string',
'', 1).
'</td><td>';
493 print
'<input name="amount" id="amount" class="minwidth50 maxwidth100" value="'.$amount.
'">';
494 print
' '.$langs->getCurrencySymbol();
500 print $form->editfieldkey(
'BankAccount',
'selectaccountid',
'', $object, 0,
'string',
'', 1).
'</td><td>';
501 print img_picto(
'',
'bank_account',
'class="pictofixedwidth"');
502 print $form->select_comptes($accountid,
"accountid", 0,
'', 2,
'', (
isModEnabled(
'multicurrency') ? 1 : 0),
'', 1);
507 print
'<tr><td><span class="fieldrequired">'.$langs->trans(
'PaymentMode').
'</span></td><td>';
508 $form->select_types_paiements($paymenttype,
'paymenttype',
'', 2);
514 print
'<tr><td><label for="num_payment">'.$langs->trans(
'Numero');
515 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
516 print
'</label></td>';
517 print
'<td><input name="num_payment" class="maxwidth150onsmartphone" id="num_payment" type="text" value="'.GETPOST(
"num_payment").
'"></td></tr>'.
"\n";
520 print
'<tr><td class="'.(GETPOST(
'paymenttype') ==
'CHQ' ?
'fieldrequired ' :
'').
'fieldrequireddyn"><label for="fieldchqemetteur">'.$langs->trans(
'CheckTransmitter');
521 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeMaker").
')</em>';
522 print
'</label></td>';
523 print
'<td><input id="fieldchqemetteur" name="chqemetteur" size="30" type="text" value="'.GETPOST(
'chqemetteur',
'alphanohtml').
'"></td></tr>';
526 print
'<tr><td><label for="chqbank">'.$langs->trans(
'Bank');
527 print
' <em class="opacitymedium">('.$langs->trans(
"ChequeBank").
')</em>';
528 print
'</label></td>';
529 print
'<td><input id="chqbank" name="chqbank" size="30" type="text" value="'.GETPOST(
'chqbank',
'alphanohtml').
'"></td></tr>';
537 $langs->load(
"projects");
539 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
540 print img_picto(
'',
'project',
'class="pictofixedwidth"');
541 print $formproject->select_projects(-1, (
string) $projectid,
'fk_project', 0, 0, 1, 1, 0, 0, 0,
'', 1);
546 print
$object->showOptionals($extrafields,
'create');
548 $parameters = array();
549 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
550 print $hookmanager->resPrint;
553 if (is_array($options) && count($options) &&
isModEnabled(
'category')) {
554 print
'<tr><td>'.$langs->trans(
"RubriquesTransactions").
'</td><td>';
555 print img_picto(
'',
'category',
'class="pictofixedwidth"') .
Form::selectarray(
'category_transaction', $options,
GETPOST(
'category_transaction'), 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth300', 1);
559 print
'<tr><td colspan="2"><hr></td></tr>';
565 print
'<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans(
"AccountAccounting").
'</td>';
567 print $formaccounting->select_account($accountancy_code,
'accountancy_code', 1, array(), 1, 1);
570 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"AccountAccounting").
'</td>';
571 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="accountancy_code" value="'.$accountancy_code.
'">';
578 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
580 print $formaccounting->select_auxaccount($subledger_account,
'subledger_account', 1,
'');
583 print
'<tr><td>'.$langs->trans(
"SubledgerAccount").
'</td>';
584 print
'<td><input class="minwidth100 maxwidthonsmartphone" name="subledger_account" value="'.$subledger_account.
'">';
590 $labelsens = $form->textwithpicto($langs->trans(
'Sens'), $langs->trans(
"AccountingDirectionHelp"));
591 print $form->editfieldkey($labelsens,
'sens',
'', $object, 0,
'string',
'', 1).
'</td><td>';
593 '0' => array(
'label' => $langs->trans(
"Debit")),
594 '1' => array(
'label' => $langs->trans(
"Credit"))
597 include_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
599 $sensarray[
'1'][
'disabled'] = 1;
602 print $form->selectarray(
'sens', $sensarray, $sens, 1, 0, 0,
'', 0, 0, 0,
'',
'minwidth100', 1);
609 print $form->buttonsSaveCancel();
616 $alreadyaccounted =
$object->getVentilExportCompta();
621 if ($action ===
'clone') {
622 $set_value_help = $form->textwithpicto(
'', $langs->trans($langs->trans(
"AccountingDirectionHelp")));
623 $sensarray = array(
'0' => $langs->trans(
"Debit"),
'1' => $langs->trans(
"Credit"));
625 $formquestion = array(
626 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.
$object->label),
627 array(
'type' =>
'date',
'tdclass' =>
'fieldrequired',
'name' =>
'clone_date_payment',
'label' => $langs->trans(
"DatePayment"),
'value' => -1),
628 array(
'type' =>
'date',
'name' =>
'clone_date_value',
'label' => $langs->trans(
"DateValue"),
'value' => -1),
629 array(
'type' =>
'other',
'tdclass' =>
'fieldrequired',
'name' =>
'selectclone_accountid',
'label' => $langs->trans(
"BankAccount"),
'value' => $form->select_comptes(
$object->fk_account,
"clone_accountid", 0,
'', 1,
'', 0,
'minwidth200', 1)),
630 array(
'type' =>
'text',
'name' =>
'clone_amount',
'label' => $langs->trans(
"Amount"),
'value' =>
price(
$object->amount)),
631 array(
'type' =>
'select',
'name' =>
'clone_sens',
'label' => $langs->trans(
"Sens").
' ' . $set_value_help,
'values' => $sensarray,
'default' => (
string)
$object->sens),
634 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneVariousPayment',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1, 350);
638 if ($action ==
'delete') {
639 $text = $langs->trans(
'ConfirmDeleteVariousPayment');
640 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], [
'id' =>
$object->id]), $langs->trans(
'DeleteVariousPayment'), $text,
'confirm_delete',
'',
'', 2);
643 print
dol_get_fiche_head($head,
'card', $langs->trans(
"VariousPayment"), -1,
$object->picto, 0,
'',
'', 0,
'', 1);
645 $morehtmlref =
'<div class="refidno">';
648 $langs->load(
"projects");
650 if ($permissiontoadd) {
651 $morehtmlref .= img_picto($langs->trans(
"Project"),
'project',
'class="pictofixedwidth"');
652 if ($action !=
'classify') {
653 $morehtmlref .=
'<a class="editfielda" href="' .
dolBuildUrl($_SERVER[
'PHP_SELF'], [
'action' =>
'classify',
'id' =>
$object->id],
true).
'">' . img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> ';
655 if ($action ==
'classify') {
657 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'">';
658 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
659 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
660 $morehtmlref .= $formproject->select_projects(-1, (
string)
$object->fk_project,
'projectid', 0, 0, 1, 1, 0, 0, 0,
'', 1, 0,
'maxwidth500 widthcentpercentminusxx');
661 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
662 $morehtmlref .=
'</form>';
664 $morehtmlref .= $form->form_project($_SERVER[
'PHP_SELF'].
'?id='.
$object->id, (
int)
$object->socid, (
string)
$object->fk_project, ($action ==
'classify' ?
'projectid' :
'none'), 0, 0, 0, 1,
'',
'maxwidth300');
667 if (!empty(
$object->fk_project)) {
669 $proj->fetch(
$object->fk_project);
670 $morehtmlref .= $proj->getNomUrl(1);
672 $morehtmlref .=
'<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).
'</span>';
678 $morehtmlref .=
'</div>';
679 $linkback =
'<a href="' . DOL_URL_ROOT .
'/compta/bank/various_payment/list.php?restore_lastsearch_values=1' . (!empty($socid) ?
'&socid=' . $socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
681 $morehtmlstatus =
'';
683 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlstatus);
685 print
'<div class="fichecenter">';
686 print
'<div class="underbanner clearboth"></div>';
688 print
'<table class="border centpercent tableforfield">';
691 print
'<tr><td class="titlefield">'.$langs->trans(
"Label").
'</td><td>'.
$object->label.
'</td></tr>';
695 print
'<td>'.$langs->trans(
"DatePayment").
'</td><td>';
700 print
'<tr><td>'.$langs->trans(
"DateValue").
'</td><td>';
706 $sens = $langs->trans(
"Credit");
708 $sens = $langs->trans(
"Debit");
710 print
'<tr><td>'.$langs->trans(
"Sens").
'</td><td>'.$sens.
'</td></tr>';
712 print
'<tr><td>'.$langs->trans(
"Amount").
'</td><td><span class="amount">' .
price(
$object->amount, 0, $langs, 1, -1, -1,
$conf->currency).
'</span></td></tr>';
718 print
'<tr><td class="nowrap">';
719 print $form->editfieldkey(
'AccountAccounting',
'accountancy_code',
$object->accountancy_code, $object, (
int) (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
721 if ($action ==
'editaccountancy_code' && (!$alreadyaccounted && $permissiontoadd)) {
723 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id,
$object->accountancy_code,
'accountancy_code', 0, 1,
'', 1);
726 $accountingaccount->fetch(0,
$object->accountancy_code, 1);
728 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
732 print
'<tr><td class="nowrap">';
733 print $langs->trans(
"AccountAccounting");
735 print
$object->accountancy_code;
740 print
'<tr><td class="nowrap">';
741 print $form->editfieldkey(
'SubledgerAccount',
'subledger_account',
$object->subledger_account, $object, (
int) (!$alreadyaccounted && $permissiontoadd),
'string',
'', 0);
743 if ($action ==
'editsubledger_account' && (!$alreadyaccounted && $permissiontoadd)) {
746 print $formaccounting->formAccountingAccount($_SERVER[
'PHP_SELF'] .
'?id=' .
$object->id,
$object->subledger_account,
'subledger_account', 1, 1,
'', 1);
748 print $form->editfieldval(
'SubledgerAccount',
'subledger_account',
$object->subledger_account, $object, (!$alreadyaccounted && $permissiontoadd),
'string',
'',
null,
null,
'', 1,
'lengthAccounta');
755 $bankaccountnotfound = 0;
759 print
'<td>'.$langs->trans(
'BankTransactionLine').
'</td>';
760 print
'<td colspan="3">';
763 $result = $bankline->fetch(
$object->fk_bank);
766 $bankaccountnotfound = 1;
768 print $bankline->getNomUrl(1, 0,
'showall');
771 $bankaccountnotfound = 1;
773 print
'<span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span>';
780 $parameters = array(
'socid' =>
$object->id);
781 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
787 print
'<div class="clearboth"></div>';
795 print
'<div class="tabsAction">' .
"\n";
801 if ($permissiontoadd) {
802 print
'<div class="inline-block divButAction">'.dolGetButtonAction($langs->trans(
"ToClone"), $langs->trans(
"ToClone"),
'clone',
dolBuildUrl(DOL_URL_ROOT.
"/compta/bank/various_payment/card.php", [
'id' =>
$object->id,
'action' =>
'clone'],
true),
'',
true, array(
'attr' => array(
'class' =>
'reposition'))).
'</div>';
806 if (empty(
$object->rappro) || $bankaccountnotfound) {
807 if ($permissiontoadd) {
808 if ($alreadyaccounted) {
809 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"Accounted").
'">'.$langs->trans(
"Delete").
'</a></div>';
811 print
'<div class="inline-block divButAction">'.dolGetButtonAction($langs->trans(
"Delete"), $langs->trans(
"Delete"),
'delete',
'card.php?id='.$object->id.
'&action=delete&token=' .
newToken(),
'',
true, array(
'attr' => array(
'class' =>
'reposition'))).
'</div>'.
"\n";
814 print
'<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.(dol_escape_htmltag($langs->trans(
"NotAllowed"))).
'">'.$langs->trans(
"Delete").
'</a></div>';
817 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.
$propal type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
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($blockedlogusagealreadychecked=0, $blockedlogmoduleonalreadychecked=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.
recordNotFound($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Displays an error page when a record is not found.
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.
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.
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.
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, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTFLOAT($paramname, $rounding='', $option=2)
Return the value of a $_GET or $_POST supervariable, converted into float.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_clone($srcobject, $native=2)
Create a clone of instance of object (new instance with same value for each properties) With native =...
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).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.