29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/bookkeeping.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
39$langs->loadLangs(array(
"accountancy",
"bills",
"compta"));
41$action =
GETPOST(
'action',
'aZ09');
42$cancel =
GETPOST(
'cancel',
'aZ09');
44$optioncss =
GETPOST(
'optioncss',
'aZ');
48$piece_num =
GETPOST(
"piece_num",
'int');
53$accountingaccount_number =
GETPOST(
'accountingaccount_number',
'alphanohtml');
54$accountingaccount->fetch(
null, $accountingaccount_number,
true);
55$accountingaccount_label = $accountingaccount->label;
57$journal_code =
GETPOST(
'code_journal',
'alpha');
58$accountingjournal->fetch(
null, $journal_code);
59$journal_label = $accountingjournal->label;
61$subledger_account =
GETPOST(
'subledger_account',
'alphanohtml');
62if ($subledger_account == -1) {
63 $subledger_account =
null;
65$subledger_label =
GETPOST(
'subledger_label',
'alphanohtml');
67$label_operation =
GETPOST(
'label_operation',
'alphanohtml');
71$save =
GETPOST(
'save',
'alpha');
75$update =
GETPOST(
'update',
'alpha');
77 $action =
'confirm_update';
83if (!isModEnabled(
'accounting')) {
86if ($user->socid > 0) {
89if (!$user->hasRight(
'accounting',
'mouvements',
'lire')) {
99 header(
"Location: ".DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php');
103if ($action ==
"confirm_update") {
106 if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
111 if (empty($accountingaccount_number) || $accountingaccount_number ==
'-1') {
113 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"AccountAccountingShort")),
null,
'errors');
120 $result = $object->fetch($id,
null, $mode);
125 $object->numero_compte = $accountingaccount_number;
126 $object->subledger_account = $subledger_account;
127 $object->subledger_label = $subledger_label;
128 $object->label_compte = $accountingaccount_label;
129 $object->label_operation = $label_operation;
130 $object->debit = $debit;
131 $object->credit = $credit;
133 if (floatval($debit) != 0.0) {
134 $object->montant = $debit;
135 $object->amount = $debit;
138 if (floatval($credit) != 0.0) {
139 $object->montant = $credit;
140 $object->amount = $credit;
144 $result = $object->update($user,
false, $mode);
148 if ($mode !=
'_tmp') {
159} elseif ($action ==
"add") {
162 if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
167 if (empty($accountingaccount_number) || $accountingaccount_number ==
'-1') {
169 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"AccountAccountingShort")),
null,
'errors');
176 $object->numero_compte = $accountingaccount_number;
177 $object->subledger_account = $subledger_account;
178 $object->subledger_label = $subledger_label;
179 $object->label_compte = $accountingaccount_label;
180 $object->label_operation = $label_operation;
181 $object->debit = $debit;
182 $object->credit = $credit;
183 $object->doc_date = (string)
GETPOST(
'doc_date',
'alpha');
184 $object->doc_type = (string)
GETPOST(
'doc_type',
'alpha');
185 $object->piece_num = $piece_num;
186 $object->doc_ref = (string)
GETPOST(
'doc_ref',
'alpha');
187 $object->code_journal = $journal_code;
188 $object->journal_label = $journal_label;
192 if (floatval($debit) != 0.0) {
193 $object->montant = $debit;
194 $object->amount = $debit;
198 if (floatval($credit) != 0.0) {
199 $object->montant = $credit;
200 $object->amount = $credit;
204 $result = $object->createStd($user,
false, $mode);
208 if ($mode !=
'_tmp') {
218} elseif ($action ==
"confirm_delete") {
221 $result = $object->fetch($id,
null, $mode);
222 $piece_num = $object->piece_num;
227 $result = $object->delete($user,
false, $mode);
233} elseif ($action ==
"confirm_create") {
238 if (!$journal_code || $journal_code ==
'-1') {
239 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
"Journal")),
null,
'errors');
243 if (!
GETPOST(
'doc_ref',
'alpha')) {
244 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Piece")),
null,
'errors');
250 $object->label_compte =
'';
254 $object->doc_type =
GETPOST(
'doc_type',
'alpha');
255 $object->piece_num =
GETPOST(
'next_num_mvt',
'alpha');
256 $object->doc_ref =
GETPOST(
'doc_ref',
'alpha');
257 $object->code_journal = $journal_code;
258 $object->journal_label = $journal_label;
260 $object->fk_docdet = 0;
261 $object->montant = 0;
264 $result = $object->createStd($user, 0, $mode);
268 if ($mode !=
'_tmp') {
273 $piece_num = $object->piece_num;
278if ($action ==
'setdate') {
280 $result = $object->updateByMvt($piece_num,
'doc_date', $db->idate($datedoc), $mode);
284 if ($mode !=
'_tmp') {
291if ($action ==
'setjournal') {
292 $result = $object->updateByMvt($piece_num,
'code_journal', $journal_code, $mode);
293 $result = $object->updateByMvt($piece_num,
'journal_label', $journal_label, $mode);
297 if ($mode !=
'_tmp') {
304if ($action ==
'setdocref') {
305 $refdoc =
GETPOST(
'doc_ref',
'alpha');
306 $result = $object->updateByMvt($piece_num,
'doc_ref', $refdoc, $mode);
310 if ($mode !=
'_tmp') {
318if ($action ==
'valid') {
319 $result = $object->transformTransaction(0, $piece_num);
323 header(
"Location: list.php?sortfield=t.piece_num&sortorder=asc");
333$form =
new Form($db);
336$title = $langs->trans(
"CreateMvts");
341if ($action ==
'delete') {
342 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$id.
'&mode='.$mode, $langs->trans(
'DeleteMvt'), $langs->trans(
'ConfirmDeleteMvt', $langs->transnoentitiesnoconv(
"RegistrationInAccounting")),
'confirm_delete',
'', 0, 1);
346if ($action ==
'create') {
350 $next_num_mvt = $object->getNextNumMvt(
'_tmp');
352 if (empty($next_num_mvt)) {
356 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" name="create_mvt" method="POST">';
357 if ($optioncss !=
'') {
358 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
360 print
'<input type="hidden" name="token" value="'.newToken().
'">';
361 print
'<input type="hidden" name="action" value="confirm_create">'.
"\n";
362 print
'<input type="hidden" name="next_num_mvt" value="'.$next_num_mvt.
'">'.
"\n";
363 print
'<input type="hidden" name="mode" value="_tmp">'.
"\n";
367 print
'<table class="border centpercent">';
375 print
'<td class="titlefieldcreate fieldrequired">'.$langs->trans(
"Docdate").
'</td>';
377 print $form->selectDate(
'',
'doc_date',
'',
'',
'',
"create_mvt", 1, 1);
382 print
'<td class="fieldrequired">'.$langs->trans(
"Codejournal").
'</td>';
383 print
'<td>'.$formaccounting->select_journal($journal_code,
'code_journal', 0, 0, 1, 1).
'</td>';
387 print
'<td class="fieldrequired">'.$langs->trans(
"Piece").
'</td>';
388 print
'<td><input type="text" class="minwidth200" name="doc_ref" value="'.GETPOST(
'doc_ref',
'alpha').
'"></td>';
402 print $form->buttonsSaveCancel(
"Create");
407 $result = $object->fetchPerMvt($piece_num, $mode);
412 if (!empty($object->piece_num)) {
413 $backlink =
'<a href="'.DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php?restore_lastsearch_values=1">'.$langs->trans(
'BackToList').
'</a>';
415 if ($mode ==
'_tmp') {
423 $head[$h][0] = $_SERVER[
'PHP_SELF'].
'?piece_num='.$object->piece_num.($mode ?
'&mode='.$mode :
'');
424 $head[$h][1] = $langs->trans(
"Transaction");
425 $head[$h][2] =
'transaction';
432 print
'<div class="fichecenter">';
433 print
'<div class="fichehalfleft">';
435 print
'<div class="underbanner clearboth"></div>';
436 print
'<table class="border tableforfield" width="100%">';
440 print
'<td class="titlefield">'.$langs->trans(
"NumMvts").
'</td>';
441 print
'<td>'.($mode ==
'_tmp' ?
'<span class="opacitymedium" title="Id tmp '.$object->piece_num.
'">'.$langs->trans(
"Draft").
'</span>' : $object->piece_num).
'</td>';
446 print
'<table class="nobordernopadding centpercent"><tr><td>';
447 print $langs->trans(
'Docdate');
449 if ($action !=
'editdate') {
450 print
'<td class="right"><a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdate&token='.newToken().
'&piece_num='.urlencode($object->piece_num).
'&mode='.urlencode($mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetDate'), 1).
'</a></td>';
452 print
'</tr></table>';
453 print
'</td><td colspan="3">';
454 if ($action ==
'editdate') {
455 print
'<form name="setdate" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.$object->piece_num.
'" method="post">';
456 if ($optioncss !=
'') {
457 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
459 print
'<input type="hidden" name="token" value="'.newToken().
'">';
460 print
'<input type="hidden" name="action" value="setdate">';
461 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
462 print $form->selectDate($object->doc_date ? $object->doc_date : - 1,
'doc_date',
'',
'',
'',
"setdate");
463 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
466 print $object->doc_date ?
dol_print_date($object->doc_date,
'day') :
' ';
473 print
'<table class="nobordernopadding" width="100%"><tr><td>';
474 print $langs->trans(
'Codejournal');
476 if ($action !=
'editjournal') {
477 print
'<td class="right"><a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editjournal&token='.newToken().
'&piece_num='.urlencode($object->piece_num).
'&mode='.urlencode($mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'Edit'), 1).
'</a></td>';
479 print
'</tr></table>';
481 if ($action ==
'editjournal') {
482 print
'<form name="setjournal" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.$object->piece_num.
'" method="post">';
483 if ($optioncss !=
'') {
484 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
486 print
'<input type="hidden" name="token" value="'.newToken().
'">';
487 print
'<input type="hidden" name="action" value="setjournal">';
488 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
489 print $formaccounting->select_journal($object->code_journal,
'code_journal', 0, 0, array(), 1, 1);
490 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
493 print $object->code_journal;
500 print
'<table class="nobordernopadding centpercent"><tr><td>';
501 print $langs->trans(
'Piece');
503 if ($action !=
'editdocref') {
504 print
'<td class="right"><a class="editfielda reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=editdocref&token='.newToken().
'&piece_num='.urlencode($object->piece_num).
'&mode='.urlencode($mode).
'">'.
img_edit($langs->transnoentitiesnoconv(
'Edit'), 1).
'</a></td>';
506 print
'</tr></table>';
508 if ($action ==
'editdocref') {
509 print
'<form name="setdocref" action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.$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="setdocref">';
515 print
'<input type="hidden" name="mode" value="'.$mode.
'">';
516 print
'<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($object->doc_ref).
'">';
517 print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
'Modify').
'">';
520 print $object->doc_ref;
529 print
'<div class="fichehalfright">';
531 print
'<div class="underbanner clearboth"></div>';
532 print
'<table class="border tableforfield centpercent">';
535 if (!empty($object->doc_type)) {
537 print
'<td class="titlefield">'.$langs->trans(
"Doctype").
'</td>';
538 print
'<td>'.$object->doc_type.
'</td>';
544 print
'<td class="titlefield">'.$langs->trans(
"DateCreation").
'</td>';
546 print $object->date_creation ?
dol_print_date($object->date_creation,
'day') :
' ';
551 if ($mode !=
"_tmp") {
554 print
'<td class="titlefield">' . $langs->trans(
"DateExport") .
'</td>';
556 print $object->date_export ?
dol_print_date($object->date_export,
'dayhour') :
' ';
562 print
'<td class="titlefield">' . $langs->trans(
"DateValidation") .
'</td>';
564 print $object->date_validation ?
dol_print_date($object->date_validation,
'dayhour') :
' ';
615 print
'<div class="clearboth"></div>';
619 $result = $object->fetchAllPerMvt($piece_num, $mode);
627 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.$object->piece_num.
'" method="post">';
628 if ($optioncss !=
'') {
629 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
631 print
'<input type="hidden" name="token" value="'.newToken().
'">';
632 print
'<input type="hidden" name="doc_date" value="'.$object->doc_date.
'">'.
"\n";
633 print
'<input type="hidden" name="doc_type" value="'.$object->doc_type.
'">'.
"\n";
634 print
'<input type="hidden" name="doc_ref" value="'.$object->doc_ref.
'">'.
"\n";
635 print
'<input type="hidden" name="code_journal" value="'.$object->code_journal.
'">'.
"\n";
636 print
'<input type="hidden" name="fk_doc" value="'.$object->fk_doc.
'">'.
"\n";
637 print
'<input type="hidden" name="fk_docdet" value="'.$object->fk_docdet.
'">'.
"\n";
638 print
'<input type="hidden" name="mode" value="'.$mode.
'">'.
"\n";
640 if (count($object->linesmvt) > 0) {
641 print
'<div class="div-table-responsive-no-min">';
642 print
'<table class="noborder centpercent">';
647 print
'<tr class="liste_titre">';
654 if (empty($object->date_validation)) {
663 if (!empty($object->linesmvt[0])) {
664 $tmpline = $object->linesmvt[0];
665 if (!empty($tmpline->numero_compte)) {
667 $object->linesmvt[] = $line;
671 foreach ($object->linesmvt as $line) {
672 print
'<tr class="oddeven" data-lineid="'.((int) $line->id).
'">';
673 $total_debit += $line->debit;
674 $total_credit += $line->credit;
676 if ($action ==
'update' && $line->id == $id) {
677 print
'<!-- td columns in edit mode -->';
679 print $formaccounting->select_account((GETPOSTISSET(
"accountingaccount_number") ?
GETPOST(
"accountingaccount_number",
"alpha") : $line->numero_compte),
'accountingaccount_number', 1, array(), 1, 1,
'minwidth200 maxwidth500');
686 if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
687 print $formaccounting->select_auxaccount((GETPOSTISSET(
"subledger_account") ?
GETPOST(
"subledger_account",
"alpha") : $line->subledger_account),
'subledger_account', 1,
'maxwidth250',
'',
'subledger_label');
689 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")).
'">';
692 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")).
'">';
694 print
'<td><input type="text" class="minwidth200" name="label_operation" value="'.(GETPOSTISSET(
"label_operation") ?
GETPOST(
"label_operation",
"alpha") : $line->label_operation).
'"></td>';
695 print
'<td class="right"><input type="text" size="6" class="right" name="debit" value="'.(GETPOSTISSET(
"debit") ?
GETPOST(
"debit",
"alpha") :
price($line->debit)).
'"></td>';
696 print
'<td class="right"><input type="text" size="6" class="right" name="credit" value="'.(GETPOSTISSET(
"credit") ?
GETPOST(
"credit",
"alpha") :
price($line->credit)).
'"></td>';
698 print
'<input type="hidden" name="id" value="'.$line->id.
'">'.
"\n";
699 print
'<input type="submit" class="button" name="update" value="'.$langs->trans(
"Update").
'">';
701 } elseif (empty($line->numero_compte) || (empty($line->debit) && empty($line->credit))) {
702 if ($action ==
"" || $action ==
'add') {
703 print
'<!-- td columns in add mode -->';
705 print $formaccounting->select_account(
'',
'accountingaccount_number', 1, array(), 1, 1,
'minwidth200 maxwidth500');
712 if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
713 print $formaccounting->select_auxaccount(
'',
'subledger_account', 1,
'maxwidth250',
'',
'subledger_label');
715 print
'<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="' .
dol_escape_htmltag($langs->trans(
"SubledgerAccount")) .
'">';
717 print
'<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="' .
dol_escape_htmltag($langs->trans(
"SubledgerAccountLabel")) .
'">';
719 print
'<td><input type="text" class="minwidth200" name="label_operation" value="' . $label_operation .
'"/></td>';
720 print
'<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
721 print
'<td class="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
722 print
'<td class="center"><input type="submit" class="button small" name="save" value="' . $langs->trans(
"Add") .
'"></td>';
725 print
'<!-- td columns in display mode -->';
726 $resultfetch = $accountingaccount->fetch(
null, $line->numero_compte,
true);
728 if ($resultfetch > 0) {
729 print $accountingaccount->getNomUrl(0, 1, 1,
'', 0);
731 print $line->numero_compte.
' <span class="warning">('.$langs->trans(
"AccountRemovedFromCurrentChartOfAccount").
')</span>';
734 print
'<td>'.length_accounta($line->subledger_account);
735 if ($line->subledger_label) {
736 print
' - <span class="opacitymedium">'.$line->subledger_label.
'</span>';
739 print
'<td>'.$line->label_operation.
'</td>';
740 print
'<td class="right nowraponall amount">'.($line->debit != 0 ?
price($line->debit) :
'').
'</td>';
741 print
'<td class="right nowraponall amount">'.($line->credit != 0 ?
price($line->credit) :
'').
'</td>';
743 print
'<td class="center nowraponall">';
744 if (empty($line->date_export) && empty($line->date_validation)) {
745 print
'<a class="editfielda reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?action=update&id=' . $line->id .
'&piece_num=' . urlencode($line->piece_num) .
'&mode=' . urlencode($mode) .
'&token=' . urlencode(newToken()) .
'">';
746 print
img_edit(
'', 0,
'class="marginrightonly"');
749 print
'<a class="editfielda nohover cursornotallowed reposition disabled" href="#" title="'.dol_escape_htmltag($langs->trans(
"ForbiddenTransactionAlreadyExported")).
'">';
750 print
img_edit($langs->trans(
"ForbiddenTransactionAlreadyExported"), 0,
'class="marginrightonly"');
754 if (empty($line->date_validation)) {
755 $actiontodelete =
'delete';
756 if ($mode ==
'_tmp' || $action !=
'delmouv') {
757 $actiontodelete =
'confirm_delete';
760 print
'<a href="' . $_SERVER[
"PHP_SELF"] .
'?action=' . $actiontodelete .
'&id=' . $line->id .
'&piece_num=' . urlencode($line->piece_num) .
'&mode=' . urlencode($mode) .
'&token=' . urlencode(newToken()) .
'">';
764 print
'<a class="editfielda nohover cursornotallowed disabled" href="#" title="'.dol_escape_htmltag($langs->trans(
"ForbiddenTransactionAlreadyExported")).
'">';
765 print
img_delete($langs->trans(
"ForbiddenTransactionAlreadyValidated"));
774 $total_debit =
price2num($total_debit,
'MT');
775 $total_credit =
price2num($total_credit,
'MT');
777 if ($total_debit != $total_credit) {
778 setEventMessages(
null, array($langs->trans(
'MvtNotCorrectlyBalanced', $total_debit, $total_credit)),
'warnings');
784 if ($mode ==
'_tmp' && $action ==
'') {
786 print
'<div class="center">';
787 if ($total_debit == $total_credit) {
788 print
'<a class="button" href="'.$_SERVER[
"PHP_SELF"].
'?piece_num='.$object->piece_num.
'&action=valid">'.$langs->trans(
"ValidTransaction").
'</a>';
790 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")).
'">';
794 print
'<a class="button button-cancel" href="'.DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php">'.$langs->trans(
"Cancel").
'</a>';
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 accounts.
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 informations (by default a local PHP server timestamp) Re...
load_fiche_titre($titre, $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 value of a param into GET or POST supervariable.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier 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.