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