dolibarr 19.0.4
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 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
31// Load Dolibarr environment
32require '../../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
34require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php';
35require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
36require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
37require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
38require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
39require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
40
41
42$hookmanager = new HookManager($db);
43
44// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array
45$hookmanager->initHooks(array('specialexpensesindex'));
46
47// Load translation files required by the page
48$langs->loadLangs(array('compta', 'bills'));
49
50// Security check
51if ($user->socid) {
52 $socid = $user->socid;
53}
54$result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
55
56$mode = GETPOST("mode", 'alpha');
57$year = GETPOST("year", 'int');
58$filtre = GETPOST("filtre", 'alpha');
59if (!$year) {
60 $year = date("Y", time());
61}
62$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
63
64$search_account = GETPOST('search_account', 'int');
65
66$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
67$sortfield = GETPOST('sortfield', 'aZ09comma');
68$sortorder = GETPOST('sortorder', 'aZ09comma');
69$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
70if (empty($page) || $page == -1) {
71 $page = 0;
72} // If $page is not defined, or '' or -1
73$offset = $limit * $page;
74$pageprev = $page - 1;
75$pagenext = $page + 1;
76if (!$sortfield) {
77 $sortfield = "cs.date_ech";
78}
79if (!$sortorder) {
80 $sortorder = "DESC";
81}
82
83
84/*
85 * View
86 */
87
88$tva_static = new Tva($db);
89$ptva_static = new PaymentVAT($db);
90$socialcontrib = new ChargeSociales($db);
91$payment_sc_static = new PaymentSocialContribution($db);
92$sal_static = new Salary($db);
93$accountstatic = new Account($db);
94
95llxHeader('', $langs->trans("SpecialExpensesArea"));
96
97$title = $langs->trans("SpecialExpensesArea");
98
99$param = '';
100if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
101 $param .= '&contextpage='.$contextpage;
102}
103if ($limit > 0 && $limit != $conf->liste_limit) {
104 $param .= '&limit='.$limit;
105}
106if ($sortfield) {
107 $param .= '&sortfield='.$sortfield;
108}
109if ($sortorder) {
110 $param .= '&sortorder='.$sortorder;
111}
112
113$totalnboflines = 0;
114$num = 0;
115
116print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
117if ($optioncss != '') {
118 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
119}
120print '<input type="hidden" name="token" value="'.newToken().'">';
121print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
122print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
123print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
124print '<input type="hidden" name="page" value="'.$page.'">';
125print '<input type="hidden" name="mode" value="'.$mode.'">';
126
127$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>" : "");
128print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
129
130if ($year) {
131 $param .= '&year='.$year;
132}
133
134print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
135print "<br>";
136
137if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
138 // Social contributions only
139 print load_fiche_titre($langs->trans("SocialContributions").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
140
141 print '<table class="noborder centpercent">';
142 print '<tr class="liste_titre">';
143 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
144 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
145 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
146 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
147 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder);
148 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder);
149 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
150 if (isModEnabled("banque")) {
151 print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
152 }
153 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
154 print "</tr>\n";
155
156 $sql = "SELECT c.id, c.libelle as label,";
157 $sql .= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode as period, cs.date_ech, cs.amount as total,";
158 $sql .= " pc.rowid as pid, pc.datep, pc.amount as totalpaid, pc.num_paiement as num_payment, pc.fk_bank,";
159 $sql .= " pct.code as payment_code,";
160 $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
161 $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
162 $sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
163 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
164 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id";
165 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON pc.fk_bank = b.rowid";
166 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
167 $sql .= " WHERE cs.fk_type = c.id";
168 $sql .= " AND cs.entity IN (".getEntity("tax").")";
169 if ($year > 0) {
170 $sql .= " AND (";
171 // If period defined, we use it as dat criteria, if not we use date echeance,
172 // so we are compatible when period is not mandatory
173 $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))."')";
174 $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))."')";
175 $sql .= ")";
176 }
177 if (preg_match('/^cs\./', $sortfield) || preg_match('/^c\./', $sortfield) || preg_match('/^pc\./', $sortfield) || preg_match('/^pct\./', $sortfield)) {
178 $sql .= $db->order($sortfield, $sortorder);
179 }
180 //$sql.= $db->plimit($limit+1,$offset);
181 //print $sql;
182
183 dol_syslog("compta/charges/index.php: select payment", LOG_DEBUG);
184 $resql = $db->query($sql);
185 if ($resql) {
186 $num = $db->num_rows($resql);
187
188 $total = 0;
189 $totalpaid = 0;
190
191 $i = 0;
192 while ($i < min($num, $limit)) {
193 $obj = $db->fetch_object($resql);
194
195 print '<tr class="oddeven">';
196 // Date
197 $date = $obj->period;
198 if (empty($date)) {
199 $date = $obj->date_ech;
200 }
201 print '<td>'.dol_print_date($date, 'day').'</td>';
202 // Label
203 print '<td>';
204 $socialcontrib->id = $obj->rowid;
205 $socialcontrib->ref = $obj->label;
206 $socialcontrib->label = $obj->label;
207 print $socialcontrib->getNomUrl(1, '20');
208 print '</td>';
209 // Type
210 print '<td><a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->label.'</a></td>';
211 // Expected to pay
212 print '<td class="right"><span class="amount">'.price($obj->total).'</span></td>';
213 // Ref payment
214 $payment_sc_static->id = $obj->pid;
215 $payment_sc_static->ref = $obj->pid;
216 print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
217 // Date payment
218 print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
219 // Type payment
220 print '<td>';
221 if ($obj->payment_code) {
222 print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
223 }
224 print $obj->num_payment.'</td>';
225 // Account
226 if (isModEnabled("banque")) {
227 print '<td>';
228 if ($obj->fk_bank > 0) {
229 //$accountstatic->fetch($obj->fk_bank);
230 $accountstatic->id = $obj->bid;
231 $accountstatic->ref = $obj->bref;
232 $accountstatic->number = $obj->bnumber;
233 $accountstatic->account_number = $obj->account_number;
234 $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal;
235 $accountstatic->label = $obj->blabel;
236
237 print $accountstatic->getNomUrl(1);
238 } else {
239 print '&nbsp;';
240 }
241 print '</td>';
242 }
243 // Paid
244 print '<td class="right">';
245 if ($obj->totalpaid) {
246 print price($obj->totalpaid);
247 }
248 print '</td>';
249 print '</tr>';
250
251 $total = $total + $obj->total;
252 $totalpaid = $totalpaid + $obj->totalpaid;
253 $i++;
254 }
255 print '<tr class="liste_total">';
256
257 print '<td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
258
259 // Total here has no sens because we can have several time the same line
260 //print '<td class="liste_total right">'.price($total).'</td>';
261 print '<td class="liste_total right"></td>';
262
263 print '<td class="liste_total center">&nbsp;</td>';
264 print '<td class="liste_total center">&nbsp;</td>';
265 print '<td class="liste_total center">&nbsp;</td>';
266 if (isModEnabled("banque")) {
267 print '<td class="liste_total center"></td>';
268 }
269 print '<td class="liste_total right">'.price($totalpaid)."</td>";
270
271 print "</tr>";
272 } else {
273 dol_print_error($db);
274 }
275 print '</table>';
276}
277
278// VAT
279if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
280 print "<br>";
281
282 $tva = new Tva($db);
283
284 print load_fiche_titre($langs->trans("VATDeclarations").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
285
286 $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,";
287 $sql .= " pct.code as payment_code,";
288 $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
289 $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv";
290 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON ptva.fk_tva = pv.rowid";
291 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON (ptva.fk_bank = b.rowid)";
292 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
293 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ptva.fk_typepaiement = pct.id";
294 $sql .= " WHERE pv.entity IN (".getEntity("tax").")";
295 if ($year > 0) {
296 // If period defined, we use it as dat criteria, if not we use date echeance,
297 // so we are compatible when period is not mandatory
298 $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
299 }
300 if (preg_match('/^pv\./', $sortfield) || preg_match('/^ptva\./', $sortfield)) {
301 $sql .= $db->order($sortfield, $sortorder);
302 }
303
304 $result = $db->query($sql);
305 if ($result) {
306 $num = $db->num_rows($result);
307
308 $i = 0;
309 $total = 0;
310 $totaltopay = 0;
311
312 print '<table class="noborder centpercent">';
313 print '<tr class="liste_titre">';
314 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
315 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
316 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
317 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder);
318 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, 'align="center"', $sortfield, $sortorder);
319 print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
320 if (isModEnabled("banque")) {
321 print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
322 }
323 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, 'class="right"', $sortfield, $sortorder);
324 print "</tr>\n";
325
326 while ($i < $num) {
327 $obj = $db->fetch_object($result);
328
329 $totaltopay = $totaltopay + $obj->amount_tva;
330 $total = $total + $obj->amount;
331
332
333 print '<tr class="oddeven">';
334
335 print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
336
337 $tva_static->id = $obj->id_tva;
338 $tva_static->ref = $obj->label;
339 print "<td>".$tva_static->getNomUrl(1)."</td>\n";
340
341 print '<td class="right"><span class="amount">'.price($obj->amount_tva)."</span></td>";
342
343 // Ref payment
344 $ptva_static->id = $obj->rowid;
345 $ptva_static->ref = $obj->rowid;
346 print '<td>'.$ptva_static->getNomUrl(1)."</td>\n";
347
348 // Date
349 print '<td class="center">'.dol_print_date($db->jdate($obj->date_payment), 'day')."</td>\n";
350
351 // Type payment
352 print '<td>';
353 if ($obj->payment_code) {
354 print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
355 }
356 print $obj->num_payment.'</td>';
357
358 // Account
359 if (isModEnabled("banque")) {
360 print '<td>';
361 if ($obj->fk_bank > 0) {
362 //$accountstatic->fetch($obj->fk_bank);
363 $accountstatic->id = $obj->bid;
364 $accountstatic->ref = $obj->bref;
365 $accountstatic->number = $obj->bnumber;
366 $accountstatic->account_number = $obj->account_number;
367 $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal;
368 $accountstatic->label = $obj->blabel;
369
370 print $accountstatic->getNomUrl(1);
371 } else {
372 print '&nbsp;';
373 }
374 print '</td>';
375 }
376
377 // Paid
378 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
379 print "</tr>\n";
380
381 $i++;
382 }
383 print '<tr class="liste_total">';
384
385 print '<td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>';
386
387 // Total here has no sens because we can have several time the same line
388 //print '<td class="right">'.price($totaltopay).'</td>';
389 print '<td class="liste_total">&nbsp;</td>';
390
391 print '<td class="liste_total"></td>';
392 print '<td class="liste_total"></td>';
393 print '<td class="liste_total"></td>';
394
395 if (isModEnabled("banque")) {
396 print '<td class="liste_total"></td>';
397 }
398
399 print '<td class="liste_total right">'.price($total)."</td>";
400
401 print "</tr>";
402
403 print "</table>";
404
405 $db->free($result);
406 } else {
407 dol_print_error($db);
408 }
409}
410
411// Localtax
412if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
413 $j = 1;
414 $numlt = 3;
415} elseif ($mysoc->localtax1_assuj == "1") {
416 $j = 1;
417 $numlt = 2;
418} elseif ($mysoc->localtax2_assuj == "1") {
419 $j = 2;
420 $numlt = 3;
421} else {
422 $j = 0;
423 $numlt = 0;
424}
425
426while ($j < $numlt) {
427 print "<br>";
428
429 $tva = new Tva($db);
430
431 print load_fiche_titre($langs->transcountry(($j == 1 ? "LT1Payments" : "LT2Payments"), $mysoc->country_code).($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
432
433
434 $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
435 $sql .= " FROM ".MAIN_DB_PREFIX."localtax as pv";
436 $sql .= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".((int) $j);
437 if ($year > 0) {
438 // If period defined, we use it as dat criteria, if not we use date echeance,
439 // so we are compatible when period is not mandatory
440 $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
441 }
442 if (preg_match('/^pv/', $sortfield)) {
443 $sql .= $db->order($sortfield, $sortorder);
444 }
445
446 $result = $db->query($sql);
447 if ($result) {
448 $num = $db->num_rows($result);
449 $i = 0;
450 $total = 0;
451
452 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
453 print '<table class="noborder centpercent">';
454 print '<tr class="liste_titre">';
455 print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
456 print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
457 print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
458 print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
459 print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
460 print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
461 print "</tr>\n";
462
463 while ($i < $num) {
464 $obj = $db->fetch_object($result);
465
466 $total = $total + $obj->amount;
467
468 print '<tr class="oddeven">';
469 print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
470
471 print "<td>".$obj->label."</td>\n";
472
473 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
474
475 // Ref payment
476 $ptva_static->id = $obj->rowid;
477 $ptva_static->ref = $obj->rowid;
478 print '<td class="left">'.$ptva_static->getNomUrl(1)."</td>\n";
479
480 print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
481 print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
482 print "</tr>\n";
483
484 $i++;
485 }
486 print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
487 print '<td class="right">'.price($total)."</td>";
488 print '<td align="center">&nbsp;</td>';
489 print '<td align="center">&nbsp;</td>';
490 print '<td class="right">'.price($total)."</td>";
491 print "</tr>";
492
493 print "</table>";
494 print '</div>';
495
496 $db->free($result);
497 } else {
498 dol_print_error($db);
499 }
500
501 $j++;
502}
503
504print '</form>';
505
506$parameters = array('user' => $user);
507$reshook = $hookmanager->executeHooks('dashboardSpecialBills', $parameters, $object); // Note that $action and $object may have been modified by hook
508
509// End of page
510llxFooter();
511$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage bank accounts.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...
Class to manage hooks.
Class to manage payments of social contributions.
Class to manage payments of social contributions.
Class to manage salary payments.
Put here description of your class.
Definition tva.class.php:36
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition date.lib.php:594
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition date.lib.php:613
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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.
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.
img_next($titlealt='default', $moreatt='')
Show next logo.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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.