dolibarr  7.0.0-beta
payments.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
5  * Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
6  * Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
7  * Copyright (C) 2015 Jean-Fran├žois Ferry <jfefe@aternatik.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
29 require '../../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
31 require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
33 require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
35 
36 $langs->load("compta");
37 $langs->load("bills");
38 
39 // Security check
40 if ($user->societe_id) $socid=$user->societe_id;
41 $result = restrictedArea($user, 'tax|salaries', '', '', 'charges|');
42 
43 $mode=GETPOST("mode",'alpha');
44 $year=GETPOST("year",'int');
45 $filtre=GETPOST("filtre",'alpha');
46 if (! $year && $mode != 'sconly') { $year=date("Y", time()); }
47 
48 $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
49 $sortfield = GETPOST("sortfield",'alpha');
50 $sortorder = GETPOST("sortorder",'alpha');
51 $page = GETPOST("page",'int');
52 if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
53 $offset = $limit * $page;
54 $pageprev = $page - 1;
55 $pagenext = $page + 1;
56 if (! $sortfield) $sortfield="pc.datep";
57 if (! $sortorder) $sortorder="DESC";
58 
59 
60 /*
61  * View
62  */
63 
64 $tva_static = new Tva($db);
65 $socialcontrib=new ChargeSociales($db);
66 $payment_sc_static=new PaymentSocialContribution($db);
67 $sal_static = new PaymentSalary($db);
68 
69 llxHeader('',$langs->trans("SpecialExpensesArea"));
70 
71 $title=$langs->trans("SpecialExpensesArea");
72 if ($mode == 'sconly') $title=$langs->trans("SocialContributionsPayments");
73 
74 $param='';
75 if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
76 if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
77 if ($mode == 'sconly') $param='&mode=sconly';
78 if ($sortfield) $param.='&sortfield='.$sortfield;
79 if ($sortorder) $param.='&sortorder='.$sortorder;
80 
81 
82 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
83 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
84 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
85 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
86 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
87 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
88 print '<input type="hidden" name="page" value="'.$page.'">';
89 print '<input type="hidden" name="mode" value="'.$mode.'">';
90 
91 if ($mode != 'sconly')
92 {
93  $center=($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>":"");
94  print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$center,$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit, 1);
95 }
96 else
97 {
98  print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$center,$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit);
99 }
100 
101 if ($year) $param.='&year='.$year;
102 
103 if ($mode != 'sconly')
104 {
105  print $langs->trans("DescTaxAndDividendsArea").'<br>';
106  print "<br>";
107 }
108 
109 if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
110 {
111  // Social contributions only
112  if ($mode != 'sconly')
113  {
114  print load_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
115  }
116 
117  print '<table class="noborder" width="100%">';
118  print '<tr class="liste_titre">';
119  print_liste_field_titre("RefPayment",$_SERVER["PHP_SELF"],"pc.rowid","",$param,'',$sortfield,$sortorder);
120  print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"pc.datep","",$param,'align="center"',$sortfield,$sortorder);
121  print_liste_field_titre("Type",$_SERVER["PHP_SELF"],"pct.code","",$param,'',$sortfield,$sortorder);
122  print_liste_field_titre("LabelContrib",$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder);
123  print_liste_field_titre("TypeContrib",$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder);
124  print_liste_field_titre("PeriodEndDate",$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="140px"',$sortfield,$sortorder);
125  print_liste_field_titre("ExpectedToPay",$_SERVER["PHP_SELF"],"cs.amount","",$param,'align="right"',$sortfield,$sortorder);
126  print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"pc.amount","",$param,'align="right"',$sortfield,$sortorder);
127  print "</tr>\n";
128 
129  $sql = "SELECT c.id, c.libelle as lib,";
130  $sql.= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total,";
131  $sql.= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment,";
132  $sql.= " pct.code as payment_code";
133  $sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
134  $sql.= " ".MAIN_DB_PREFIX."chargesociales as cs,";
135  $sql.= " ".MAIN_DB_PREFIX."paiementcharge as pc";
136  $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON pc.fk_typepaiement = pct.id AND pct.entity IN (".getEntity('c_paiement').")";
137  $sql.= " WHERE cs.fk_type = c.id AND pc.fk_charge = cs.rowid";
138  $sql.= " AND cs.entity = ".$conf->entity;
139  if ($year > 0)
140  {
141  $sql .= " AND (";
142  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
143  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
144  $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))."')";
145  $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))."')";
146  $sql .= ")";
147  }
148  if (preg_match('/^cs\./',$sortfield) || preg_match('/^c\./',$sortfield) || preg_match('/^pc\./',$sortfield) || preg_match('/^pct\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder);
149  //$sql.= $db->plimit($limit+1,$offset);
150  //print $sql;
151 
152  dol_syslog("compta/sociales/payments.php: select payment", LOG_DEBUG);
153  $resql=$db->query($sql);
154  if ($resql)
155  {
156  $num = $db->num_rows($resql);
157  $i = 0;
158  $total = 0;
159  $totalnb = 0;
160  $totalpaye = 0;
161  $var=true;
162 
163  while ($i < min($num, $limit))
164  {
165  $obj = $db->fetch_object($resql);
166  $var = !$var;
167  print '<tr class="oddeven">';
168  // Ref payment
169  $payment_sc_static->id=$obj->pid;
170  $payment_sc_static->ref=$obj->pid;
171  print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
172  // Date payment
173  print '<td align="center">'.dol_print_date($db->jdate($obj->datep),'day').'</td>';
174  // Type payment
175  print '<td>';
176  if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
177  print $obj->num_payment.'</td>';
178  // Label
179  print '<td>';
180  $socialcontrib->id=$obj->rowid;
181  $socialcontrib->ref=$obj->libelle;
182  $socialcontrib->lib=$obj->libelle;
183  print $socialcontrib->getNomUrl(1,'20');
184  print '</td>';
185  // Type
186  print '<td><a href="../sociales/index.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
187  // Date
188  $date=$obj->periode;
189  if (empty($date)) $date=$obj->date_ech;
190  print '<td>'.dol_print_date($date,'day').'</td>';
191  // Expected to pay
192  print '<td align="right">'.price($obj->total).'</td>';
193  // Paid
194  print '<td align="right">';
195  if ($obj->totalpaye) print price($obj->totalpaye);
196  print '</td>';
197  print '</tr>';
198 
199  $total = $total + $obj->total;
200  $totalnb = $totalnb + $obj->nb;
201  $totalpaye = $totalpaye + $obj->totalpaye;
202  $i++;
203  }
204  print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
205  print '<td align="right" class="liste_total"></td>'; // A total here has no sense
206  print '<td align="center" class="liste_total">&nbsp;</td>';
207  print '<td align="center" class="liste_total">&nbsp;</td>';
208  print '<td align="center" class="liste_total">&nbsp;</td>';
209  print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
210  print "</tr>";
211  }
212  else
213  {
214  dol_print_error($db);
215  }
216  print '</table>';
217 }
218 
219 // VAT
220 if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
221 {
222  if (! $mode || $mode != 'sconly')
223  {
224  print "<br>";
225 
226  $tva = new Tva($db);
227 
228  print load_fiche_titre($langs->trans("VATPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
229 
230  $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm";
231  $sql.= " FROM ".MAIN_DB_PREFIX."tva as pv";
232  $sql.= " WHERE pv.entity = ".$conf->entity;
233  if ($year > 0)
234  {
235  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
236  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
237  $sql.= " AND pv.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
238  }
239  if (preg_match('/^pv\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder);
240 
241  $result = $db->query($sql);
242  if ($result)
243  {
244  $num = $db->num_rows($result);
245  $i = 0;
246  $total = 0 ;
247  print '<table class="noborder" width="100%">';
248  print '<tr class="liste_titre">';
249  print_liste_field_titre("PeriodEndDate",$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="140px"',$sortfield,$sortorder);
250  print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder);
251  print_liste_field_titre("ExpectedToPay",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
252  print_liste_field_titre("RefPayment",$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder);
253  print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"pv.datev","",$param,'align="center"',$sortfield,$sortorder);
254  print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
255  print "</tr>\n";
256  $var=1;
257  while ($i < $num)
258  {
259  $obj = $db->fetch_object($result);
260 
261  $total = $total + $obj->amount;
262 
263 
264  print '<tr class="oddeven">';
265  print '<td align="left">'.dol_print_date($db->jdate($obj->dm),'day').'</td>'."\n";
266 
267  print "<td>".$obj->label."</td>\n";
268 
269  print '<td align="right">'.price($obj->amount)."</td>";
270 
271  // Ref payment
272  $tva_static->id=$obj->rowid;
273  $tva_static->ref=$obj->rowid;
274  print '<td align="left">'.$tva_static->getNomUrl(1)."</td>\n";
275 
276  print '<td align="center">'.dol_print_date($db->jdate($obj->dm),'day')."</td>\n";
277  print '<td align="right">'.price($obj->amount)."</td>";
278  print "</tr>\n";
279 
280  $i++;
281  }
282  print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
283  print '<td align="right">'.price($total).'</td>';
284  print '<td align="center">&nbsp;</td>';
285  print '<td align="center">&nbsp;</td>';
286  print '<td align="right">'.price($total)."</td>";
287  print "</tr>";
288 
289  print "</table>";
290  $db->free($result);
291  }
292  else
293  {
294  dol_print_error($db);
295  }
296  }
297 }
298 
299 // Localtax
300 if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
301 {
302  $j=1;
303  $numlt=3;
304 }
305 elseif($mysoc->localtax1_assuj=="1")
306 {
307  $j=1;
308  $numlt=2;
309 }
310 elseif($mysoc->localtax2_assuj=="1")
311 {
312  $j=2;
313  $numlt=3;
314 }
315 else
316 {
317  $j=0;
318  $numlt=0;
319 }
320 
321 while($j<$numlt)
322 {
323  if (! $mode || $mode != 'sconly')
324  {
325  print "<br>";
326 
327  $tva = new Tva($db);
328 
329  print load_fiche_titre($langs->transcountry(($j==1?"LT1Payments":"LT2Payments"),$mysoc->country_code).($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
330 
331 
332  $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp";
333  $sql.= " FROM ".MAIN_DB_PREFIX."localtax as pv";
334  $sql.= " WHERE pv.entity = ".$conf->entity." AND localtaxtype = ".$j ;
335  if ($year > 0)
336  {
337  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
338  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
339  $sql.= " AND pv.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
340  }
341  if (preg_match('/^pv/',$sortfield)) $sql.= $db->order($sortfield,$sortorder);
342 
343  $result = $db->query($sql);
344  if ($result)
345  {
346  $num = $db->num_rows($result);
347  $i = 0;
348  $total = 0 ;
349  print '<table class="noborder" width="100%">';
350  print '<tr class="liste_titre">';
351  print_liste_field_titre("PeriodEndDate",$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder);
352  print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder);
353  print_liste_field_titre("ExpectedToPay",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
354  print_liste_field_titre("RefPayment",$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder);
355  print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"pv.datep","",$param,'align="center"',$sortfield,$sortorder);
356  print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder);
357  print "</tr>\n";
358  $var=1;
359  while ($i < $num)
360  {
361  $obj = $db->fetch_object($result);
362 
363  $total = $total + $obj->amount;
364 
365 
366  print '<tr class="oddeven">';
367  print '<td align="left">'.dol_print_date($db->jdate($obj->dm),'day').'</td>'."\n";
368 
369  print "<td>".$obj->label."</td>\n";
370 
371  print '<td align="right">'.price($obj->amount)."</td>";
372 
373  // Ref payment
374  $tva_static->id=$obj->rowid;
375  $tva_static->ref=$obj->rowid;
376  print '<td align="left">'.$tva_static->getNomUrl(1)."</td>\n";
377 
378  print '<td align="center">'.dol_print_date($db->jdate($obj->dp),'day')."</td>\n";
379  print '<td align="right">'.price($obj->amount)."</td>";
380  print "</tr>\n";
381 
382  $i++;
383  }
384  print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
385  print '<td align="right">'.price($total)."</td>";
386  print '<td align="center">&nbsp;</td>';
387  print '<td align="center">&nbsp;</td>';
388  print '<td align="right">'.price($total)."</td>";
389  print "</tr>";
390 
391  print "</table>";
392  $db->free($result);
393  }
394  else
395  {
396  dol_print_error($db);
397  }
398  }
399  $j++;
400 }
401 
402 
403 // Payment Salary
404 if (! empty($conf->salaries->enabled) && $user->rights->salaries->read)
405 {
406  if (! $mode || $mode != 'sconly')
407  {
408  $sal = new PaymentSalary($db);
409 
410  print "<br>";
411 
412  print_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
413 
414  $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, u.salary as current_salary";
415  $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u";
416  $sql.= " WHERE s.entity IN (".getEntity('user').")";
417  $sql.= " AND u.rowid = s.fk_user";
418  if ($year > 0)
419  {
420  $sql.= " AND (s.datesp between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
421  $sql.= " OR s.dateep between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."')";
422  }
423  if (preg_match('/^s\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder);
424 
425  $result = $db->query($sql);
426  if ($result)
427  {
428  $num = $db->num_rows($result);
429  $i = 0;
430  $total = 0 ;
431  print '<table class="noborder" width="100%">';
432  print '<tr class="liste_titre">';
433  print_liste_field_titre("PeriodEndDate",$_SERVER["PHP_SELF"],"s.dateep","",$param,'width="140px"',$sortfield,$sortorder);
434  print_liste_field_titre("Label",$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder);
435  print_liste_field_titre("ExpectedToPay",$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
436  print_liste_field_titre("RefPayment",$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder);
437  print_liste_field_titre("DatePayment",$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder);
438  print_liste_field_titre("PayedByThisPayment",$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder);
439  print "</tr>\n";
440  $var=1;
441  while ($i < $num)
442  {
443  $obj = $db->fetch_object($result);
444 
445  $total = $total + $obj->amount;
446 
447 
448  print '<tr class="oddeven">';
449 
450  print '<td align="left">'.dol_print_date($db->jdate($obj->dateep),'day').'</td>'."\n";
451 
452  print "<td>".$obj->label."</td>\n";
453 
454  print '<td align="right">'.($obj->salary?price($obj->salary):'')."</td>";
455 
456  // Ref payment
457  $sal_static->id=$obj->rowid;
458  $sal_static->ref=$obj->rowid;
459  print '<td align="left">'.$sal_static->getNomUrl(1)."</td>\n";
460 
461  print '<td align="center">'.dol_print_date($db->jdate($obj->datep),'day')."</td>\n";
462  print '<td align="right">'.price($obj->amount)."</td>";
463  print "</tr>\n";
464 
465  $i++;
466  }
467  print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
468  print '<td align="right"></td>'; // A total here has no sense
469  print '<td align="center">&nbsp;</td>';
470  print '<td align="center">&nbsp;</td>';
471  print '<td align="right">'.price($total)."</td>";
472  print "</tr>";
473 
474  print "</table>";
475  $db->free($result);
476 
477  print "<br>";
478  }
479  else
480  {
481  dol_print_error($db);
482  }
483  }
484 }
485 
486 print '</form>';
487 
488 
489 llxFooter();
490 
491 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
Class to manage salary payments.
img_previous($titlealt= 'default', $moreatt='')
Show previous logo.
img_next($titlealt= 'default', $moreatt='')
Show next logo.
Class to manage payments of social contributions.
dol_get_first_day($year, $month=1, $gm=false)
Return GMT time for first day of a month or year.
Definition: date.lib.php:445
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
Put here description of your class.
Definition: tva.class.php:33
GETPOST($paramname, $check='none', $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='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0)
Print a title with navigation controls for pagination.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
if($_POST["cancel"]==$langs->trans("Cancel")&&!$id) if($action== 'setdatev'&&$user->rights->tax->charges->creer) if($action== 'add'&&$_POST["cancel"]<> $langs->trans("Cancel")) if($action== 'delete') $title
Actions.
Definition: card.php:183
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
getEntity($element, $shared=1, $forceentity=null)
Get list of entity id to use.
print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id='')
Show a title with picto.
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...
dol_get_last_day($year, $month=12, $gm=false)
Return GMT time for last day of a month or year.
Definition: date.lib.php:459
print
Draft customers invoices.
Definition: index.php:91
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->societe->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if(!empty($conf->fournisseur->enabled)&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1013
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="")
Show title line of an array.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $objcanvas=null)
Check permissions of a user to show a page and an object.