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