dolibarr  17.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
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 = GETPOST("year", 'int');
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 $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');
70 if (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;
76 if (!$sortfield) {
77  $sortfield = "cs.date_ech";
78 }
79 if (!$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 
95 llxHeader('', $langs->trans("SpecialExpensesArea"));
96 
97 $title = $langs->trans("SpecialExpensesArea");
98 
99 $param = '';
100 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
101  $param .= '&contextpage='.$contextpage;
102 }
103 if ($limit > 0 && $limit != $conf->liste_limit) {
104  $param .= '&limit='.$limit;
105 }
106 if ($sortfield) {
107  $param .= '&sortfield='.$sortfield;
108 }
109 if ($sortorder) {
110  $param .= '&sortorder='.$sortorder;
111 }
112 
113 $totalnboflines = 0;
114 $num = 0;
115 
116 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
117 if ($optioncss != '') {
118  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
119 }
120 print '<input type="hidden" name="token" value="'.newToken().'">';
121 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
122 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
123 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
124 print '<input type="hidden" name="page" value="'.$page.'">';
125 print '<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>" : "");
128 print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
129 
130 if ($year) {
131  $param .= '&year='.$year;
132 }
133 
134 print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
135 print "<br>";
136 
137 if (isModEnabled('tax') && $user->rights->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, 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  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
172  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
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  $i = 0;
188  $total = 0;
189  $totalpaid = 0;
190 
191  while ($i < min($num, $limit)) {
192  $obj = $db->fetch_object($resql);
193  print '<tr class="oddeven">';
194  // Date
195  $date = $obj->periode;
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("banque")) {
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"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
254  print '<td class="liste_total right"></td>'; // A total here has no sense
255  print '<td align="center" class="liste_total">&nbsp;</td>';
256  print '<td align="center" class="liste_total">&nbsp;</td>';
257  print '<td align="center" class="liste_total">&nbsp;</td>';
258  if (isModEnabled("banque")) {
259  print '<td></td>';
260  }
261  print '<td class="liste_total right">'.price($totalpaid)."</td>";
262  print "</tr>";
263  } else {
264  dol_print_error($db);
265  }
266  print '</table>';
267 }
268 
269 // VAT
270 if (isModEnabled('tax') && $user->rights->tax->charges->lire) {
271  print "<br>";
272 
273  $tva = new Tva($db);
274 
275  print load_fiche_titre($langs->trans("VATDeclarations").($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
276 
277  $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,";
278  $sql .= " pct.code as payment_code,";
279  $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
280  $sql .= " FROM ".MAIN_DB_PREFIX."tva as pv";
281  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON (ptva.fk_tva = pv.rowid)";
282  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON (ptva.fk_bank = b.rowid)";
283  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
284  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ptva.fk_typepaiement = pct.id";
285  $sql .= " WHERE pv.entity IN (".getEntity("tax").")";
286  if ($year > 0) {
287  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
288  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
289  $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
290  }
291  if (preg_match('/^pv\./', $sortfield) || preg_match('/^ptva\./', $sortfield)) {
292  $sql .= $db->order($sortfield, $sortorder);
293  }
294 
295  $result = $db->query($sql);
296  if ($result) {
297  $num = $db->num_rows($result);
298  $i = 0;
299  $total = 0;
300  print '<table class="noborder centpercent">';
301  print '<tr class="liste_titre">';
302  print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
303  print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
304  print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
305  print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder);
306  print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, 'align="center"', $sortfield, $sortorder);
307  print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
308  if (isModEnabled("banque")) {
309  print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
310  }
311  print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "ptva.amount", "", $param, 'class="right"', $sortfield, $sortorder);
312  print "</tr>\n";
313  $var = 1;
314  while ($i < $num) {
315  $obj = $db->fetch_object($result);
316 
317  $total = $total + $obj->amount;
318 
319 
320  print '<tr class="oddeven">';
321  print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
322 
323  $tva_static->id = $obj->id_tva;
324  $tva_static->ref = $obj->label;
325  print "<td>".$tva_static->getNomUrl(1)."</td>\n";
326 
327  print '<td class="right"><span class="amount">'.price($obj->amount_tva)."</span></td>";
328 
329  // Ref payment
330  $ptva_static->id = $obj->rowid;
331  $ptva_static->ref = $obj->rowid;
332  print '<td class="left">'.$ptva_static->getNomUrl(1)."</td>\n";
333 
334  // Date
335  print '<td class="center">'.dol_print_date($db->jdate($obj->date_payment), 'day')."</td>\n";
336 
337  // Type payment
338  print '<td>';
339  if ($obj->payment_code) {
340  print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
341  }
342  print $obj->num_payment.'</td>';
343 
344  // Account
345  if (isModEnabled("banque")) {
346  print '<td>';
347  if ($obj->fk_bank > 0) {
348  //$accountstatic->fetch($obj->fk_bank);
349  $accountstatic->id = $obj->bid;
350  $accountstatic->ref = $obj->bref;
351  $accountstatic->number = $obj->bnumber;
352  $accountstatic->account_number = $obj->account_number;
353  $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal;
354  $accountstatic->label = $obj->blabel;
355 
356  print $accountstatic->getNomUrl(1);
357  } else {
358  print '&nbsp;';
359  }
360  print '</td>';
361  }
362 
363  // Paid
364  print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
365  print "</tr>\n";
366 
367  $i++;
368  }
369  print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
370  print '<td>&nbsp;</td>';
371  print '<td>&nbsp;</td>';
372  print '<td>&nbsp;</td>';
373  print '<td>&nbsp;</td>';
374  print '<td>&nbsp;</td>';
375  print '<td class="right">'.price($total)."</td>";
376  print "</tr>";
377 
378  print "</table>";
379  $db->free($result);
380  } else {
381  dol_print_error($db);
382  }
383 }
384 
385 // Localtax
386 if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
387  $j = 1;
388  $numlt = 3;
389 } elseif ($mysoc->localtax1_assuj == "1") {
390  $j = 1;
391  $numlt = 2;
392 } elseif ($mysoc->localtax2_assuj == "1") {
393  $j = 2;
394  $numlt = 3;
395 } else {
396  $j = 0;
397  $numlt = 0;
398 }
399 
400 while ($j < $numlt) {
401  print "<br>";
402 
403  $tva = new Tva($db);
404 
405  print load_fiche_titre($langs->transcountry(($j == 1 ? "LT1Payments" : "LT2Payments"), $mysoc->country_code).($year ? ' ('.$langs->trans("Year").' '.$year.')' : ''), '', '');
406 
407 
408  $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
409  $sql .= " FROM ".MAIN_DB_PREFIX."localtax as pv";
410  $sql .= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".((int) $j);
411  if ($year > 0) {
412  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
413  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
414  $sql .= " AND pv.datev between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
415  }
416  if (preg_match('/^pv/', $sortfield)) {
417  $sql .= $db->order($sortfield, $sortorder);
418  }
419 
420  $result = $db->query($sql);
421  if ($result) {
422  $num = $db->num_rows($result);
423  $i = 0;
424  $total = 0;
425 
426  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
427  print '<table class="noborder centpercent">';
428  print '<tr class="liste_titre">';
429  print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
430  print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
431  print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
432  print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
433  print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
434  print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
435  print "</tr>\n";
436 
437  while ($i < $num) {
438  $obj = $db->fetch_object($result);
439 
440  $total = $total + $obj->amount;
441 
442  print '<tr class="oddeven">';
443  print '<td class="left">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'."\n";
444 
445  print "<td>".$obj->label."</td>\n";
446 
447  print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
448 
449  // Ref payment
450  $ptva_static->id = $obj->rowid;
451  $ptva_static->ref = $obj->rowid;
452  print '<td class="left">'.$ptva_static->getNomUrl(1)."</td>\n";
453 
454  print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
455  print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>";
456  print "</tr>\n";
457 
458  $i++;
459  }
460  print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
461  print '<td class="right">'.price($total)."</td>";
462  print '<td align="center">&nbsp;</td>';
463  print '<td align="center">&nbsp;</td>';
464  print '<td class="right">'.price($total)."</td>";
465  print "</tr>";
466 
467  print "</table>";
468  print '</div>';
469 
470  $db->free($result);
471  } else {
472  dol_print_error($db);
473  }
474 
475  $j++;
476 }
477 
478 print '</form>';
479 
480 $parameters = array('user' => $user);
481 $reshook = $hookmanager->executeHooks('dashboardSpecialBills', $parameters, $object); // Note that $action and $object may have been modified by hook
482 
483 // End of page
484 llxFooter();
485 $db->close();
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 salary payments.
Put here description of your class.
Definition: tva.class.php:36
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("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->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
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:575
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:594
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.
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:71
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
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.