dolibarr 24.0.0-beta
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2011-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
6 * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
7 * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
8 * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
9 * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
10 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
11 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
12 * Copyright (C) 2026 Nick Fragoulis
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <https://www.gnu.org/licenses/>.
26 */
27
34// Load Dolibarr environment
35require '../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
45require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php';
46require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
47require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
48require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
49require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
50require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
51
52// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
53$hookmanager->initHooks(array('specialexpensesindex'));
54
55// Load translation files required by the page
56$langs->loadLangs(array('compta', 'bills'));
57
58// Security check
59if ($user->socid) {
60 $socid = $user->socid;
61}
62$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
63
64$mode = GETPOST("mode", 'alpha');
65$year = GETPOSTINT("year");
66$filtre = GETPOST("filtre", 'alpha');
67if (!$year) {
68 $year = date("Y", time());
69}
70$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
71
72$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
73$sortfield = GETPOST('sortfield', 'aZ09comma');
74$sortorder = GETPOST('sortorder', 'aZ09comma');
75$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
76if (empty($page) || $page == -1) {
77 $page = 0;
78} // If $page is not defined, or '' or -1
79$offset = $limit * $page;
80$pageprev = $page - 1;
81$pagenext = $page + 1;
82if (!$sortfield) {
83 $sortfield = "cs.date_ech";
84}
85if (!$sortorder) {
86 $sortorder = "DESC";
87}
88
89
90/*
91 * View
92 */
93
94$tva_static = new Tva($db);
95$ptva_static = new PaymentVAT($db);
96$socialcontrib = new ChargeSociales($db);
97$payment_sc_static = new PaymentSocialContribution($db);
98$sal_static = new Salary($db);
99$accountstatic = new Account($db);
100
101llxHeader('', $langs->trans("SpecialExpensesArea"));
102
103$title = $langs->trans("SpecialExpensesArea");
104
105$param = '';
106if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
107 $param .= '&contextpage='.$contextpage;
108}
109if ($limit > 0 && $limit != $conf->liste_limit) {
110 $param .= '&limit='.$limit;
111}
112if ($sortfield) {
113 $param .= '&sortfield='.$sortfield;
114}
115if ($sortorder) {
116 $param .= '&sortorder='.$sortorder;
117}
118
119$totalnboflines = '';
120$num = 0;
121
122print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
123if ($optioncss != '') {
124 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
125}
126print '<input type="hidden" name="token" value="'.newToken().'">';
127print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
128print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
129print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
130print '<input type="hidden" name="page" value="'.$page.'">';
131print '<input type="hidden" name="mode" value="'.$mode.'">';
132
133$nav = ($year ? '<a href="index.php?year='.($year - 1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="index.php?year='.($year + 1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>" : "");
134
135print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
136
137if ($year) {
138 $param .= '&year='.$year;
139}
140
141print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
142print "<br>";
143
144if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
145 $sql = "SELECT c.id, c.libelle as type_label,";
146 $sql .= " cs.rowid, cs.libelle as label, cs.fk_type as type, cs.periode as period, cs.date_ech, cs.amount as total,";
147 $sql .= " pc.rowid as pid, pc.datep, pc.amount as totalpaid, pc.num_paiement as num_payment, pc.fk_bank,";
148 $sql .= " pct.code as payment_code,";
149 $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
150 $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
151 $sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
152 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
153 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id";
154 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.fk_bank = b.rowid";
155 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
156 $sql .= " WHERE cs.fk_type = c.id";
157 $sql .= " AND cs.entity IN (".getEntity("tax").")";
158 if ($year > 0) {
159 $sql .= " AND (";
160 // If period defined, we use it as date criteria, if not we use date echeance,
161 // so we are compatible when period is not mandatory
162 $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')";
163 $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')";
164 $sql .= ")";
165 }
166 if (preg_match('/^(cs?|pct?)\./', (string) $sortfield)) {
167 $sql .= $db->order((string) $sortfield, (string) $sortorder);
168 }
169 //$sql.= $db->plimit($limit+1,$offset);
170 //print $sql;
171
172 dol_syslog("compta/charges/index.php: select payment", LOG_DEBUG);
173 $resql = $db->query($sql);
174 if ($resql) {
175 $num = $db->num_rows($resql);
176
177 // Social contributions only
178 //print_barre_liste($langs->trans("SocialContributions").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, '', 0, $nav, '', $limit, 1);
179 print load_fiche_titre($langs->trans("SocialContributions").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
180
181 print '<table class="noborder centpercent">';
182 print '<tr class="liste_titre">';
183 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="120"', $sortfield, $sortorder, 'nowraponall ');
184 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, '', $sortfield, $sortorder);
185 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
186 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
187 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder);
188 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder);
189 print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
190 if (isModEnabled("bank")) {
191 print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
192 }
193 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
194 print "</tr>\n";
195
196
197 $total = 0;
198 $totalpaid = 0;
199
200 $i = 0;
201 //$imaxinloop = ($limit ? min($num, $limit) : $num);
202 $imaxinloop = $num; // We want to show all (we can't use navigation when there is 2 tables shown)
203 while ($i < $imaxinloop) {
204 $obj = $db->fetch_object($resql);
205
206 print '<tr class="oddeven">';
207 // Date
208 $date = $obj->period;
209 if (empty($date)) {
210 $date = $obj->date_ech;
211 }
212 print '<td>'.dol_print_date($date, 'day').'</td>';
213 // Label
214 print '<td>';
215 $socialcontrib->id = $obj->rowid;
216 $socialcontrib->ref = $obj->label;
217 $socialcontrib->label = $obj->label;
218 print $socialcontrib->getNomUrl(1, '20');
219 print '</td>';
220 // Type
221 print '<td class="tdoverflowmax200"><a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->type_label.'</a></td>';
222 // Expected to pay
223 print '<td class="right"><span class="amount">'.price($obj->total).'</span></td>';
224 // Ref payment
225 $payment_sc_static->id = $obj->pid;
226 $payment_sc_static->ref = $obj->pid;
227 print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
228 // Date payment
229 print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
230
231 // Payment mode
232 $s = '';
233 if ($obj->payment_code) {
234 $s .= $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
235 }
236 $s .= $obj->num_payment;
237 print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($s).'">';
238 print $s;
239 print '</td>';
240
241 // Account
242 if (isModEnabled("bank")) {
243 print '<td>';
244 if ($obj->fk_bank > 0) {
245 //$accountstatic->fetch($obj->fk_bank);
246 $accountstatic->id = $obj->bid;
247 $accountstatic->ref = $obj->bref;
248 $accountstatic->number = $obj->bnumber;
249 $accountstatic->account_number = $obj->account_number;
250 $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal;
251 $accountstatic->label = $obj->blabel;
252
253 print $accountstatic->getNomUrl(1);
254 } else {
255 print '&nbsp;';
256 }
257 print '</td>';
258 }
259 // Paid
260 print '<td class="right">';
261 if ($obj->totalpaid) {
262 print price($obj->totalpaid);
263 }
264 print '</td>';
265 print '</tr>';
266
267 $total += $obj->total;
268 $totalpaid += $obj->totalpaid;
269 $i++;
270 }
271 print '<tr class="liste_total">';
272
273 print '<td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
274
275 // Total here makes no sense because we can have the same line several times.
276 //print '<td class="liste_total right">'.price($total).'</td>';
277 print '<td class="liste_total right"></td>';
278
279 print '<td class="liste_total center">&nbsp;</td>';
280 print '<td class="liste_total center">&nbsp;</td>';
281 print '<td class="liste_total center">&nbsp;</td>';
282 if (isModEnabled("bank")) {
283 print '<td class="liste_total center"></td>';
284 }
285 print '<td class="liste_total right">'.price($totalpaid)."</td>";
286
287 print "</tr>";
288 } else {
290 }
291 print '</table>';
292}
293
294// VAT
295if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
296 $sql = "SELECT ptva.rowid, pv.rowid as id_tva, pv.amount as amount_tva, ptva.amount, pv.label, pv.datev as dm, ptva.datep as date_payment, ptva.fk_bank, ptva.num_paiement as num_payment,";
297 $sql .= " pct.code as payment_code,";
298 $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
299 $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv";
300 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON ptva.fk_tva = pv.rowid";
301 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON (ptva.fk_bank = b.rowid)";
302 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
303 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ptva.fk_typepaiement = pct.id";
304 $sql .= " WHERE pv.entity IN (".getEntity("tax").")";
305 if ($year > 0) {
306 // If period defined, we use it as date criteria, if not we use date echeance,
307 // so we are compatible when period is not mandatory
308 $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
309 }
310 if (preg_match('/^(pv|ptva)\./', (string) $sortfield)) {
311 $sql .= $db->order((string) $sortfield, (string) $sortorder);
312 }
313
314 $result = $db->query($sql);
315 if ($result) {
316 $num = $db->num_rows($result);
317
318 $i = 0;
319 $total = 0;
320 $totaltopay = 0;
321
322 print "<br>";
323
324 $labeltax = $langs->transcountry("VAT", $mysoc->country_code);
325
326 print load_fiche_titre($labeltax.($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
327
328 print '<table class="noborder centpercent">';
329 print '<tr class="liste_titre">';
330 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder, 'nowraponall ');
331 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
332 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, '', $sortfield, $sortorder, 'right ');
333 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder);
334 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, '', $sortfield, $sortorder, 'center ');
335 print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
336 if (isModEnabled("bank")) {
337 print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
338 }
339 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, '', $sortfield, $sortorder, 'right ');
340 print "</tr>\n";
341
342 //$imaxinloop = ($limit ? min($num, $limit) : $num);
343 $imaxinloop = $num; // We want to show all (we can't use navigation when there is 2 tables shown)
344
345 while ($i < $imaxinloop) {
346 $obj = $db->fetch_object($result);
347
348 $totaltopay += $obj->amount_tva;
349 $total += $obj->amount;
350
351 print '<tr class="oddeven">';
352
353 print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
354
355 $tva_static->id = $obj->id_tva;
356 $tva_static->ref = $obj->label;
357 print "<td>".$tva_static->getNomUrl(1)."</td>\n";
358
359 print '<td class="right"><span class="amount">'.price($obj->amount_tva)."</span></td>";
360
361 // Ref payment
362 $ptva_static->id = $obj->rowid;
363 $ptva_static->ref = $obj->rowid;
364 print '<td>'.$ptva_static->getNomUrl(1)."</td>\n";
365
366 // Date
367 print '<td class="center">'.dol_print_date($db->jdate($obj->date_payment), 'day')."</td>\n";
368
369 // Payment mode
370 $s = '';
371 if ($obj->payment_code) {
372 $s .= $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
373 }
374 $s .= $obj->num_payment;
375 print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($s).'">';
376 print $s;
377 print '</td>';
378
379 // Account
380 if (isModEnabled("bank")) {
381 print '<td>';
382 if ($obj->fk_bank > 0) {
383 //$accountstatic->fetch($obj->fk_bank);
384 $accountstatic->id = $obj->bid;
385 $accountstatic->ref = $obj->bref;
386 $accountstatic->number = $obj->bnumber;
387 $accountstatic->account_number = $obj->account_number;
388 $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal;
389 $accountstatic->label = $obj->blabel;
390
391 print $accountstatic->getNomUrl(1);
392 } else {
393 print '&nbsp;';
394 }
395 print '</td>';
396 }
397
398 // Paid
399 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
400 print "</tr>\n";
401
402 $i++;
403 }
404
405
406 print '<tr class="liste_total">';
407
408 print '<td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>';
409
410 // Total here makes no sense because we can have the same line several times.
411 //print '<td class="right">'.price($totaltopay).'</td>';
412 print '<td class="liste_total">&nbsp;</td>';
413
414 print '<td class="liste_total"></td>';
415 print '<td class="liste_total"></td>';
416 print '<td class="liste_total"></td>';
417
418 if (isModEnabled("bank")) {
419 print '<td class="liste_total"></td>';
420 }
421
422 print '<td class="liste_total right">'.price($total)."</td>";
423
424 print "</tr>";
425
426 print "</table>";
427
428 $db->free($result);
429 } else {
431 }
432}
433
434// Localtax
435if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
436 $j = 1;
437 $numlt = 3;
438} elseif ($mysoc->localtax1_assuj == "1") {
439 $j = 1;
440 $numlt = 2;
441} elseif ($mysoc->localtax2_assuj == "1") {
442 $j = 2;
443 $numlt = 3;
444} else {
445 $j = 0;
446 $numlt = 0;
447}
448
449while ($j < $numlt) {
450 print "<br>";
451
452 $labeltax = $langs->transcountry(($j == 1 ? "LT1" : "LT2"), $mysoc->country_code);
453
454 print load_fiche_titre($labeltax.($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
455
456
457 $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
458 $sql .= " FROM ".MAIN_DB_PREFIX."localtax as pv";
459 $sql .= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".((int) $j);
460 if ($year > 0) {
461 // If period defined, we use it as date criteria, if not we use date echeance,
462 // so we are compatible when period is not mandatory
463 $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
464 }
465 if (preg_match('/^pv/', (string) $sortfield)) {
466 $sql .= $db->order((string) $sortfield, (string) $sortorder);
467 }
468
469 $result = $db->query($sql);
470 if ($result) {
471 $num = $db->num_rows($result);
472 $i = 0;
473 $total = 0;
474
475 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
476 print '<table class="noborder centpercent">';
477 print '<tr class="liste_titre">';
478 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
479 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
480 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
481 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
482 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
483 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
484 print "</tr>\n";
485
486 while ($i < $num) {
487 $obj = $db->fetch_object($result);
488
489 $total += $obj->amount;
490
491 print '<tr class="oddeven">';
492 print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
493
494 print "<td>".$obj->label."</td>\n";
495
496 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
497
498 // Ref payment
499 $ptva_static->id = $obj->rowid;
500 $ptva_static->ref = $obj->rowid;
501 print '<td class="left">'.$ptva_static->getNomUrl(1)."</td>\n";
502
503 print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
504 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
505 print "</tr>\n";
506
507 $i++;
508 }
509 print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
510 print '<td class="right">'.price($total)."</td>";
511 print '<td align="center">&nbsp;</td>';
512 print '<td align="center">&nbsp;</td>';
513 print '<td class="right">'.price($total)."</td>";
514 print "</tr>";
515
516 print "</table>";
517 print '</div>';
518
519 $db->free($result);
520 } else {
522 }
523
524 $j++;
525}
526
527print '</form>';
528
529$parameters = array('user' => $user);
530$reshook = $hookmanager->executeHooks('dashboardSpecialBills', $parameters, $object); // Note that $action and $object may have been modified by hook
531
532// End of page
533llxFooter();
534$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage bank accounts.
Class for managing the social charges.
Class to manage payments of social contributions.
Class to manage payments of social contributions.
Class to manage salary payments.
Class to manage VAT - Value-added tax (also known in French as TVA)
Definition tva.class.php:39
global $mysoc
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:604
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:623
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
img_previous($titlealt='default', $moreatt='')
Show previous logo.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_next($titlealt='default', $moreatt='')
Show next logo.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
print $langs trans('Date')." left Ref Label right Qty right Price right TotalHT right TotalTTC right right right right right right right right right centpercent right TotalHT right n right VAT right n right TotalVAT right n No sujeto a RE IRPF right TotalLT1 right n right TotalLT2 right n right TotalTTC right n takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency right TotalTTC takeposcustomercurrency right takeposcustomercurrency n right Paid right PaymentTypeShortLIQ right SELECT p pos_change as p datep as date
Definition receipt.php:487
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.