28 require
'../../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/lettering.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/bookkeeping.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
40 $langs->loadLangs(array(
"accountancy",
"compta"));
42 $action =
GETPOST(
'action',
'aZ09');
43 $socid =
GETPOST(
'socid',
'int');
44 $massaction =
GETPOST(
'massaction',
'alpha');
45 $confirm =
GETPOST(
'confirm',
'alpha');
46 $toselect =
GETPOST(
'toselect',
'array');
47 $type =
GETPOST(
'type',
'alpha');
49 $context_default =
'bookkeepingbysubaccountlist';
51 $context_default =
'bookkeepingbyaccountlist';
53 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') : $context_default;
54 $search_date_startyear =
GETPOST(
'search_date_startyear',
'int');
55 $search_date_startmonth =
GETPOST(
'search_date_startmonth',
'int');
56 $search_date_startday =
GETPOST(
'search_date_startday',
'int');
57 $search_date_endyear =
GETPOST(
'search_date_endyear',
'int');
58 $search_date_endmonth =
GETPOST(
'search_date_endmonth',
'int');
59 $search_date_endday =
GETPOST(
'search_date_endday',
'int');
60 $search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
61 $search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
63 $search_date_export_startyear =
GETPOST(
'search_date_export_startyear',
'int');
64 $search_date_export_startmonth =
GETPOST(
'search_date_export_startmonth',
'int');
65 $search_date_export_startday =
GETPOST(
'search_date_export_startday',
'int');
66 $search_date_export_endyear =
GETPOST(
'search_date_export_endyear',
'int');
67 $search_date_export_endmonth =
GETPOST(
'search_date_export_endmonth',
'int');
68 $search_date_export_endday =
GETPOST(
'search_date_export_endday',
'int');
69 $search_date_export_start =
dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear);
70 $search_date_export_end =
dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear);
71 $search_date_validation_startyear =
GETPOST(
'search_date_validation_startyear',
'int');
72 $search_date_validation_startmonth =
GETPOST(
'search_date_validation_startmonth',
'int');
73 $search_date_validation_startday =
GETPOST(
'search_date_validation_startday',
'int');
74 $search_date_validation_endyear =
GETPOST(
'search_date_validation_endyear',
'int');
75 $search_date_validation_endmonth =
GETPOST(
'search_date_validation_endmonth',
'int');
76 $search_date_validation_endday =
GETPOST(
'search_date_validation_endday',
'int');
77 $search_date_validation_start =
dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear);
78 $search_date_validation_end =
dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
79 $search_import_key =
GETPOST(
"search_import_key",
'alpha');
81 $search_accountancy_code =
GETPOST(
"search_accountancy_code");
82 $search_accountancy_code_start =
GETPOST(
'search_accountancy_code_start',
'alpha');
83 if ($search_accountancy_code_start == - 1) {
84 $search_accountancy_code_start =
'';
86 $search_accountancy_code_end =
GETPOST(
'search_accountancy_code_end',
'alpha');
87 if ($search_accountancy_code_end == - 1) {
88 $search_accountancy_code_end =
'';
90 $search_doc_ref =
GETPOST(
'search_doc_ref',
'alpha');
91 $search_label_operation =
GETPOST(
'search_label_operation',
'alpha');
92 $search_mvt_num =
GETPOST(
'search_mvt_num',
'int');
93 $search_direction =
GETPOST(
'search_direction',
'alpha');
94 $search_ledger_code =
GETPOST(
'search_ledger_code',
'array');
95 $search_debit =
GETPOST(
'search_debit',
'alpha');
96 $search_credit =
GETPOST(
'search_credit',
'alpha');
97 $search_lettering_code =
GETPOST(
'search_lettering_code',
'alpha');
98 $search_not_reconciled =
GETPOST(
'search_not_reconciled',
'alpha');
101 $action =
'delbookkeepingyear';
105 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
106 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
107 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
108 $optioncss =
GETPOST(
'optioncss',
'alpha');
110 if (empty($page) || $page < 0) {
113 $offset = $limit * $page;
114 $pageprev = $page - 1;
115 $pagenext = $page + 1;
116 if ($sortorder ==
"") {
119 if ($sortfield ==
"") {
120 $sortfield =
"t.doc_date,t.rowid";
126 $hookmanager->initHooks(array($context_default));
131 if (empty($search_date_start) && empty($search_date_end) && !
GETPOSTISSET(
'search_date_startday') && !
GETPOSTISSET(
'search_date_startmonth') && !
GETPOSTISSET(
'search_date_starthour')) {
132 $sql =
"SELECT date_start, date_end from ".MAIN_DB_PREFIX.
"accounting_fiscalyear ";
133 $sql .=
" where date_start < '".$db->idate(
dol_now()).
"' and date_end > '".$db->idate(
dol_now()).
"'";
134 $sql .= $db->plimit(1);
135 $res = $db->query($sql);
137 if ($res->num_rows > 0) {
138 $fiscalYear = $db->fetch_object($res);
139 $search_date_start = strtotime($fiscalYear->date_start);
140 $search_date_end = strtotime($fiscalYear->date_end);
142 $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1);
147 $year_end = $year_start + 1;
148 $month_end = $month_start - 1;
149 if ($month_end < 1) {
153 $search_date_start =
dol_mktime(0, 0, 0, $month_start, 1, $year_start);
158 $arrayfields = array(
160 't.piece_num'=>array(
'label'=>$langs->trans(
"TransactionNumShort"),
'checked'=>1),
161 't.code_journal'=>array(
'label'=>$langs->trans(
"Codejournal"),
'checked'=>1),
162 't.doc_date'=>array(
'label'=>$langs->trans(
"Docdate"),
'checked'=>1),
163 't.doc_ref'=>array(
'label'=>$langs->trans(
"Piece"),
'checked'=>1),
164 't.label_operation'=>array(
'label'=>$langs->trans(
"Label"),
'checked'=>1),
165 't.debit'=>array(
'label'=>$langs->trans(
"Debit"),
'checked'=>1),
166 't.credit'=>array(
'label'=>$langs->trans(
"Credit"),
'checked'=>1),
167 't.lettering_code'=>array(
'label'=>$langs->trans(
"LetteringCode"),
'checked'=>1),
168 't.date_export'=>array(
'label'=>$langs->trans(
"DateExport"),
'checked'=>1),
169 't.date_validated'=>array(
'label'=>$langs->trans(
"DateValidation"),
'checked'=>1,
'enabled'=>!
getDolGlobalString(
"ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")),
170 't.import_key'=>array(
'label'=>$langs->trans(
"ImportId"),
'checked'=>0,
'position'=>1100),
173 if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
174 unset($arrayfields[
't.lettering_code']);
177 if ($search_date_start && empty($search_date_startyear)) {
179 $search_date_startyear = $tmparray[
'year'];
180 $search_date_startmonth = $tmparray[
'mon'];
181 $search_date_startday = $tmparray[
'mday'];
183 if ($search_date_end && empty($search_date_endyear)) {
185 $search_date_endyear = $tmparray[
'year'];
186 $search_date_endmonth = $tmparray[
'mon'];
187 $search_date_endday = $tmparray[
'mday'];
193 if ($user->socid > 0) {
196 if (empty($user->rights->accounting->mouvements->lire)) {
207 if (
GETPOST(
'cancel',
'alpha')) {
211 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'preunlettering' && $massaction !=
'predeletebookkeepingwriting') {
215 $parameters = array(
'socid'=>$socid);
216 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
221 if (empty($reshook)) {
222 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
224 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
225 $search_doc_date =
'';
226 $search_accountancy_code =
'';
227 $search_accountancy_code_start =
'';
228 $search_accountancy_code_end =
'';
229 $search_label_account =
'';
230 $search_doc_ref =
'';
231 $search_label_operation =
'';
232 $search_mvt_num =
'';
233 $search_direction =
'';
234 $search_ledger_code = array();
235 $search_date_start =
'';
236 $search_date_end =
'';
237 $search_date_startyear =
'';
238 $search_date_startmonth =
'';
239 $search_date_startday =
'';
240 $search_date_endyear =
'';
241 $search_date_endmonth =
'';
242 $search_date_endday =
'';
243 $search_date_export_start =
'';
244 $search_date_export_end =
'';
245 $search_date_export_startyear =
'';
246 $search_date_export_startmonth =
'';
247 $search_date_export_startday =
'';
248 $search_date_export_endyear =
'';
249 $search_date_export_endmonth =
'';
250 $search_date_export_endday =
'';
251 $search_date_validation_start =
'';
252 $search_date_validation_end =
'';
253 $search_date_validation_startyear =
'';
254 $search_date_validation_startmonth =
'';
255 $search_date_validation_startday =
'';
256 $search_date_validation_endyear =
'';
257 $search_date_validation_endmonth =
'';
258 $search_date_validation_endday =
'';
261 $search_lettering_code =
'';
262 $search_not_reconciled =
'';
263 $search_import_key =
'';
270 if (!empty($search_date_start)) {
271 $filter[
't.doc_date>='] = $search_date_start;
272 $param .=
'&search_date_startmonth='.$search_date_startmonth.
'&search_date_startday='.$search_date_startday.
'&search_date_startyear='.$search_date_startyear;
274 if (!empty($search_date_end)) {
275 $filter[
't.doc_date<='] = $search_date_end;
276 $param .=
'&search_date_endmonth='.$search_date_endmonth.
'&search_date_endday='.$search_date_endday.
'&search_date_endyear='.$search_date_endyear;
278 if (!empty($search_doc_date)) {
279 $filter[
't.doc_date'] = $search_doc_date;
280 $param .=
'&doc_datemonth='.GETPOST(
'doc_datemonth',
'int').
'&doc_dateday='.
GETPOST(
'doc_dateday',
'int').
'&doc_dateyear='.
GETPOST(
'doc_dateyear',
'int');
282 if (!empty($search_accountancy_code_start)) {
283 if ($type ==
'sub') {
284 $filter[
't.subledger_account>='] = $search_accountancy_code_start;
286 $filter[
't.numero_compte>='] = $search_accountancy_code_start;
288 $param .=
'&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
290 if (!empty($search_accountancy_code_end)) {
291 if ($type ==
'sub') {
292 $filter[
't.subledger_account<='] = $search_accountancy_code_end;
294 $filter[
't.numero_compte<='] = $search_accountancy_code_end;
296 $param .=
'&search_accountancy_code_end=' . urlencode($search_accountancy_code_end);
298 if (!empty($search_label_account)) {
299 $filter[
't.label_compte'] = $search_label_account;
300 $param .=
'&search_label_compte='.urlencode($search_label_account);
302 if (!empty($search_mvt_num)) {
303 $filter[
't.piece_num'] = $search_mvt_num;
304 $param .=
'&search_mvt_num='.urlencode($search_mvt_num);
306 if (!empty($search_doc_ref)) {
307 $filter[
't.doc_ref'] = $search_doc_ref;
308 $param .=
'&search_doc_ref='.urlencode($search_doc_ref);
310 if (!empty($search_label_operation)) {
311 $filter[
't.label_operation'] = $search_label_operation;
312 $param .=
'&search_label_operation='.urlencode($search_label_operation);
314 if (!empty($search_direction)) {
315 $filter[
't.sens'] = $search_direction;
316 $param .=
'&search_direction='.urlencode($search_direction);
318 if (!empty($search_ledger_code)) {
319 $filter[
't.code_journal'] = $search_ledger_code;
320 foreach ($search_ledger_code as $code) {
321 $param .=
'&search_ledger_code[]='.urlencode($code);
324 if (!empty($search_debit)) {
325 $filter[
't.debit'] = $search_debit;
326 $param .=
'&search_debit='.urlencode($search_debit);
328 if (!empty($search_credit)) {
329 $filter[
't.credit'] = $search_credit;
330 $param .=
'&search_credit='.urlencode($search_credit);
332 if (!empty($search_lettering_code)) {
333 $filter[
't.lettering_code'] = $search_lettering_code;
334 $param .=
'&search_lettering_code='.urlencode($search_lettering_code);
336 if (!empty($search_not_reconciled)) {
337 $filter[
't.reconciled_option'] = $search_not_reconciled;
338 $param .=
'&search_not_reconciled='.urlencode($search_not_reconciled);
340 if (!empty($search_date_export_start)) {
341 $filter[
't.date_export>='] = $search_date_export_start;
342 $param .=
'&search_date_export_startmonth='.$search_date_export_startmonth.
'&search_date_export_startday='.$search_date_export_startday.
'&search_date_export_startyear='.$search_date_export_startyear;
344 if (!empty($search_date_export_end)) {
345 $filter[
't.date_export<='] = $search_date_export_end;
346 $param .=
'&search_date_export_endmonth='.$search_date_export_endmonth.
'&search_date_export_endday='.$search_date_export_endday.
'&search_date_export_endyear='.$search_date_export_endyear;
348 if (!empty($search_date_validation_start)) {
349 $filter[
't.date_validated>='] = $search_date_validation_start;
350 $param .=
'&search_date_validation_startmonth='.$search_date_validation_startmonth.
'&search_date_validation_startday='.$search_date_validation_startday.
'&search_date_validation_startyear='.$search_date_validation_startyear;
352 if (!empty($search_date_validation_end)) {
353 $filter[
't.date_validated<='] = $search_date_validation_end;
354 $param .=
'&search_date_validation_endmonth='.$search_date_validation_endmonth.
'&search_date_validation_endday='.$search_date_validation_endday.
'&search_date_validation_endyear='.$search_date_validation_endyear;
356 if (!empty($search_import_key)) {
357 $filter[
't.import_key'] = $search_import_key;
358 $param .=
'&search_import_key='.urlencode($search_import_key);
362 $url_param = substr($param, 1);
364 $param =
'&type='.$type.$param;
395 $objectclass =
'Bookkeeping';
396 $objectlabel =
'Bookkeeping';
397 $permissiontoread = $user->rights->societe->lire;
398 $permissiontodelete = $user->rights->societe->supprimer;
399 $permissiontoadd = $user->rights->societe->creer;
400 $uploaddir = $conf->societe->dir_output;
401 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
403 if (!$error && $action ==
'deletebookkeepingwriting' && $confirm ==
"yes" && $user->rights->accounting->mouvements->supprimer) {
405 foreach ($toselect as $toselectid) {
406 $result = $object->fetch($toselectid);
407 if ($result > 0 && (!isset($object->date_validation) || $object->date_validation ===
'')) {
408 $result = $object->deleteMvtNum($object->piece_num);
416 } elseif ($result < 0) {
426 } elseif ($nbok > 0) {
433 header(
"Location: ".$_SERVER[
"PHP_SELF"].
"?noreset=1".($param ?
'&'.$param :
''));
439 if (!$error &&
getDolGlobalInt(
'ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) {
440 if ($massaction ==
'lettering') {
442 $nb_lettering = $lettering->bookkeepingLetteringAll($toselect);
443 if ($nb_lettering < 0) {
446 $nb_lettering = max(0, abs($nb_lettering) - 2);
447 } elseif ($nb_lettering == 0) {
449 setEventMessages($langs->trans(
'AccountancyNoLetteringModified'), array(),
'mesgs');
451 if ($nb_lettering == 1) {
452 setEventMessages($langs->trans(
'AccountancyOneLetteringModifiedSuccessfully'), array(),
'mesgs');
453 } elseif ($nb_lettering > 1) {
454 setEventMessages($langs->trans(
'AccountancyLetteringModifiedSuccessfully', $nb_lettering), array(),
'mesgs');
458 header(
'Location: ' . $_SERVER[
'PHP_SELF'] .
'?noreset=1' . $param);
461 } elseif ($action ==
'unlettering' && $confirm ==
"yes") {
463 $nb_lettering = $lettering->bookkeepingLetteringAll($toselect,
true);
464 if ($nb_lettering < 0) {
467 $nb_lettering = max(0, abs($nb_lettering) - 2);
468 } elseif ($nb_lettering == 0) {
470 setEventMessages($langs->trans(
'AccountancyNoUnletteringModified'), array(),
'mesgs');
472 if ($nb_lettering == 1) {
473 setEventMessages($langs->trans(
'AccountancyOneUnletteringModifiedSuccessfully'), array(),
'mesgs');
474 } elseif ($nb_lettering > 1) {
475 setEventMessages($langs->trans(
'AccountancyUnletteringModifiedSuccessfully', $nb_lettering), array(),
'mesgs');
479 header(
'Location: ' . $_SERVER[
'PHP_SELF'] .
'?noreset=1' . $param);
496 $title_page = $langs->trans(
"Operations").
' - '.$langs->trans(
"VueByAccountAccounting").
' (';
497 if ($type ==
'sub') {
498 $title_page .= $langs->trans(
"BookkeepingSubAccount");
500 $title_page .= $langs->trans(
"Bookkeeping");
507 $nbtotalofrecords =
'';
508 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
509 if ($type ==
'sub') {
510 $nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter,
'AND', 1);
512 $nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
515 if ($nbtotalofrecords < 0) {
520 if ($type ==
'sub') {
521 $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter,
'AND', 1);
523 $result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter);
530 $arrayofselected = is_array($toselect) ? $toselect : array();
532 $num = count($object->lines);
580 $arrayofmassactions = array();
581 if (
getDolGlobalInt(
'ACCOUNTING_ENABLE_LETTERING') && $user->rights->accounting->mouvements->creer) {
582 $arrayofmassactions[
'lettering'] =
img_picto(
'',
'check',
'class="pictofixedwidth"') . $langs->trans(
'Lettering');
583 $arrayofmassactions[
'preunlettering'] =
img_picto(
'',
'uncheck',
'class="pictofixedwidth"') . $langs->trans(
'Unlettering');
585 if ($user->rights->accounting->mouvements->supprimer) {
586 $arrayofmassactions[
'predeletebookkeepingwriting'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
588 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'preunlettering',
'predeletebookkeepingwriting'))) {
589 $arrayofmassactions = array();
591 $massactionbutton =
$form->selectMassAction($massaction, $arrayofmassactions);
593 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
594 print
'<input type="hidden" name="token" value="'.newToken().
'">';
595 print
'<input type="hidden" name="action" value="list">';
596 if ($optioncss !=
'') {
597 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
599 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
600 print
'<input type="hidden" name="type" value="'.$type.
'">';
601 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
602 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
603 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
605 $parameters = array();
606 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtonsList', $parameters, $object, $action);
607 if (empty($reshook)) {
608 $newcardbutton =
dolGetButtonTitle($langs->trans(
'ViewFlatList'),
'',
'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.
'/accountancy/bookkeeping/list.php?'.$param);
609 if ($type ==
'sub') {
610 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'GroupByAccountAccounting'),
'',
'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT .
'/accountancy/bookkeeping/listbyaccount.php?' . $url_param,
'', 1, array(
'morecss' =>
'marginleftonly'));
611 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'GroupBySubAccountAccounting'),
'',
'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT .
'/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param,
'', 1, array(
'morecss' =>
'marginleftonly btnTitleSelected'));
613 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'GroupByAccountAccounting'),
'',
'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT .
'/accountancy/bookkeeping/listbyaccount.php?' . $url_param,
'', 1, array(
'morecss' =>
'marginleftonly btnTitleSelected'));
614 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'GroupBySubAccountAccounting'),
'',
'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT .
'/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param,
'', 1, array(
'morecss' =>
'marginleftonly'));
616 $newcardbutton .=
dolGetButtonTitle($langs->trans(
'NewAccountingMvt'),
'',
'fa fa-plus-circle paddingleft', DOL_URL_ROOT.
'/accountancy/bookkeeping/card.php?action=create');
619 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
620 $param .=
'&contextpage='.urlencode($contextpage);
622 if ($limit > 0 && $limit != $conf->liste_limit) {
623 $param .=
'&limit='.urlencode($limit);
626 print_barre_liste($title_page, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $result, $nbtotalofrecords,
'title_accountancy', 0, $newcardbutton,
'', $limit, 0, 0, 1);
628 if ($massaction ==
'preunlettering') {
629 print
$form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmMassUnlettering"), $langs->trans(
"ConfirmMassUnletteringQuestion", count($toselect)),
"unlettering", null,
'', 0, 200, 500, 1);
630 } elseif ($massaction ==
'predeletebookkeepingwriting') {
631 print
$form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmMassDeleteBookkeepingWriting"), $langs->trans(
"ConfirmMassDeleteBookkeepingWritingQuestion", count($toselect)),
"deletebookkeepingwriting", null,
'', 0, 200, 500, 1);
644 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
646 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
647 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
648 if ($massactionbutton && $contextpage !=
'poslist') {
649 $selectedfields .=
$form->showCheckAddButtons(
'checkforselect', 1);
653 if (preg_match(
'/^asc/i', $sortorder)) {
660 if ($type ==
'sub') {
661 print
info_admin($langs->trans(
"WarningRecordWithoutSubledgerAreExcluded"));
667 $moreforfilter .=
'<div class="divsearchfield">';
668 $moreforfilter .= $langs->trans(
'AccountAccounting').
': ';
669 $moreforfilter .=
'<div class="nowrap inline-block">';
670 if ($type ==
'sub') {
671 $moreforfilter .= $formaccounting->select_auxaccount($search_accountancy_code_start,
'search_accountancy_code_start', $langs->trans(
'From'),
'maxwidth200');
673 $moreforfilter .= $formaccounting->select_account($search_accountancy_code_start,
'search_accountancy_code_start', $langs->trans(
'From'), array(), 1, 1,
'maxwidth200');
675 $moreforfilter .=
' ';
676 if ($type ==
'sub') {
677 $moreforfilter .= $formaccounting->select_auxaccount($search_accountancy_code_end,
'search_accountancy_code_end', $langs->trans(
'to'),
'maxwidth200');
679 $moreforfilter .= $formaccounting->select_account($search_accountancy_code_end,
'search_accountancy_code_end', $langs->trans(
'to'), array(), 1, 1,
'maxwidth200');
681 $moreforfilter .=
'</div>';
682 $moreforfilter .=
'</div>';
684 $parameters = array();
685 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
686 if (empty($reshook)) {
687 $moreforfilter .= $hookmanager->resPrint;
689 $moreforfilter = $hookmanager->resPrint;
692 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
693 print $moreforfilter;
696 print
'<div class="div-table-responsive">';
697 print
'<table class="tagtable liste centpercent">';
700 print
'<tr class="liste_titre_filter">';
703 if (!empty($arrayfields[
't.piece_num'][
'checked'])) {
704 print
'<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="'.dol_escape_htmltag($search_mvt_num).
'"></td>';
707 if (!empty($arrayfields[
't.code_journal'][
'checked'])) {
708 print
'<td class="liste_titre center">';
709 print $formaccounting->multi_select_journal($search_ledger_code,
'search_ledger_code', 0, 1, 1, 1);
713 if (!empty($arrayfields[
't.doc_date'][
'checked'])) {
714 print
'<td class="liste_titre center">';
715 print
'<div class="nowrap">';
716 print
$form->selectDate($search_date_start,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
718 print
'<div class="nowrap">';
719 print
$form->selectDate($search_date_end,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
724 if (!empty($arrayfields[
't.doc_ref'][
'checked'])) {
725 print
'<td class="liste_titre"><input type="text" size="7" class="flat" name="search_doc_ref" value="'.dol_escape_htmltag($search_doc_ref).
'"/></td>';
728 if (!empty($arrayfields[
't.label_operation'][
'checked'])) {
729 print
'<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_operation" value="'.dol_escape_htmltag($search_label_operation).
'"/></td>';
732 if (!empty($arrayfields[
't.debit'][
'checked'])) {
733 print
'<td class="liste_titre right"><input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).
'"></td>';
736 if (!empty($arrayfields[
't.credit'][
'checked'])) {
737 print
'<td class="liste_titre right"><input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).
'"></td>';
740 if (!empty($arrayfields[
't.lettering_code'][
'checked'])) {
741 print
'<td class="liste_titre center">';
742 print
'<input type="text" size="3" class="flat" name="search_lettering_code" value="'.$search_lettering_code.
'"/>';
743 print
'<br><span class="nowrap"><input type="checkbox" name="search_not_reconciled" value="notreconciled"'.($search_not_reconciled ==
'notreconciled' ?
' checked' :
'').
'>'.$langs->trans(
"NotReconciled").
'</span>';
747 if (!empty($arrayfields[
't.date_export'][
'checked'])) {
748 print
'<td class="liste_titre center">';
749 print
'<div class="nowrap">';
750 print
$form->selectDate($search_date_export_start,
'search_date_export_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
752 print
'<div class="nowrap">';
753 print
$form->selectDate($search_date_export_end,
'search_date_export_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
758 if (!empty($arrayfields[
't.date_validated'][
'checked'])) {
759 print
'<td class="liste_titre center">';
760 print
'<div class="nowrap">';
761 print
$form->selectDate($search_date_validation_start,
'search_date_validation_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
763 print
'<div class="nowrap">';
764 print
$form->selectDate($search_date_validation_end,
'search_date_validation_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
768 if (!empty($arrayfields[
't.import_key'][
'checked'])) {
769 print
'<td class="liste_titre center">';
770 print
'<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).
'">';
775 $parameters = array(
'arrayfields'=>$arrayfields);
776 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
777 print $hookmanager->resPrint;
780 print
'<td class="liste_titre center">';
781 $searchpicto =
$form->showFilterButtons();
786 print
'<tr class="liste_titre">';
787 if (!empty($arrayfields[
't.piece_num'][
'checked'])) {
788 print_liste_field_titre($arrayfields[
't.piece_num'][
'label'], $_SERVER[
'PHP_SELF'],
"t.piece_num",
"", $param,
'', $sortfield, $sortorder);
790 if (!empty($arrayfields[
't.code_journal'][
'checked'])) {
791 print_liste_field_titre($arrayfields[
't.code_journal'][
'label'], $_SERVER[
'PHP_SELF'],
"t.code_journal",
"", $param,
'', $sortfield, $sortorder,
'center ');
793 if (!empty($arrayfields[
't.doc_date'][
'checked'])) {
794 print_liste_field_titre($arrayfields[
't.doc_date'][
'label'], $_SERVER[
'PHP_SELF'],
"t.doc_date",
"", $param,
'', $sortfield, $sortorder,
'center ');
796 if (!empty($arrayfields[
't.doc_ref'][
'checked'])) {
797 print_liste_field_titre($arrayfields[
't.doc_ref'][
'label'], $_SERVER[
'PHP_SELF'],
"t.doc_ref",
"", $param,
"", $sortfield, $sortorder);
799 if (!empty($arrayfields[
't.label_operation'][
'checked'])) {
800 print_liste_field_titre($arrayfields[
't.label_operation'][
'label'], $_SERVER[
'PHP_SELF'],
"t.label_operation",
"", $param,
"", $sortfield, $sortorder);
802 if (!empty($arrayfields[
't.debit'][
'checked'])) {
803 print_liste_field_titre($arrayfields[
't.debit'][
'label'], $_SERVER[
'PHP_SELF'],
"t.debit",
"", $param,
'', $sortfield, $sortorder,
'right ');
805 if (!empty($arrayfields[
't.credit'][
'checked'])) {
806 print_liste_field_titre($arrayfields[
't.credit'][
'label'], $_SERVER[
'PHP_SELF'],
"t.credit",
"", $param,
'', $sortfield, $sortorder,
'right ');
808 if (!empty($arrayfields[
't.lettering_code'][
'checked'])) {
809 print_liste_field_titre($arrayfields[
't.lettering_code'][
'label'], $_SERVER[
'PHP_SELF'],
"t.lettering_code",
"", $param,
'', $sortfield, $sortorder,
'center ');
811 if (!empty($arrayfields[
't.date_export'][
'checked'])) {
812 print_liste_field_titre($arrayfields[
't.date_export'][
'label'], $_SERVER[
'PHP_SELF'],
"t.date_export",
"", $param,
'', $sortfield, $sortorder,
'center ');
814 if (!empty($arrayfields[
't.date_validated'][
'checked'])) {
815 print_liste_field_titre($arrayfields[
't.date_validated'][
'label'], $_SERVER[
'PHP_SELF'],
"t.date_validated",
"", $param,
'', $sortfield, $sortorder,
'center ');
817 if (!empty($arrayfields[
't.import_key'][
'checked'])) {
818 print_liste_field_titre($arrayfields[
't.import_key'][
'label'], $_SERVER[
"PHP_SELF"],
"t.import_key",
"", $param,
'', $sortfield, $sortorder,
'center ');
821 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
822 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
823 print $hookmanager->resPrint;
824 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
827 $displayed_account_number = null;
833 $totalarray = array();
834 $totalarray[
'val'] = array ();
835 $totalarray[
'nbfield'] = 0;
838 $sous_total_debit = 0;
839 $sous_total_credit = 0;
840 $totalarray[
'val'][
'totaldebit'] = 0;
841 $totalarray[
'val'][
'totalcredit'] = 0;
843 while ($i < min($num, $limit)) {
844 $line = $object->lines[$i];
846 $total_debit += $line->debit;
847 $total_credit += $line->credit;
849 if ($type ==
'sub') {
858 if (!empty($arrayfields[
't.piece_num'][
'checked'])) { $colspan++; }
859 if (!empty($arrayfields[
't.code_journal'][
'checked'])) { $colspan++; }
860 if (!empty($arrayfields[
't.doc_date'][
'checked'])) { $colspan++; }
861 if (!empty($arrayfields[
't.doc_ref'][
'checked'])) { $colspan++; }
862 if (!empty($arrayfields[
't.label_operation'][
'checked'])) { $colspan++; }
863 if (!empty($arrayfields[
't.date_export'][
'checked'])) { $colspanend++; }
864 if (!empty($arrayfields[
't.date_validating'][
'checked'])) { $colspanend++; }
865 if (!empty($arrayfields[
't.lettering_code'][
'checked'])) { $colspanend++; }
868 if ($accountg != $displayed_account_number || !isset($displayed_account_number)) {
870 if (isset($displayed_account_number)) {
871 print
'<tr class="liste_total">';
872 if ($type ==
'sub') {
873 print
'<td class="right" colspan="' . $colspan .
'">' . $langs->trans(
"TotalForAccount") .
' ' .
length_accounta($displayed_account_number) .
':</td>';
875 print
'<td class="right" colspan="' . $colspan .
'">' . $langs->trans(
"TotalForAccount") .
' ' .
length_accountg($displayed_account_number) .
':</td>';
877 print
'<td class="nowrap right">'.price($sous_total_debit).
'</td>';
878 print
'<td class="nowrap right">'.price($sous_total_credit).
'</td>';
879 print
'<td colspan="'.$colspanend.
'"></td>';
882 $balance = $sous_total_debit - $sous_total_credit;
883 print
'<tr class="liste_total">';
884 print
'<td class="right" colspan="'.$colspan.
'">'.$langs->trans(
"Balance").
':</td>';
886 print
'<td class="nowraponall right">';
887 print
price($sous_total_debit - $sous_total_credit);
892 print
'<td class="nowraponall right">';
893 print
price($sous_total_credit - $sous_total_debit);
896 print
'<td colspan="'.$colspanend.
'"></td>';
901 print
'<tr class="trforbreak">';
902 print
'<td colspan="'.($totalarray[
'nbfield'] ? $totalarray[
'nbfield'] : count($arrayfields)+1).
'" class="tdforbreak">';
903 if ($type ==
'sub') {
904 if ($line->subledger_account !=
"" && $line->subledger_account !=
'-1') {
905 print $line->subledger_label .
' : ' .
length_accounta($line->subledger_account);
908 print
'<span class="error">' . $langs->trans(
"Unknown");
909 if ($line->subledger_label) {
910 print
' (' . $line->subledger_label .
')';
911 $htmltext =
'EmptyStringForSubledgerAccountButSubledgerLabelDefined';
913 $htmltext =
'EmptyStringForSubledgerAccountAndSubledgerLabel';
915 print
$form->textwithpicto(
'', $htmltext);
919 if ($line->numero_compte !=
"" && $line->numero_compte !=
'-1') {
920 print
length_accountg($line->numero_compte) .
' : ' . $object->get_compte_desc($line->numero_compte);
922 print
'<span class="error">' . $langs->trans(
"Unknown") .
'</span>';
928 $displayed_account_number = $accountg;
930 $sous_total_debit = 0;
931 $sous_total_credit = 0;
936 print
'<tr class="oddeven">';
939 if (!empty($arrayfields[
't.piece_num'][
'checked'])) {
941 $object->id = $line->id;
942 $object->piece_num = $line->piece_num;
943 print $object->getNomUrl(1,
'', 0,
'', 1);
946 $totalarray[
'nbfield']++;
951 if (!empty($arrayfields[
't.code_journal'][
'checked'])) {
953 $result = $accountingjournal->fetch(
'', $line->code_journal);
954 $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0,
'', 0) : $line->code_journal);
955 print
'<td class="center">'.$journaltoshow.
'</td>';
957 $totalarray[
'nbfield']++;
962 if (!empty($arrayfields[
't.doc_date'][
'checked'])) {
963 print
'<td class="center">'.dol_print_date($line->doc_date,
'day').
'</td>';
965 $totalarray[
'nbfield']++;
970 if (!empty($arrayfields[
't.doc_ref'][
'checked'])) {
971 if ($line->doc_type ==
'customer_invoice') {
972 $langs->loadLangs(array(
'bills'));
974 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
975 $objectstatic =
new Facture($db);
976 $objectstatic->fetch($line->fk_doc);
981 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$objectstatic->id;
982 $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
983 } elseif ($line->doc_type ==
'supplier_invoice') {
984 $langs->loadLangs(array(
'bills'));
986 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
988 $objectstatic->fetch($line->fk_doc);
992 $filedir = $conf->fournisseur->facture->dir_output.
'/'.
get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
993 $subdir =
get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
994 $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir);
995 } elseif ($line->doc_type ==
'expense_report') {
996 $langs->loadLangs(array(
'trips'));
998 require_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
1000 $objectstatic->fetch($line->fk_doc);
1005 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$objectstatic->id;
1006 $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
1007 } elseif ($line->doc_type ==
'bank') {
1008 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
1010 $objectstatic->fetch($line->fk_doc);
1015 print
'<td class="maxwidth400">';
1017 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
1019 print
'<td class="nobordernopadding">';
1021 if ($line->doc_type ==
'customer_invoice' || $line->doc_type ==
'supplier_invoice' || $line->doc_type ==
'expense_report') {
1022 print $objectstatic->getNomUrl(1,
'', 0, 0,
'', 0, -1, 1);
1023 print $documentlink;
1024 } elseif ($line->doc_type ==
'bank') {
1025 print $objectstatic->getNomUrl(1);
1026 $bank_ref = strstr($line->doc_ref,
'-');
1027 print
" " . $bank_ref;
1029 print $line->doc_ref;
1031 print
'</td></tr></table>';
1035 $totalarray[
'nbfield']++;
1040 if (!empty($arrayfields[
't.label_operation'][
'checked'])) {
1042 $doc_ref = preg_replace(
'/\(.*\)/',
'', $line->doc_ref);
1043 print strlen(
length_accounta($line->subledger_account)) == 0 ?
'<td>'.$line->label_operation.
'</td>' :
'<td>'.$line->label_operation.
'<br><span style="font-size:0.8em">('.
length_accounta($line->subledger_account).
')</span></td>';
1045 $totalarray[
'nbfield']++;
1050 if (!empty($arrayfields[
't.debit'][
'checked'])) {
1051 print
'<td class="right nowraponall amount">'.($line->debit ?
price($line->debit) :
'').
'</td>';
1053 $totalarray[
'nbfield']++;
1056 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'totaldebit';
1058 $totalarray[
'val'][
'totaldebit'] += $line->debit;
1062 if (!empty($arrayfields[
't.credit'][
'checked'])) {
1063 print
'<td class="right nowraponall amount">'.($line->credit ?
price($line->credit) :
'').
'</td>';
1065 $totalarray[
'nbfield']++;
1068 $totalarray[
'pos'][$totalarray[
'nbfield']] =
'totalcredit';
1070 $totalarray[
'val'][
'totalcredit'] += $line->credit;
1074 if (!empty($arrayfields[
't.lettering_code'][
'checked'])) {
1075 print
'<td class="center">'.$line->lettering_code.
'</td>';
1077 $totalarray[
'nbfield']++;
1082 if (!empty($arrayfields[
't.date_export'][
'checked'])) {
1083 print
'<td class="center">'.dol_print_date($line->date_export,
'dayhour').
'</td>';
1085 $totalarray[
'nbfield']++;
1090 if (!empty($arrayfields[
't.date_validated'][
'checked'])) {
1091 print
'<td class="center">'.dol_print_date($line->date_validation,
'dayhour').
'</td>';
1093 $totalarray[
'nbfield']++;
1097 if (!empty($arrayfields[
't.import_key'][
'checked'])) {
1098 print
'<td class="tdoverflowmax100">'.$line->import_key.
"</td>\n";
1100 $totalarray[
'nbfield']++;
1105 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$line);
1106 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
1107 print $hookmanager->resPrint;
1110 print
'<td class="nowraponall center">';
1111 if (($massactionbutton || $massaction) && $contextpage !=
'poslist') {
1113 if (in_array($line->id, $arrayofselected)) {
1116 print
'<input id="cb' . $line->id .
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id .
'"' . ($selected ?
' checked="checked"' :
'') .
' />';
1120 $totalarray[
'nbfield']++;
1124 $sous_total_debit += $line->debit;
1125 $sous_total_credit += $line->credit;
1132 if ($num > 0 && $colspan > 0) {
1133 print
'<tr class="liste_total">';
1134 print
'<td class="right" colspan="'.$colspan.
'">'.$langs->trans(
"TotalForAccount").
' '.$accountg.
':</td>';
1135 print
'<td class="nowrap right">'.price($sous_total_debit).
'</td>';
1136 print
'<td class="nowrap right">'.price($sous_total_credit).
'</td>';
1137 print
'<td colspan="'.$colspanend.
'"></td>';
1140 $balance = $sous_total_debit - $sous_total_credit;
1141 print
'<tr class="liste_total">';
1142 print
'<td class="right" colspan="'.$colspan.
'">'.$langs->trans(
"Balance").
':</td>';
1144 print
'<td class="nowraponall right">';
1145 print
price($sous_total_debit - $sous_total_credit);
1150 print
'<td class="nowraponall right">';
1151 print
price($sous_total_credit - $sous_total_debit);
1154 print
'<td colspan="'.$colspanend.
'"></td>';
1159 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
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...
dolGetButtonTitle($label, $helpText= '', $iconClass= 'fa fa-file', $url= '', $id= '', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_now($mode= 'auto')
Return date for now.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default= '')
Return dolibarr global constant string value.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank transaction lines.
Class to manage suppliers invoices.
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...
Class to manage Ledger (General Ledger and Subledger)
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= 'hideonsmartphone', $textfordropdown= '')
Show information for admin users or standard users.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart= '')
Return a path to have a the directory according to object where files are stored. ...
dol_getdate($timestamp, $fast=false, $forcetimezone= '')
Return an array with locale date info.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
length_accounta($accounta)
Return Auxiliary accounting account of thirdparties with defined length.
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
Class to manage Trips and Expenses.
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
isModEnabled($module)
Is Dolibarr module enabled.
Class to manage accounting accounts.
Class to manage invoices.
length_accountg($account)
Return General accounting account with defined length (used for product and miscellaneous) ...
$formconfirm
if ($action == 'delbookkeepingyear') {