35require
'../../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
43$langs->loadLangs(array(
'banks',
'categories',
'compta',
'bills',
'other'));
44if (isModEnabled(
'member')) {
45 $langs->load(
"members");
47if (isModEnabled(
'don')) {
48 $langs->load(
"donations");
50if (isModEnabled(
'loan')) {
53if (isModEnabled(
'salaries')) {
54 $langs->load(
"salaries");
63$action =
GETPOST(
'action',
'aZ09');
64$confirm =
GETPOST(
'confirm',
'alpha');
65$orig_account =
GETPOST(
"orig_account");
66$backtopage =
GETPOST(
'backtopage',
'alpha');
67$cancel =
GETPOST(
'cancel',
'alpha');
70$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref :
''));
71$fieldtype = (!empty($ref) ?
'ref' :
'rowid');
74 $socid = $user->socid;
77$result =
restrictedArea($user,
'banque', $accountoldid,
'bank_account');
78if (!$user->hasRight(
'banque',
'lire') && !$user->hasRight(
'banque',
'consolidate')) {
82$hookmanager->initHooks(array(
'bankline'));
85$extrafields->fetch_name_optionals_label(
$object->element);
91$parameters = array(
'socid' => $socid);
92$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
98 header(
"Location: ".$backtopage);
104if ($user->hasRight(
'banque',
'consolidate') && $action ==
'donext') {
107} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'doprev') {
110} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvnext') {
113} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvprev') {
118if ($action ==
'confirm_delete_categ' && $confirm ==
"yes" && $user->hasRight(
'banque',
'modifier')) {
120 if (!empty($rowid) && !empty($cat1)) {
121 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bank_class WHERE lineid = ".((int) $rowid).
" AND fk_categ = ".((int) $cat1);
122 if (!$db->query($sql)) {
130if ($user->hasRight(
'banque',
'modifier') && $action ==
"update") {
133 $result =
$object->fetch($rowid);
135 dol_syslog(
'Failed to read bank line with id '.$rowid, LOG_WARNING);
140 $acsource->fetch($accountoldid);
146 $actarget->fetch($accountoldid);
149 if (!($actarget->id > 0)) {
150 setEventMessages($langs->trans(
"ErrorFailedToLoadBankAccount"),
null,
'errors');
154 setEventMessages($langs->trans(
"ErrorCashAccountAcceptsOnlyCashMoney"),
null,
'errors');
164 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
167 if (GETPOSTISSET(
'value')) {
169 $sql .=
" fk_type='".$db->escape(empty($type) &&
$object->fk_type ==
'SOLD' ?
'SOLD' : $type).
"',";
171 if (GETPOSTISSET(
'num_chq')) {
172 $sql .=
" num_chq='".$db->escape(
GETPOST(
"num_chq")).
"',";
174 if (GETPOSTISSET(
'banque')) {
175 $sql .=
" banque='".$db->escape(
GETPOST(
"banque")).
"',";
177 if (GETPOSTISSET(
'emetteur')) {
178 $sql .=
" emetteur='".$db->escape(
GETPOST(
"emetteur")).
"',";
182 if (GETPOSTISSET(
'label')) {
183 $sql .=
" label = '".$db->escape(
GETPOST(
"label")).
"',";
185 if (GETPOSTISSET(
'amount')) {
186 $sql .=
" amount= '".$db->escape($amount).
"',";
188 if (GETPOSTISSET(
'dateomonth')) {
189 $sql .=
" dateo = '".$db->idate($dateop).
"',";
191 if (GETPOSTISSET(
'datevmonth')) {
192 $sql .=
" datev = '".$db->idate($dateval).
"',";
195 $sql .=
" fk_account = ".((int) $actarget->id);
196 $sql .=
" WHERE rowid = ".((int)
$object->id);
198 $result = $db->query($sql);
204 $arrayofcategs =
GETPOST(
'custcats',
'array');
205 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bank_class WHERE lineid = ".((int) $rowid);
206 if (!$db->query($sql)) {
210 if (count($arrayofcategs)) {
211 foreach ($arrayofcategs as $val) {
212 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"bank_class (lineid, fk_categ) VALUES (".((int) $rowid).
", ".((int) $val).
")";
213 if (!$db->query($sql)) {
223 $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
238if ($user->hasRight(
'banque',
'consolidate') && ($action ==
'num_releve' || $action ==
'setreconcile')) {
239 $num_rel = trim(
GETPOST(
"num_rel"));
240 $rappro =
GETPOST(
'reconciled') ? 1 : 0;
243 if ($rappro && empty($num_rel)) {
244 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountStatement")),
null,
'errors');
251 $oldNum_rel =
$object->num_releve;
254 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
255 $sql .=
" SET num_releve = ".($num_rel ?
"'".$db->escape($num_rel).
"'" :
"null");
256 if (empty($num_rel)) {
257 $sql .=
", rappro = 0";
259 $sql .=
", rappro = ".((int) $rappro);
261 $sql .=
" WHERE rowid = ".((int) $rowid);
263 $updatePathFile =
true;
266 dol_syslog(
"line.php update bank line to set the new bank receipt number", LOG_DEBUG);
268 $result = $db->query($sql);
295 if ($result && $updatePathFile && $update_dir) {
299 $langs->load(
"errors");
300 setEventMessages($langs->trans(
"ErrorFailToRenameDir", $oldfilepath, $filepath),
null,
'mesgs');
312$form =
new Form($db);
314llxHeader(
'', $langs->trans(
"BankTransaction"));
316$arrayselected = array();
319$cats = $c->containing($rowid, Categorie::TYPE_BANK_LINE);
320if (is_array($cats)) {
321 foreach ($cats as $cat) {
322 $arrayselected[] = $cat->id;
326$head = bankline_prepare_head($rowid);
329$sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro,";
330$sql .=
" b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account, b.fk_bordereau as receiptid,";
331$sql .=
" b.emetteur,b.banque";
332$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
333$sql .=
" WHERE rowid=".((int) $rowid);
334$sql .=
" ORDER BY dateo ASC";
335$result = $db->query($sql);
339 if ($db->num_rows($result)) {
340 $objp = $db->fetch_object($result);
342 $total = $total + $objp->amount;
345 $acct->fetch($objp->fk_account);
346 $account = $acct->id;
349 $bankline->fetch($rowid, $ref);
351 $links = $acct->get_url($rowid);
352 $bankline->load_previous_next_ref(
'',
'rowid');
355 if ($action ==
'delete_categ') {
356 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);
359 print
'<form name="update" method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$rowid.
'">';
360 print
'<input type="hidden" name="token" value="'.newToken().
'">';
361 print
'<input type="hidden" name="action" value="update">';
362 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
363 print
'<input type="hidden" name="account" value="'.$acct->id.
'">';
365 print
dol_get_fiche_head($head,
'bankline', $langs->trans(
'LineRecord'), 0,
'accountline', 0);
367 $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>';
370 dol_banner_tab($bankline,
'rowid', $linkback);
372 print
'<div class="fichecenter2">';
374 print
'<div class="underbanner clearboth"></div>';
375 print
'<table class="border centpercent tableforfield">';
380 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"BankAccount").
'</td>';
383 if (($objp->rappro || $bankline->getVentilExportCompta()) && $objp->fk_account > 0) {
384 print $acct->getNomUrl(1,
'transactions',
'reflabel');
386 print
img_picto(
'',
'bank_account',
'class="paddingright"');
387 print $form->select_comptes($acct->id,
'accountid', 0,
'', ($acct->id > 0 ? $acct->id : 1),
'', 0,
'', 1);
394 print
'<tr><td class="tdtop">'.$langs->trans(
"Links").
'</td>';
396 foreach ($links as $key => $val) {
400 if ($links[$key][
'type'] ==
'payment') {
401 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
403 $paymenttmp->fetch($links[$key][
'url_id']);
404 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
409 print $paymenttmp->getNomUrl(1);
410 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
411 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
413 $paymenttmp->fetch($links[$key][
'url_id']);
414 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
419 print $paymenttmp->getNomUrl(1);
420 } elseif ($links[$key][
'type'] ==
'company') {
422 $societe->fetch($links[$key][
'url_id']);
423 print $societe->getNomUrl(1);
424 } elseif ($links[$key][
'type'] ==
'sc') {
425 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
426 print
img_object($langs->trans(
'SocialContribution'),
'bill').
' ';
427 print $langs->trans(
"SocialContribution").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
429 } elseif ($links[$key][
'type'] ==
'vat') {
430 print
'<a href="'.DOL_URL_ROOT.
'/compta/tva/card.php?id='.$links[$key][
'url_id'].
'">';
431 print
img_object($langs->trans(
'VATDeclaration'),
'bill').
' ';
432 print $langs->trans(
"VATDeclaration").($links[$key][
'label'] ?
' '.$links[$key][
'label'] :
'');
434 } elseif ($links[$key][
'type'] ==
'salary') {
435 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
436 print
img_object($langs->trans(
'Salary'),
'bill').
' ';
437 print $langs->trans(
"Salary").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
439 } elseif ($links[$key][
'type'] ==
'payment_sc') {
440 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
441 print
img_object($langs->trans(
'Payment'),
'payment').
' ';
442 print $langs->trans(
"SocialContributionPayment");
444 } elseif ($links[$key][
'type'] ==
'payment_vat') {
445 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_vat/card.php?id='.$links[$key][
'url_id'].
'">';
446 print
img_object($langs->trans(
'VATPayment'),
'payment').
' ';
447 print $langs->trans(
"VATPayment");
449 } elseif ($links[$key][
'type'] ==
'payment_salary') {
450 print
'<a href="'.DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id='.$links[$key][
'url_id'].
'">';
451 print
img_object($langs->trans(
'PaymentSalary'),
'payment').
' ';
452 print $langs->trans(
"SalaryPayment");
454 } elseif ($links[$key][
'type'] ==
'payment_loan') {
455 print
'<a href="'.DOL_URL_ROOT.
'/loan/payment/card.php?id='.$links[$key][
'url_id'].
'">';
456 print
img_object($langs->trans(
'LoanPayment'),
'payment').
' ';
457 print $langs->trans(
"PaymentLoan");
459 } elseif ($links[$key][
'type'] ==
'loan') {
460 print
'<a href="'.DOL_URL_ROOT.
'/loan/card.php?id='.$links[$key][
'url_id'].
'">';
461 print
img_object($langs->trans(
'Loan'),
'bill').
' ';
462 print $langs->trans(
"Loan");
464 } elseif ($links[$key][
'type'] ==
'member') {
465 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
466 print
img_object($langs->trans(
'Member'),
'user').
' ';
467 print $links[$key][
'label'];
469 } elseif ($links[$key][
'type'] ==
'payment_donation') {
470 print
'<a href="'.DOL_URL_ROOT.
'/don/payment/card.php?id='.$links[$key][
'url_id'].
'">';
471 print
img_object($langs->trans(
'Donation'),
'payment').
' ';
472 print $langs->trans(
"DonationPayment");
474 } elseif ($links[$key][
'type'] ==
'banktransfert') {
475 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$links[$key][
'url_id'].
'">';
476 print
img_object($langs->trans(
'Transaction'),
'payment').
' ';
477 print $langs->trans(
"TransactionOnTheOtherAccount");
479 } elseif ($links[$key][
'type'] ==
'user') {
480 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
481 print
img_object($langs->trans(
'User'),
'user').
' ';
482 print $langs->trans(
"User");
484 } elseif ($links[$key][
'type'] ==
'payment_various') {
485 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/various_payment/card.php?id='.$links[$key][
'url_id'].
'">';
486 print
img_object($langs->trans(
'VariousPayment'),
'payment').
' ';
487 print $langs->trans(
"VariousPayment");
491 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
493 print $links[$key][
'label'];
501 print
"<tr><td>".$langs->trans(
"Type").
" / ".$langs->trans(
"Numero");
502 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
504 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
506 $form->select_types_paiements($objp->fk_type,
"value",
'', 2);
507 print
'<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ?
'' : $objp->num_chq).
'">';
508 if ($objp->receiptid) {
509 include_once DOL_DOCUMENT_ROOT.
'/compta/paiement/cheque/class/remisecheque.class.php';
511 $receipt->fetch($objp->receiptid);
512 print
' '.$langs->trans(
"CheckReceipt").
': '.$receipt->getNomUrl(2);
521 print
"<tr><td>".$langs->trans(
"CheckTransmitter");
522 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
524 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
526 print
'<input type="text" class="flat minwidth200" name="emetteur" value="'.(empty($objp->emetteur) ?
'' :
dol_escape_htmltag($objp->emetteur)).
'">';
529 print
'<td>'.$objp->emetteur.
'</td>';
534 print
"<tr><td>".$langs->trans(
"Bank");
535 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
537 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
539 print
'<input type="text" class="flat minwidth200" name="banque" value="'.(empty($objp->banque) ?
'' :
dol_escape_htmltag($objp->banque)).
'">';
542 print
'<td>'.dol_escape_htmltag($objp->banque).
'</td>';
547 print
'<tr><td>'.$langs->trans(
"DateOperation").
'</td>';
548 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
550 print $form->selectDate($db->jdate($objp->do),
'dateo', 0, 0, 0,
'update', 1, 0, $objp->rappro);
551 if (!$objp->rappro) {
553 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=doprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
555 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=donext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
567 print
"<tr><td>".$langs->trans(
"DateValue").
"</td>";
568 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
570 print $form->selectDate($db->jdate($objp->dv),
'datev', 0, 0, 0,
'update', 1, 0, $objp->rappro);
571 if (!$objp->rappro) {
573 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
575 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.
newToken().
'">';
588 print
"<tr><td>".$langs->trans(
"Label").
"</td>";
589 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
591 print
'<input name="label" class="flat minwidth300" '.($objp->rappro ?
' disabled' :
'').
' value="';
592 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
594 print $langs->trans($reg[1]);
602 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
604 print $langs->trans($reg[1]);
613 print
"<tr><td>".$langs->trans(
"Amount").
"</td>";
614 if ($user->hasRight(
'banque',
'modifier')) {
616 print
'<input name="amount" class="flat maxwidth100" '.($objp->rappro ?
' disabled' :
'').
' value="'.
price($objp->amount).
'"> '.$langs->trans(
"Currency".$acct->currency_code);
620 print
price($objp->amount);
626 if (isModEnabled(
'category') && $user->hasRight(
'categorie',
'lire')) {
627 $langs->load(
'categories');
630 print
'<tr><td class="toptd">'.$form->editfieldkey(
'RubriquesTransactions',
'custcats',
'', $object, 0).
'</td><td>';
631 $cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE,
null,
'parent',
null,
null, 1);
633 $arrayselected = array();
636 $cats = $c->containing($bankline->id, Categorie::TYPE_BANK_LINE);
637 if (is_array($cats)) {
638 foreach ($cats as $cat) {
639 $arrayselected[] = $cat->id;
642 print
img_picto(
'',
'category',
'class="paddingright"').$form->multiselectarray(
'custcats', $cate_arbo, $arrayselected,
null,
null,
null,
null,
"90%");
647 $parameters = array();
648 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $bankline, $action);
649 print $hookmanager->resPrint;
650 if (empty($reshook)) {
651 print $bankline->showOptionals($extrafields, ($objp->rappro ?
'view' :
'create'), $parameters);
684 print
'<div class="center"><input type="submit" class="button" value="'.$langs->trans(
"Update").
'"></div><br>';
691 if ($acct->canBeConciliated() > 0) {
692 print
load_fiche_titre($langs->trans(
"Reconciliation"),
'',
'bank_account');
695 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$objp->rowid.
'">';
696 print
'<input type="hidden" name="token" value="'.newToken().
'">';
697 print
'<input type="hidden" name="action" value="setreconcile">';
698 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
699 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
701 print
'<div class="fichecenter">';
703 print
'<table class="border centpercent">';
705 print
'<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans(
"AccountStatement"), $langs->trans(
"InputReceiptNumber")).
"</td>";
706 if ($user->hasRight(
'banque',
'consolidate')) {
709 print
'<input name="num_rel_bis" id="num_rel_bis" class="flat" type="text" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
710 print
'<input name="num_rel" id="num_rel" class="flat" type="hidden" value="'.$objp->num_releve.
'">';
712 print
'<input name="num_rel" id="num_rel" class="flat" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
714 if ($objp->num_releve) {
715 print
' <a href="'.DOL_URL_ROOT.
'/compta/bank/releve.php?num='.$objp->num_releve.
'&account='.$acct->id.
'">('.$langs->trans(
"AccountStatement").
' '.$objp->num_releve.
')</a>';
719 print
'<td>'.$objp->num_releve.
'</td>';
723 print
'<tr><td><label for="reconciled">'.$langs->trans(
"BankLineConciliated").
'</label></td>';
724 if ($user->hasRight(
'banque',
'consolidate')) {
726 print
'<input type="checkbox" id="reconciled" name="reconciled" class="flat" '.(GETPOSTISSET(
"reconciled") ? (
GETPOST(
"reconciled") ?
' checked="checked"' :
'') : ($objp->rappro ?
' checked="checked"' :
'')).
'">';
729 <script type="text/javascript">
730 jQuery(document).ready(function() {
731 $("#reconciled").click(function(){
732 console.log("We click on checkbox reconciled "+$("#reconciled").prop("checked"));
733 if ($("#reconciled").prop("checked") == false) {
734 console.log("we remove disabled");
735 jQuery("#num_rel_bis").removeAttr("disabled");
736 jQuery("#num_rel").removeAttr("disabled");
737 jQuery("#num_rel_bis").attr("type", "hidden");
738 jQuery("#num_rel").attr("type", "text");
739 jQuery("#num_rel_bis").hide();
740 jQuery("#num_rel").show();
751 print
'<td>'.yn($objp->rappro).
'</td>';
758 print
'<div class="center">';
760 print
'<input type="submit" class="button" value="'.$langs->trans(
"Update").
'">';
763 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
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 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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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_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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_edit_add($titlealt='default', $other='')
Show logo +.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
img_edit_remove($titlealt='default', $other='')
Show logo -.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.