30require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/bookkeeping.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
40$langs->loadLangs(array(
"accountancy",
"bills",
"compta"));
42$action =
GETPOST(
'action',
'aZ09');
43$cancel =
GETPOST(
'cancel',
'aZ09');
45$optioncss =
GETPOST(
'optioncss',
'aZ');
54$accountingaccount_number =
GETPOST(
'accountingaccount_number',
'alphanohtml');
55$accountingaccount->fetch(0, $accountingaccount_number,
true);
56$accountingaccount_label = $accountingaccount->label;
58$journal_code =
GETPOST(
'code_journal',
'alpha');
59$accountingjournal->fetch(0, $journal_code);
60$journal_label = $accountingjournal->label;
62$subledger_account =
GETPOST(
'subledger_account',
'alphanohtml');
63if ($subledger_account == -1) {
64 $subledger_account =
null;
66$subledger_label =
GETPOST(
'subledger_label',
'alphanohtml');
68$label_operation =
GETPOST(
'label_operation',
'alphanohtml');
72$save =
GETPOST(
'save',
'alpha');
76$update =
GETPOST(
'update',
'alpha');
78 $action =
'confirm_update';
84if (!isModEnabled(
'accounting')) {
87if ($user->socid > 0) {
90if (!$user->hasRight(
'accounting',
'mouvements',
'lire')) {
94$permissiontoadd = $user->hasRight(
'accounting',
'mouvements',
'creer');
101$parameters = array();
102$reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
106if (empty($reshook)) {
108 header(
"Location: ".DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php');
112 if ($action ==
"confirm_update" && $permissiontoadd) {
115 if (((
float) $debit != 0.0) && ((
float) $credit != 0.0)) {
120 if (empty($accountingaccount_number) || $accountingaccount_number ==
'-1') {
122 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"AccountAccountingShort")),
null,
'errors');
129 $result =
$object->fetch($id,
null, $mode);
134 $object->numero_compte = $accountingaccount_number;
135 $object->subledger_account = $subledger_account;
136 $object->subledger_label = $subledger_label;
137 $object->label_compte = $accountingaccount_label;
138 $object->label_operation = $label_operation;
142 if ((
float) $debit != 0.0) {
147 if ((
float) $credit != 0.0) {
153 $result =
$object->update($user,
false, $mode);
157 if ($mode !=
'_tmp') {
168 } elseif ($action ==
"add" && $permissiontoadd) {
171 if (((
float) $debit != 0.0) && ((
float) $credit != 0.0)) {
176 if (empty($accountingaccount_number) || $accountingaccount_number ==
'-1') {
178 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"AccountAccountingShort")),
null,
'errors');
185 $object->numero_compte = $accountingaccount_number;
186 $object->subledger_account = $subledger_account;
187 $object->subledger_label = $subledger_label;
188 $object->label_compte = $accountingaccount_label;
189 $object->label_operation = $label_operation;
194 $object->piece_num = $piece_num;
196 $object->code_journal = $journal_code;
197 $object->journal_label = $journal_label;
201 if ((
float) $debit != 0.0) {
207 if ((
float) $credit != 0.0) {
213 $result =
$object->createStd($user,
false, $mode);
217 if ($mode !=
'_tmp') {
227 } elseif ($action ==
"confirm_delete" && $permissiontoadd) {
230 $result =
$object->fetch($id,
null, $mode);
231 $piece_num = (int)
$object->piece_num;
238 $result =
$object->delete($user, 0, $mode);
244 } elseif ($action ==
"confirm_create" && $permissiontoadd) {
249 if (!$journal_code || $journal_code ==
'-1') {
250 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Journal")),
null,
'errors');
254 if (!
GETPOST(
'doc_ref',
'alpha')) {
255 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Piece")),
null,
'errors');
268 $object->code_journal = $journal_code;
269 $object->journal_label = $journal_label;
275 $result =
$object->createStd($user, 0, $mode);
281 $reshook = $hookmanager->executeHooks(
'afterCreateBookkeeping', $parameters,
$object, $action);
283 if ($mode !=
'_tmp') {
288 $piece_num = (int)
$object->piece_num;
293 if ($action ==
'setdate' && $permissiontoadd) {
295 $result =
$object->updateByMvt($piece_num,
'doc_date', $db->idate($datedoc), $mode);
299 if ($mode !=
'_tmp') {
306 if ($action ==
'setjournal' && $permissiontoadd) {
307 $result =
$object->updateByMvt($piece_num,
'code_journal', $journal_code, $mode);
308 $result =
$object->updateByMvt($piece_num,
'journal_label', $journal_label, $mode);
312 if ($mode !=
'_tmp') {
319 if ($action ==
'setdocref' && $permissiontoadd) {
320 $refdoc =
GETPOST(
'doc_ref',
'alpha');
321 $result =
$object->updateByMvt($piece_num,
'doc_ref', $refdoc, $mode);
325 if ($mode !=
'_tmp') {
333 if ($action ==
'valid' && $permissiontoadd) {
334 $result =
$object->transformTransaction(0, $piece_num);
338 header(
"Location: list.php?sortfield=t.piece_num&sortorder=asc");
350$form =
new Form($db);
353$title = $langs->trans(
"CreateMvts");
354$help_url =
'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
355llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-accountancy accountancy-consultation page-card');
358if ($action ==
'delete') {
359 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$id.
'&mode='.$mode, $langs->trans(
'DeleteMvt'), $langs->trans(
'ConfirmDeleteMvt', $langs->transnoentitiesnoconv(
"RegistrationInAccounting")),
'confirm_delete',
'', 0, 1);
363if ($action ==
'create') {
367 $next_num_mvt =
$object->getNextNumMvt(
'_tmp');
369 if (empty($next_num_mvt)) {
373 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" name="create_mvt" method="POST">';
374 if ($optioncss !=
'') {
375 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
377 print
'<input type="hidden" name="token" value="'.newToken().
'">';
378 print
'<input type="hidden" name="action" value="confirm_create">'.
"\n";
379 print
'<input type="hidden" name="next_num_mvt" value="'.$next_num_mvt.
'">'.
"\n";
380 print
'<input type="hidden" name="mode" value="_tmp">'.
"\n";
384 print
'<table class="border centpercent">';
392 print
'<td class="titlefieldcreate fieldrequired">'.$langs->trans(
"Docdate").
'</td>';
394 print $form->selectDate(
'',
'doc_date', 0, 0, 0,
"create_mvt", 1, 1);
399 print
'<td class="fieldrequired">'.$langs->trans(
"Codejournal").
'</td>';
400 print
'<td>'.$formaccounting->select_journal($journal_code,
'code_journal', 0, 0, 1, 1).
'</td>';
404 print
'<td class="fieldrequired">'.$langs->trans(
"Piece").
'</td>';
405 print
'<td><input type="text" class="minwidth200" name="doc_ref" value="'.GETPOST(
'doc_ref',
'alpha').
'"></td>';
414 $reshookAddLine = $hookmanager->executeHooks(
'bookkeepingAddLine', $parameters,
$object, $action);
420 print $form->buttonsSaveCancel(
"Create");
426 $result =
$object->fetchPerMvt($piece_num, $mode);
431 if (!empty(
$object->piece_num)) {
432 $backlink =
'<a href="'.DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php?restore_lastsearch_values=1">'.$langs->trans(
'BackToList').
'</a>';
434 if ($mode ==
'_tmp') {
442 $head[$h][0] = $_SERVER[
'PHP_SELF'].
'?piece_num='.((int)
$object->piece_num).($mode ?
'&mode='.$mode :
'');
443 $head[$h][1] = $langs->trans(
"Transaction");
444 $head[$h][2] =
'transaction';
451 print
'<div class="fichecenter">';
452 print
'<div class="fichehalfleft">';
454 print
'<div class="underbanner clearboth"></div>';
455 print
'<table class="border tableforfield" width="100%">';
459 print
'<td class="titlefield">'.$langs->trans(
"NumMvts").
'</td>';
460 print
'<td>'.($mode ==
'_tmp' ?
'<span class="opacitymedium" title="Id tmp '.$object->piece_num.
'">'.$langs->trans(
"Draft").
'</span>' :
$object->piece_num).
'</td>';
465 print
'<table class="nobordernopadding centpercent"><tr><td>';
466 print $langs->trans(
'Docdate');
468 if ($action !=
'editdate') {
469 print
'<td class="right">';
470 if ($permissiontoadd) {
471 print
'<a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdate&token='.
newToken().
'&piece_num='.((int)
$object->piece_num).
'&mode='.urlencode((
string) $mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetDate'), 1).
'</a>';
475 print
'</tr></table>';
476 print
'</td><td colspan="3">';
477 if ($action ==
'editdate') {
478 print
'<form name="setdate" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.((int)
$object->piece_num).
'" method="POST">';
479 if ($optioncss !=
'') {
480 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
482 print
'<input type="hidden" name="token" value="'.newToken().
'">';
483 print
'<input type="hidden" name="action" value="setdate">';
484 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
485 print $form->selectDate(
$object->doc_date ?
$object->doc_date : - 1,
'doc_date', 0, 0, 0,
"setdate");
486 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
496 print
'<table class="nobordernopadding" width="100%"><tr><td>';
497 print $langs->trans(
'Codejournal');
499 if ($action !=
'editjournal') {
500 print
'<td class="right">';
501 if ($permissiontoadd) {
502 print
'<a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editjournal&token='.
newToken().
'&piece_num='.((int)
$object->piece_num).
'&mode='.urlencode((
string) $mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'Edit'), 1).
'</a>';
506 print
'</tr></table>';
508 if ($action ==
'editjournal') {
509 print
'<form name="setjournal" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.((int)
$object->piece_num).
'" method="POST">';
510 if ($optioncss !=
'') {
511 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
513 print
'<input type="hidden" name="token" value="'.newToken().
'">';
514 print
'<input type="hidden" name="action" value="setjournal">';
515 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
516 print $formaccounting->select_journal(
$object->code_journal,
'code_journal', 0, 0, array(), 1, 1);
517 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
527 print
'<table class="nobordernopadding centpercent"><tr><td>';
528 print $langs->trans(
'Piece');
530 if ($action !=
'editdocref') {
531 print
'<td class="right">';
532 if ($permissiontoadd) {
533 print
'<a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdocref&token='.
newToken().
'&piece_num='.((int)
$object->piece_num).
'&mode='.urlencode((
string) $mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'Edit'), 1).
'</a>';
537 print
'</tr></table>';
539 if ($action ==
'editdocref') {
540 print
'<form name="setdocref" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.((int)
$object->piece_num).
'" method="POST">';
541 if ($optioncss !=
'') {
542 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
544 print
'<input type="hidden" name="token" value="'.newToken().
'">';
545 print
'<input type="hidden" name="action" value="setdocref">';
546 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
547 print
'<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag(
$object->doc_ref).
'">';
548 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
560 print
'<div class="fichehalfright">';
562 print
'<div class="underbanner clearboth"></div>';
563 print
'<table class="border tableforfield centpercent">';
566 if (!empty(
$object->doc_type)) {
568 print
'<td class="titlefield">'.$langs->trans(
"Doctype").
'</td>';
569 print
'<td>'.$object->doc_type.
'</td>';
575 print
'<td class="titlefield">'.$langs->trans(
"DateCreation").
'</td>';
582 if ($mode !=
"_tmp") {
585 print
'<td class="titlefield">' . $langs->trans(
"DateExport") .
'</td>';
593 print
'<td class="titlefield">' . $langs->trans(
"DateValidation") .
'</td>';
600 if (!empty(
$object->import_key)) {
602 print
'<td class="titlefield">' . $langs->trans(
"ImportId") .
'</td>';
656 print
'<div class="clearboth"></div>';
660 $result =
$object->fetchAllPerMvt($piece_num, $mode);
668 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.((int)
$object->piece_num).
'" method="post">';
669 if ($optioncss !=
'') {
670 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
672 print
'<input type="hidden" name="token" value="'.newToken().
'">';
673 print
'<input type="hidden" name="doc_date" value="'.$object->doc_date.
'">'.
"\n";
674 print
'<input type="hidden" name="doc_type" value="'.$object->doc_type.
'">'.
"\n";
675 print
'<input type="hidden" name="doc_ref" value="'.$object->doc_ref.
'">'.
"\n";
676 print
'<input type="hidden" name="code_journal" value="'.$object->code_journal.
'">'.
"\n";
677 print
'<input type="hidden" name="fk_doc" value="'.$object->fk_doc.
'">'.
"\n";
678 print
'<input type="hidden" name="fk_docdet" value="'.$object->fk_docdet.
'">'.
"\n";
679 print
'<input type="hidden" name="mode" value="'.$mode.
'">'.
"\n";
681 if (count(
$object->linesmvt) > 0) {
682 print
'<div class="div-table-responsive-no-min">';
683 print
'<table class="noborder centpercent">';
688 print
'<tr class="liste_titre">';
695 if (empty(
$object->date_validation)) {
704 if (!empty(
$object->linesmvt[0])) {
705 $tmpline =
$object->linesmvt[0];
706 if (!empty($tmpline->numero_compte)) {
712 foreach (
$object->linesmvt as $line) {
713 $total_debit += $line->debit;
714 $total_credit += $line->credit;
716 if ($action ==
'update' && $line->id == $id) {
717 print
'<tr class="oddeven" data-lineid="'.((int) $line->id).
'">';
718 print
'<!-- td columns in edit mode -->';
720 print $formaccounting->select_account((GETPOSTISSET(
"accountingaccount_number") ?
GETPOST(
"accountingaccount_number",
"alpha") : $line->numero_compte),
'accountingaccount_number', 1, array(), 1, 1,
'minwidth200 maxwidth500');
728 print $formaccounting->select_auxaccount((GETPOSTISSET(
"subledger_account") ?
GETPOST(
"subledger_account",
"alpha") : $line->subledger_account),
'subledger_account', 1,
'maxwidth250',
'',
'subledger_label');
730 print
'<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET(
"subledger_account") ?
GETPOST(
"subledger_account",
"alpha") : $line->subledger_account).
'" placeholder="'.
dol_escape_htmltag($langs->trans(
"SubledgerAccount")).
'">';
733 print
'<br><input type="text" class="maxwidth150" name="subledger_label" value="'.(GETPOSTISSET(
"subledger_label") ?
GETPOST(
"subledger_label",
"alpha") : $line->subledger_label).
'" placeholder="'.
dol_escape_htmltag($langs->trans(
"SubledgerAccountLabel")).
'">';
735 print
'<td><input type="text" class="minwidth200" name="label_operation" value="'.(GETPOSTISSET(
"label_operation") ?
GETPOST(
"label_operation",
"alpha") : $line->label_operation).
'"></td>';
736 print
'<td class="right"><input type="text" class="right width50" name="debit" value="'.(GETPOSTISSET(
"debit") ?
GETPOST(
"debit",
"alpha") :
price($line->debit)).
'"></td>';
737 print
'<td class="right"><input type="text" class="right width50" name="credit" value="'.(GETPOSTISSET(
"credit") ?
GETPOST(
"credit",
"alpha") :
price($line->credit)).
'"></td>';
739 print
'<input type="hidden" name="id" value="'.$line->id.
'">'.
"\n";
740 print
'<input type="submit" class="button" name="update" value="'.$langs->trans(
"Update").
'">';
743 } elseif (empty($line->numero_compte) || (empty($line->debit) && empty($line->credit))) {
744 if (($action ==
"" || $action ==
'add') && $permissiontoadd) {
745 print
'<tr class="oddeven" data-lineid="'.((int) $line->id).
'">';
746 print
'<!-- td columns in add mode -->';
748 print $formaccounting->select_account(
'',
'accountingaccount_number', 1, array(), 1, 1,
'minwidth200 maxwidth500');
756 print $formaccounting->select_auxaccount(
'',
'subledger_account', 1,
'maxwidth250',
'',
'subledger_label');
758 print
'<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="' .
dol_escape_htmltag($langs->trans(
"SubledgerAccount")) .
'">';
760 print
'<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="' .
dol_escape_htmltag($langs->trans(
"SubledgerAccountLabel")) .
'">';
762 print
'<td><input type="text" class="minwidth200" name="label_operation" value="' .
dol_escape_htmltag($label_operation) .
'"/></td>';
763 print
'<td class="right"><input type="text" class="right width50" name="debit" value=""/></td>';
764 print
'<td class="right"><input type="text" class="right width50" name="credit" value=""/></td>';
765 print
'<td class="center"><input type="submit" class="button small" name="save" value="' . $langs->trans(
"Add") .
'"></td>';
769 print
'<tr class="oddeven" data-lineid="'.((int) $line->id).
'">';
770 print
'<!-- td columns in display mode -->';
771 $resultfetch = $accountingaccount->fetch(
null, $line->numero_compte,
true);
773 if ($resultfetch > 0) {
774 print $accountingaccount->getNomUrl(0, 1, 1,
'', 0);
776 print
dol_escape_htmltag($line->numero_compte).
' <span class="warning">('.$langs->trans(
"AccountRemovedFromCurrentChartOfAccount").
')</span>';
779 print
'<td>'.length_accounta($line->subledger_account);
780 if ($line->subledger_label) {
781 print
' - <span class="opacitymedium">'.dol_escape_htmltag($line->subledger_label).
'</span>';
784 print
'<td>'.$line->label_operation.
'</td>';
785 print
'<td class="right nowraponall amount">'.($line->debit != 0 ?
price($line->debit) :
'').
'</td>';
786 print
'<td class="right nowraponall amount">'.($line->credit != 0 ?
price($line->credit) :
'').
'</td>';
788 print
'<td class="center nowraponall">';
789 if ($permissiontoadd) {
790 if (empty($line->date_export) && empty($line->date_validation)) {
791 print
'<a class="editfielda reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?action=update&id=' . $line->id .
'&piece_num=' . ((int) $line->piece_num) .
'&mode=' . urlencode((
string) $mode) .
'&token=' . urlencode(
newToken()) .
'">';
792 print
img_edit(
'', 0,
'class="marginrightonly"');
795 print
'<a class="editfielda nohover cursornotallowed reposition disabled" href="#" title="'.dol_escape_htmltag($langs->trans(
"ForbiddenTransactionAlreadyExported")).
'">';
796 print
img_edit($langs->trans(
"ForbiddenTransactionAlreadyExported"), 0,
'class="marginrightonly"');
800 if (empty($line->date_validation)) {
801 $actiontodelete =
'delete';
802 if ($mode ==
'_tmp' || $action !=
'delmouv') {
803 $actiontodelete =
'confirm_delete';
806 print
'<a href="' . $_SERVER[
"PHP_SELF"] .
'?action=' . $actiontodelete .
'&id=' . $line->id .
'&piece_num=' . ((int) $line->piece_num) .
'&mode=' . urlencode((
string) $mode) .
'&token=' . urlencode(
newToken()) .
'">';
810 print
'<a class="editfielda nohover cursornotallowed disabled" href="#" title="'.dol_escape_htmltag($langs->trans(
"ForbiddenTransactionAlreadyExported")).
'">';
811 print
img_delete($langs->trans(
"ForbiddenTransactionAlreadyValidated"));
820 $total_debit =
price2num($total_debit,
'MT');
821 $total_credit =
price2num($total_credit,
'MT');
823 if ($total_debit != $total_credit) {
824 setEventMessages(
null, array($langs->trans(
'MvtNotCorrectlyBalanced', $total_debit, $total_credit)),
'warnings');
830 if ($mode ==
'_tmp' && $action ==
'' && $permissiontoadd) {
832 print
'<div class="center">';
833 if ($total_debit == $total_credit) {
834 print
'<a class="button" href="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.((int)
$object->piece_num).
'&action=valid">'.$langs->trans(
"ValidTransaction").
'</a>';
836 print
'<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans(
"MvtNotCorrectlyBalanced", $debit, $credit)).
'" value="'.
dol_escape_htmltag($langs->trans(
"ValidTransaction")).
'">';
840 print
'<a class="button button-cancel" href="'.DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php">'.$langs->trans(
"Cancel").
'</a>';
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 accounting accounts.
Class to manage accounting journals.
Class to manage Ledger (General Ledger and Subledger)
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_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
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'.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
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...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.