35require
'../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
45require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
51$langs->loadLangs(array(
'banks',
'categories',
'compta',
'bills',
'other'));
53 $langs->load(
"members");
56 $langs->load(
"donations");
62 $langs->load(
"salaries");
71$action =
GETPOST(
'action',
'aZ09');
72$confirm =
GETPOST(
'confirm',
'alpha');
73$orig_account =
GETPOST(
"orig_account");
74$backtopage =
GETPOST(
'backtopage',
'alpha');
75$cancel =
GETPOST(
'cancel',
'alpha');
78$fieldvalue = (!empty($id) ?
$id : (!empty($ref) ? $ref :
''));
79$fieldtype = (!empty($ref) ?
'ref' :
'rowid');
82 $socid = $user->socid;
86$hookmanager->initHooks(array(
'bankline'));
88$result =
restrictedArea($user,
'banque', $accountoldid,
'bank_account');
89if (!$user->hasRight(
'banque',
'lire') && !$user->hasRight(
'banque',
'consolidate')) {
94$extrafields->fetch_name_optionals_label(
$object->element);
99 dol_syslog(
'Failed to read bank line with id '.$rowid, LOG_WARNING);
111$parameters = array(
'socid' => $socid);
112$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
114 setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
118 header(
"Location: ".$backtopage);
124if ($user->hasRight(
'banque',
'consolidate') && $action ==
'donext') {
127} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'doprev') {
130} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvnext') {
133} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvprev') {
138if ($action ==
'confirm_delete_categ' && $confirm ==
"yes" && $user->hasRight(
'banque',
'modifier')) {
140 if (!empty($rowid) && !empty($cat1)) {
141 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"category_bankline WHERE lineid = ".((int) $rowid).
" AND fk_categ = ".((int) $cat1);
142 if (!$db->query($sql)) {
143 dol_print_error($db);
146 setEventMessages($langs->trans(
"MissingIds"),
null,
'errors');
150if ($user->hasRight(
'banque',
'modifier') && $action ==
"update") {
152 $acsource->fetch($accountoldid);
158 $actarget->fetch($accountoldid);
161 if (!($actarget->id > 0)) {
162 setEventMessages($langs->trans(
"ErrorFailedToLoadBankAccount"),
null,
'errors');
166 setEventMessages($langs->trans(
"ErrorCashAccountAcceptsOnlyCashMoney"),
null,
'errors');
176 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
181 $sql .=
" fk_type='".$db->escape(empty($type) &&
$object->fk_type ==
'SOLD' ?
'SOLD' : $type).
"',";
184 $sql .=
" num_chq='".$db->escape(
GETPOST(
"num_chq")).
"',";
187 $sql .=
" banque='".$db->escape(
GETPOST(
"banque")).
"',";
190 $sql .=
" emetteur='".$db->escape(
GETPOST(
"emetteur")).
"',";
195 $sql .=
" label = '".$db->escape(
GETPOST(
"label")).
"',";
198 $sql .=
" amount= '".$db->escape($amount).
"',";
201 $sql .=
" dateo = '".$db->idate($dateop).
"',";
204 $sql .=
" datev = '".$db->idate($dateval).
"',";
207 $sql .=
" fk_account = ".((int) $actarget->id);
208 $sql .=
" WHERE rowid = ".((int)
$object->id);
210 $result = $db->query($sql);
216 $arrayofcategs =
GETPOST(
'custcats',
'array');
217 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"category_bankline WHERE lineid = ".((int) $rowid);
218 if (!$db->query($sql)) {
220 dol_print_error($db);
222 if (count($arrayofcategs)) {
223 foreach ($arrayofcategs as $val) {
224 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"category_bankline (lineid, fk_categ) VALUES (".((int) $rowid).
", ".((int) $val).
")";
225 if (!$db->query($sql)) {
227 dol_print_error($db);
235 $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
240 setEventMessages($langs->trans(
"RecordSaved"),
null,
'mesgs');
244 dol_print_error($db);
250if ($user->hasRight(
'banque',
'consolidate') && ($action ==
'num_releve' || $action ==
'setreconcile')) {
251 $num_rel = trim(
GETPOST(
"num_rel"));
252 $rappro =
GETPOST(
'reconciled') ? 1 : 0;
255 if ($rappro && empty($num_rel)) {
256 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountStatement")),
null,
'errors');
263 $oldNum_rel =
$object->num_releve;
266 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
267 $sql .=
" SET num_releve = ".($num_rel ?
"'".$db->escape($num_rel).
"'" :
"null");
268 if (empty($num_rel)) {
269 $sql .=
", rappro = 0";
271 $sql .=
", rappro = ".((int) $rappro);
273 $sql .=
" WHERE rowid = ".((int) $rowid);
275 $updatePathFile =
true;
278 dol_syslog(
"line.php update bank line to set the new bank receipt number", LOG_DEBUG);
280 $result = $db->query($sql);
283 $object->num_releve = $num_rel;
284 $object->rappro = (empty($num_rel) ? 0 : $rappro);
287 $triggerres =
$object->call_trigger(
'BANKACCOUNTLINE_MODIFY', $user);
288 if ($triggerres < 0) {
321 if ($result && $updatePathFile && $update_dir) {
322 setEventMessages($langs->trans(
"RecordSaved"),
null,
'mesgs');
325 $langs->load(
"errors");
326 setEventMessages($langs->trans(
"ErrorFailToRenameDir", $oldfilepath, $filepath),
null,
'mesgs');
340$form =
new Form($db);
342llxHeader(
'', $langs->trans(
"BankTransaction"));
344$arrayselected = array();
347$cats =
$c->containing($rowid, Categorie::TYPE_BANK_LINE);
348if (is_array($cats)) {
349 foreach ($cats as $cat) {
350 $arrayselected[] = $cat->id;
354$head = bankline_prepare_head($rowid);
357$sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro,";
358$sql .=
" b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account, b.fk_bordereau as receiptid,";
359$sql .=
" b.emetteur,b.banque";
360$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
361$sql .=
" WHERE rowid=".((int) $rowid);
362$sql .=
" ORDER BY dateo ASC";
363$result = $db->query($sql);
367 if ($db->num_rows($result)) {
368 $objp = $db->fetch_object($result);
370 $total += $objp->amount;
373 $acct->fetch($objp->fk_account);
374 $account = $acct->id;
377 $bankline->fetch($rowid, $ref);
379 $links = $acct->get_url($rowid);
380 $bankline->load_previous_next_ref(
'',
'rowid');
383 if ($action ==
'delete_categ') {
384 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?rowid=".urlencode((
string) ($rowid)).
"&cat1=".urlencode((
string) (
GETPOSTINT(
"fk_categ"))).
"&orig_account=".urlencode((
string) ($orig_account)), $langs->trans(
"RemoveFromRubrique"), $langs->trans(
"RemoveFromRubriqueConfirm"),
"confirm_delete_categ",
'',
'yes', 1);
387 print
'<form name="update" method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$rowid.
'">';
388 print
'<input type="hidden" name="token" value="'.newToken().
'">';
389 print
'<input type="hidden" name="action" value="update">';
390 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
391 print
'<input type="hidden" name="account" value="'.$acct->id.
'">';
393 print
dol_get_fiche_head($head,
'bankline', $langs->trans(
'LineRecord'), 0,
'accountline', 0);
395 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?restore_lastsearch_values=1'.(
GETPOSTINT(
'account', 1) ?
'&id='.GETPOSTINT(
'account', 1) :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
398 dol_banner_tab($bankline,
'rowid', $linkback);
400 print
'<div class="fichecenter2">';
402 print
'<div class="underbanner clearboth"></div>';
403 print
'<table class="border centpercent tableforfield">';
408 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"BankAccount").
'</td>';
411 if (($objp->rappro || $bankline->getVentilExportCompta()) && $objp->fk_account > 0) {
412 print $acct->getNomUrl(1,
'transactions',
'reflabel');
414 print img_picto(
'',
'bank_account',
'class="paddingright"');
415 print $form->select_comptes($acct->id,
'accountid', 0,
'', ($acct->id > 0 ? $acct->id : 1),
'', 0,
'', 1);
422 print
'<tr><td class="tdtop">'.$langs->trans(
"Links").
'</td>';
424 foreach ($links as $key => $val) {
428 if ($links[$key][
'type'] ==
'payment') {
429 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
431 $paymenttmp->fetch($links[$key][
'url_id']);
432 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
437 print $paymenttmp->getNomUrl(1);
438 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
439 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
441 $paymenttmp->fetch($links[$key][
'url_id']);
442 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
447 print $paymenttmp->getNomUrl(1);
448 } elseif ($links[$key][
'type'] ==
'company') {
450 $societe->fetch($links[$key][
'url_id']);
451 print $societe->getNomUrl(1);
452 } elseif ($links[$key][
'type'] ==
'sc') {
453 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
454 print img_object($langs->trans(
'SocialContribution'),
'bill').
' ';
455 print $langs->trans(
"SocialContribution").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
457 } elseif ($links[$key][
'type'] ==
'vat') {
458 print
'<a href="'.DOL_URL_ROOT.
'/compta/tva/card.php?id='.$links[$key][
'url_id'].
'">';
459 print img_object($langs->trans(
'VATDeclaration'),
'bill').
' ';
460 print $langs->trans(
"VATDeclaration").($links[$key][
'label'] ?
' '.$links[$key][
'label'] :
'');
462 } elseif ($links[$key][
'type'] ==
'salary') {
463 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
464 print img_object($langs->trans(
'Salary'),
'bill').
' ';
465 print $langs->trans(
"Salary").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
467 } elseif ($links[$key][
'type'] ==
'payment_sc') {
468 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
469 print img_object($langs->trans(
'Payment'),
'payment').
' ';
470 print $langs->trans(
"SocialContributionPayment");
472 } elseif ($links[$key][
'type'] ==
'payment_vat') {
473 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_vat/card.php?id='.$links[$key][
'url_id'].
'">';
474 print img_object($langs->trans(
'VATPayment'),
'payment').
' ';
475 print $langs->trans(
"VATPayment");
477 } elseif ($links[$key][
'type'] ==
'payment_salary') {
478 print
'<a href="'.DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id='.$links[$key][
'url_id'].
'">';
479 print img_object($langs->trans(
'SalaryPayment'),
'payment').
' ';
480 print $langs->trans(
"SalaryPayment");
482 } elseif ($links[$key][
'type'] ==
'payment_loan') {
483 print
'<a href="'.DOL_URL_ROOT.
'/loan/payment/card.php?id='.$links[$key][
'url_id'].
'">';
484 print img_object($langs->trans(
'LoanPayment'),
'payment').
' ';
485 print $langs->trans(
"LoanPayment");
487 } elseif ($links[$key][
'type'] ==
'loan') {
488 print
'<a href="'.DOL_URL_ROOT.
'/loan/card.php?id='.$links[$key][
'url_id'].
'">';
489 print img_object($langs->trans(
'Loan'),
'bill').
' ';
490 print $langs->trans(
"Loan");
492 } elseif ($links[$key][
'type'] ==
'member') {
493 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
494 print img_object($langs->trans(
'Member'),
'user').
' ';
495 print $links[$key][
'label'];
497 } elseif ($links[$key][
'type'] ==
'payment_donation') {
498 print
'<a href="'.DOL_URL_ROOT.
'/don/payment/card.php?id='.$links[$key][
'url_id'].
'">';
499 print img_object($langs->trans(
'Donation'),
'payment').
' ';
500 print $langs->trans(
"DonationPayment");
502 } elseif ($links[$key][
'type'] ==
'banktransfert') {
503 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$links[$key][
'url_id'].
'">';
504 print img_object($langs->trans(
'Transaction'),
'payment').
' ';
505 print $langs->trans(
"TransactionOnTheOtherAccount");
507 } elseif ($links[$key][
'type'] ==
'user') {
508 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
509 print img_object($langs->trans(
'User'),
'user').
' ';
510 print $langs->trans(
"User");
512 } elseif ($links[$key][
'type'] ==
'payment_various') {
513 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/paymentvarious.class.php';
515 $paymenttmp->fetch($links[$key][
'url_id']);
516 $paymenttmp->ref = $langs->trans(
"VariousPayment").
' '.$paymenttmp->ref;
523 print $paymenttmp->getNomUrl(1);
526 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
527 print img_object(
'',
'generic').
' ';
528 print $links[$key][
'label'];
536 print
"<tr><td>".$langs->trans(
"Type").
" / ".$langs->trans(
"Numero");
537 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
539 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
541 $form->select_types_paiements($objp->fk_type,
"value",
'', 2);
542 print
'<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ?
'' : $objp->num_chq).
'">';
543 if ($objp->receiptid) {
544 include_once DOL_DOCUMENT_ROOT.
'/compta/paiement/cheque/class/remisecheque.class.php';
546 $receipt->fetch($objp->receiptid);
547 print
' '.$langs->trans(
"CheckReceipt").
': '.$receipt->getNomUrl(2);
556 print
"<tr><td>".$langs->trans(
"CheckTransmitter");
557 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
559 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
561 print
'<input type="text" class="flat minwidth200" name="emetteur" value="'.(empty($objp->emetteur) ?
'' :
dol_escape_htmltag($objp->emetteur)).
'">';
564 print
'<td>'.$objp->emetteur.
'</td>';
569 print
"<tr><td>".$langs->trans(
"Bank");
570 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
572 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
574 print
'<input type="text" class="flat minwidth200" name="banque" value="'.(empty($objp->banque) ?
'' :
dol_escape_htmltag($objp->banque)).
'">';
577 print
'<td>'.dol_escape_htmltag($objp->banque).
'</td>';
582 print
'<tr><td>'.$langs->trans(
"DateOperation").
'</td>';
583 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
585 print $form->selectDate($db->jdate($objp->do),
'dateo', 0, 0, 0,
'update', 1, 0, $objp->rappro);
586 if (!$objp->rappro) {
588 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=doprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
589 print img_edit_remove().
"</a> ";
590 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=donext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
591 print img_edit_add().
"</a>";
602 print
"<tr><td>".$langs->trans(
"DateValue").
"</td>";
603 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
605 print $form->selectDate($db->jdate($objp->dv),
'datev', 0, 0, 0,
'update', 1, 0, $objp->rappro);
606 if (!$objp->rappro) {
608 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
609 print img_edit_remove().
"</a> ";
610 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
611 print img_edit_add().
"</a>";
623 print
"<tr><td>".$langs->trans(
"Label").
"</td>";
624 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
626 print
'<input name="label" class="flat minwidth300" '.($objp->rappro ?
' disabled' :
'').
' value="';
627 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
629 print $langs->trans($reg[1]);
637 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
639 print $langs->trans($reg[1]);
648 print
"<tr><td>".$langs->trans(
"Amount").
"</td>";
649 if ($user->hasRight(
'banque',
'modifier')) {
651 print
'<input name="amount" class="flat maxwidth100" '.($objp->rappro ?
' disabled' :
'').
' value="'.
price($objp->amount).
'"> '.$langs->trans(
"Currency".$acct->currency_code);
655 print
price($objp->amount);
661 if (
isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
662 $langs->load(
'categories');
665 print
'<tr><td class="toptd">'.$form->editfieldkey(
'RubriquesTransactions',
'custcats',
'', $object, 0).
'</td><td>';
666 print $form->selectCategories(Categorie::TYPE_BANK_LINE,
'custcats', $object);
671 $parameters = array();
672 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $bankline, $action);
673 print $hookmanager->resPrint;
674 if (empty($reshook)) {
675 print $bankline->showOptionals($extrafields, ($objp->rappro ?
'view' :
'create'), $parameters);
708 print
'<div class="center"><input type="submit" class="button" value="'.$langs->trans(
"Update").
'"></div><br>';
715 if ($acct->canBeConciliated() > 0) {
716 print
load_fiche_titre($langs->trans(
"Reconciliation"),
'',
'bank_account');
719 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$objp->rowid.
'">';
720 print
'<input type="hidden" name="token" value="'.newToken().
'">';
721 print
'<input type="hidden" name="action" value="setreconcile">';
722 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
723 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
725 print
'<div class="fichecenter">';
727 print
'<table class="border centpercent">';
729 print
'<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans(
"AccountStatement"), $langs->trans(
"InputReceiptNumber")).
"</td>";
730 if ($user->hasRight(
'banque',
'consolidate')) {
733 print
'<input name="num_rel_bis" id="num_rel_bis" class="flat" type="text" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
734 print
'<input name="num_rel" id="num_rel" class="flat" type="hidden" value="'.$objp->num_releve.
'">';
736 print
'<input name="num_rel" id="num_rel" class="flat" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
738 if ($objp->num_releve) {
739 print
' <a href="'.DOL_URL_ROOT.
'/compta/bank/releve.php?num='.$objp->num_releve.
'&account='.$acct->id.
'">('.$langs->trans(
"AccountStatement").
' '.$objp->num_releve.
')</a>';
743 print
'<td>'.$objp->num_releve.
'</td>';
747 print
'<tr><td><label for="reconciled">'.$langs->trans(
"BankLineConciliated").
'</label></td>';
748 if ($user->hasRight(
'banque',
'consolidate')) {
750 print
'<input type="checkbox" id="reconciled" name="reconciled" class="flat" '.(GETPOSTISSET(
"reconciled") ? (
GETPOST(
"reconciled") ?
' checked="checked"' :
'') : ($objp->rappro ?
' checked="checked"' :
'')).
'">';
753 <script type="text/javascript">
754 jQuery(document).ready(function() {
755 $("#reconciled").click(function(){
756 console.log("We click on checkbox reconciled "+$("#reconciled").prop("checked"));
757 if ($("#reconciled").prop("checked") == false) {
758 console.log("we remove disabled");
759 jQuery("#num_rel_bis").removeAttr("disabled");
760 jQuery("#num_rel").removeAttr("disabled");
761 jQuery("#num_rel_bis").attr("type", "hidden");
762 jQuery("#num_rel").attr("type", "text");
763 jQuery("#num_rel_bis").hide();
764 jQuery("#num_rel").show();
775 print
'<td>'.yn($objp->rappro).
'</td>';
782 print
'<div class="center">';
784 print
'<input type="submit" class="button" value="'.$langs->trans(
"Update").
'">';
787 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
797 dol_print_error($db);
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
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.
Class to manage bank accounts.
const TYPE_CASH
Cash account.
Class to manage bank transaction lines.
Class to manage categories.
Class to manage payments for supplier invoices.
Class to manage payments of customer invoices.
Class to manage various payments.
Class to manage cheque delivery receipts.
Class to manage third parties objects (customers, suppliers, prospects...)
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...
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
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.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
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.