dolibarr  13.0.2
list.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2016 Frédéric France <frederic.france@free.fr>
6  * Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
7  * Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
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 <https://www.gnu.org/licenses/>.
21  */
22 
29 require '../../main.inc.php';
30 
31 // Security check
32 $socid = isset($_GET["socid"]) ? $_GET["socid"] : '';
33 if ($user->socid) $socid = $user->socid;
34 $result = restrictedArea($user, 'tax', '', '', 'charges');
35 
36 require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
37 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
38 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
39 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
40 if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
41 
42 // Load translation files required by the page
43 $langs->loadLangs(array('compta', 'banks', 'bills'));
44 
45 $action = GETPOST('action', 'aZ09');
46 $massaction = GETPOST('massaction', 'alpha');
47 $confirm = GETPOST('confirm', 'alpha');
48 $optioncss = GETPOST('optioncss', 'alpha');
49 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'sclist';
50 
51 $search_ref = GETPOST('search_ref', 'int');
52 $search_label = GETPOST('search_label', 'alpha');
53 $search_amount = GETPOST('search_amount', 'alpha');
54 $search_status = GETPOST('search_status', 'int');
55 $search_day_lim = GETPOST('search_day_lim', 'int');
56 $search_month_lim = GETPOST('search_month_lim', 'int');
57 $search_year_lim = GETPOST('search_year_lim', 'int');
58 $search_project_ref = GETPOST('search_project_ref', 'alpha');
59 $search_project = GETPOST('search_project', 'alpha');
60 
61 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
62 $sortfield = GETPOST("sortfield", 'alpha');
63 $sortorder = GETPOST("sortorder", 'alpha');
64 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
65 
66 if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1
67 $offset = $limit * $page;
68 $pageprev = $page - 1;
69 $pagenext = $page + 1;
70 
71 if (!$sortfield) $sortfield = "cs.date_ech";
72 if (!$sortorder) $sortorder = "DESC";
73 
74 $year = GETPOST("year", 'int');
75 $filtre = GETPOST("filtre", 'int');
76 
77 if (!GETPOSTISSET('search_typeid'))
78 {
79  $newfiltre = str_replace('filtre=', '', $filtre);
80  $filterarray = explode('-', $newfiltre);
81  foreach ($filterarray as $val)
82  {
83  $part = explode(':', $val);
84  if ($part[0] == 'cs.fk_type') $search_typeid = $part[1];
85  }
86 } else {
87  $search_typeid = GETPOST('search_typeid', 'int');
88 }
89 
90 $arrayfields = array(
91  'cs.rowid' =>array('label'=>"Ref", 'checked'=>1, 'position'=>10),
92  'cs.libelle' =>array('label'=>"Label", 'checked'=>1, 'position'=>20),
93  'cs.fk_type' =>array('label'=>"Type", 'checked'=>1, 'position'=>30),
94  'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>40, 'enable'=>(!empty($conf->projet->enabled))),
95  'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>50),
96  'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>60),
97  'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70),
98  'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>80),
99 );
100 $arrayfields = dol_sort_array($arrayfields, 'position');
101 
102 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
103 $hookmanager->initHooks(array('sclist'));
104 $object = new ChargeSociales($db);
105 
106 /*
107  * Actions
108  */
109 
110 $parameters = array('socid'=>$socid);
111 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
112 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
113 
114 
115 if (empty($reshook)) {
116  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
117 
118  // All tests are required to be compatible with all browsers
119  if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
120  $search_ref = '';
121  $search_label = '';
122  $search_amount = '';
123  $search_status = '';
124  $search_typeid = '';
125  $year = '';
126  $search_day_lim = '';
127  $search_year_lim = '';
128  $search_month_lim = '';
129  $search_project_ref = '';
130  $search_project = '';
131  $search_array_options = array();
132  }
133 }
134 
135 /*
136  * View
137  */
138 
139 $form = new Form($db);
140 $formother = new FormOther($db);
141 $formsocialcontrib = new FormSocialContrib($db);
142 $chargesociale_static = new ChargeSociales($db);
143 if (!empty($conf->projet->enabled)) $projectstatic = new Project($db);
144 
145 llxHeader('', $langs->trans("SocialContributions"));
146 
147 $sql = "SELECT cs.rowid, cs.fk_type as type, ";
148 $sql .= " cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode,";
149 if (!empty($conf->projet->enabled)) $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
150 $sql .= " c.libelle as type_label,";
151 $sql .= " SUM(pc.amount) as alreadypayed";
152 $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
153 $sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
154 if (!empty($conf->projet->enabled)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cs.fk_projet";
155 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
156 $sql .= " WHERE cs.fk_type = c.id";
157 $sql .= " AND cs.entity = ".$conf->entity;
158 // Search criteria
159 if ($search_ref) $sql .= " AND cs.rowid=".$db->escape($search_ref);
160 if ($search_label) $sql .= natural_search("cs.libelle", $search_label);
161 if (!empty($conf->projet->enabled)) if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_ref);
162 if ($search_amount) $sql .= natural_search("cs.amount", $search_amount, 1);
163 if ($search_status != '' && $search_status >= 0) $sql .= " AND cs.paye = ".$db->escape($search_status);
164 $sql .= dolSqlDateFilter("cs.periode", $search_day_lim, $search_month_lim, $search_year_lim);
165 //$sql.= dolSqlDateFilter("cs.periode", 0, 0, $year);
166 if ($year > 0)
167 {
168  $sql .= " AND (";
169  // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
170  // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
171  $sql .= " (cs.periode IS NOT NULL AND date_format(cs.periode, '%Y') = '".$db->escape($year)."') ";
172  $sql .= "OR (cs.periode IS NULL AND date_format(cs.date_ech, '%Y') = '".$db->escape($year)."')";
173  $sql .= ")";
174 }
175 if ($filtre) {
176  $filtre = str_replace(":", "=", $filtre);
177  $sql .= " AND ".$filtre;
178 }
179 if ($search_typeid) {
180  $sql .= " AND cs.fk_type=".$db->escape($search_typeid);
181 }
182 $sql .= " GROUP BY cs.rowid, cs.fk_type, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle";
183 if (!empty($conf->projet->enabled)) $sql .= ", p.rowid, p.ref, p.title";
184 $sql .= $db->order($sortfield, $sortorder);
185 
186 $totalnboflines = 0;
187 $result = $db->query($sql);
188 if ($result)
189 {
190  $totalnboflines = $db->num_rows($result);
191 }
192 $sql .= $db->plimit($limit + 1, $offset);
193 
194 $resql = $db->query($sql);
195 if (!$resql)
196 {
197  dol_print_error($db);
198  llxFooter();
199  $db->close();
200  exit;
201 }
202 
203 $num = $db->num_rows($resql);
204 $i = 0;
205 
206 $param = '';
207 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
208 if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
209 if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
210 if ($search_label) $param .= '&search_label='.urlencode($search_label);
211 if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref);
212 if ($search_amount) $param .= '&search_amount='.urlencode($search_amount);
213 if ($search_typeid) $param .= '&search_typeid='.urlencode($search_typeid);
214 if ($search_status != '' && $search_status != '-1') $param .= '&search_status='.urlencode($search_status);
215 if ($year) $param .= '&year='.urlencode($year);
216 
217 $newcardbutton = '';
218 if ($user->rights->tax->charges->creer)
219 {
220  $newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewSocialContribution'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/sociales/card.php?action=create');
221 }
222 
223 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
224 if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
225 print '<input type="hidden" name="token" value="'.newToken().'">';
226 print '<input type="hidden" name="action" value="list">';
227 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
228 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
229 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
230 print '<input type="hidden" name="search_status" value="'.$search_status.'">';
231 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
232 
233 $center = '';
234 if ($year)
235 {
236  $center = '<a href="list.php?year='.($year - 1).'">'.img_previous().'</a>';
237  $center .= ' '.$langs->trans("Year").' '.$year;
238  $center .= ' <a href="list.php?year='.($year + 1).'">'.img_next().'</a>';
239 }
240 
241 print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
242 
243 if (empty($mysoc->country_id) && empty($mysoc->country_code))
244 {
245  print '<div class="error">';
246  $langs->load("errors");
247  $countrynotdefined = $langs->trans("ErrorSetACountryFirst");
248  print $countrynotdefined;
249  print '</div>';
250 
251  print '</form>';
252  llxFooter();
253  $db->close();
254 }
255 
256 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
257 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
258 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
259 
260 print '<div class="div-table-responsive">';
261 print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : '').'">'."\n";
262 
263 print '<tr class="liste_titre_filter">';
264 
265 // Filters: Line number (placeholder)
266 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
267  print '<td class="liste_titre">';
268  print '</td>';
269 }
270 
271 // Filter: Ref
272 if (!empty($arrayfields['cs.rowid']['checked'])) {
273  print '<td class="liste_titre" align="left">';
274  print '<input class="flat maxwidth75" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
275  print '</td>';
276 }
277 
278 // Filter: Label
279 if (!empty($arrayfields['cs.rowid']['checked'])) {
280  print '<td class="liste_titre">';
281  print '<input type="text" class="flat maxwidth100" name="search_label" value="'.dol_escape_htmltag($search_label).'">';
282  print '</td>';
283 }
284 
285 // Filter: Type
286 if (!empty($arrayfields['cs.fk_type']['checked'])) {
287  print '<td class="liste_titre" align="left">';
288  $formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth100onsmartphone', 1);
289  print '</td>';
290 }
291 
292 // Filter: Project ref
293 if (!empty($arrayfields['p.ref']['checked'])) {
294  print '<td class="liste_titre">';
295  print '<input type="text" class="flat" size="6" name="search_project_ref" value="'.$search_project_ref.'">';
296  print '</td>';
297 }
298 
299 // Filter: Date (placeholder)
300 if (!empty($arrayfields['cs.date_ech']['checked'])) {
301  print '<td class="liste_titre">';
302  print '</td>';
303 }
304 
305 // Filter: Period end date
306 if (!empty($arrayfields['cs.periode']['checked'])) {
307  print '<td class="liste_titre center">';
308  if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day_lim" value="'.dol_escape_htmltag($search_day_lim).'">';
309  print '<input class="flat valignmiddle width25" type="text" size="1" maxlength="2" name="search_month_lim" value="'.dol_escape_htmltag($search_month_lim).'">';
310  $formother->select_year($search_year_lim ? $search_year_lim : -1, 'search_year_lim', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle');
311  print '</td>';
312 }
313 
314 // Filter: Amount
315 if (!empty($arrayfields['cs.amount']['checked'])) {
316  print '<td class="liste_titre right">';
317  print '<input class="flat maxwidth75" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
318  print '</td>';
319 }
320 
321 // Filter: Status
322 if (!empty($arrayfields['cs.paye']['checked'])) {
323  print '<td class="liste_titre maxwidthonsmartphone right">';
324  $liststatus = array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
325  print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100', 1);
326  print '</td>';
327 }
328 
329 // Fields from hook
330 $parameters = array('arrayfields'=>$arrayfields);
331 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
332 print $hookmanager->resPrint;
333 
334 // Filter: Buttons
335 print '<td class="liste_titre maxwidthsearch">';
336 print $form->showFilterAndCheckAddButtons(0);
337 print '</td>';
338 
339 print '</tr>';
340 
341 print '<tr class="liste_titre">';
342 if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
343 if (!empty($arrayfields['cs.rowid']['checked'])) print_liste_field_titre($arrayfields['cs.rowid']['label'], $_SERVER["PHP_SELF"], "cs.rowid", '', $param, '', $sortfield, $sortorder);
344 if (!empty($arrayfields['cs.libelle']['checked'])) print_liste_field_titre($arrayfields['cs.libelle']['label'], $_SERVER["PHP_SELF"], "cs.libelle", '', $param, 'class="left"', $sortfield, $sortorder);
345 if (!empty($arrayfields['cs.fk_type']['checked'])) print_liste_field_titre($arrayfields['cs.fk_type']['label'], $_SERVER["PHP_SELF"], "cs.fk_type", '', $param, 'class="left"', $sortfield, $sortorder);
346 if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
347 if (!empty($arrayfields['cs.date_ech']['checked'])) print_liste_field_titre($arrayfields['cs.date_ech']['label'], $_SERVER["PHP_SELF"], "cs.date_ech", '', $param, 'align="center"', $sortfield, $sortorder);
348 if (!empty($arrayfields['cs.periode']['checked'])) print_liste_field_titre($arrayfields['cs.periode']['label'], $_SERVER["PHP_SELF"], "cs.periode", '', $param, 'align="center"', $sortfield, $sortorder);
349 if (!empty($arrayfields['cs.amount']['checked'])) print_liste_field_titre($arrayfields['cs.amount']['label'], $_SERVER["PHP_SELF"], "cs.amount", '', $param, 'class="right"', $sortfield, $sortorder);
350 if (!empty($arrayfields['cs.paye']['checked'])) print_liste_field_titre($arrayfields['cs.paye']['label'], $_SERVER["PHP_SELF"], "cs.paye", '', $param, 'class="right"', $sortfield, $sortorder);
351 
352 // Hook fields
353 $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
354 $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
355 print $hookmanager->resPrint;
356 
357 print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
358 print '</tr>';
359 
360 $i = 0;
361 $totalarray = array();
362 while ($i < min($num, $limit))
363 {
364  $obj = $db->fetch_object($resql);
365 
366  $chargesociale_static->id = $obj->rowid;
367  $chargesociale_static->ref = $obj->rowid;
368  $chargesociale_static->label = $obj->libelle;
369  $chargesociale_static->type_label = $obj->type_label;
370  if (!empty($conf->projet->enabled)) {
371  $projectstatic->id = $obj->project_id;
372  $projectstatic->ref = $obj->project_ref;
373  $projectstatic->title = $obj->project_label;
374  }
375 
376  print '<tr class="oddeven">';
377 
378  // Line number
379  if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
380  print '<td>'.(($offset * $limit) + $i).'</td>';
381  if (!$i) $totalarray['nbfield']++;
382  }
383 
384  // Ref
385  if (!empty($arrayfields['cs.rowid']['checked'])) {
386  print '<td>'.$chargesociale_static->getNomUrl(1, '20').'</td>';
387  if (!$i) $totalarray['nbfield']++;
388  }
389 
390  // Label
391  if (!empty($arrayfields['cs.libelle']['checked'])) {
392  print '<td>'.dol_trunc($obj->libelle, 42).'</td>';
393  if (!$i) $totalarray['nbfield']++;
394  }
395 
396  // Type
397  if (!empty($arrayfields['cs.fk_type']['checked'])) {
398  print '<td>'.$obj->type_label.'</td>';
399  if (!$i) $totalarray['nbfield']++;
400  }
401 
402  // Project ref
403  if (!empty($arrayfields['p.ref']['checked'])) {
404  print '<td class="nowrap">';
405  if ($obj->project_id > 0) {
406  print $projectstatic->getNomUrl(1);
407  }
408  print '</td>';
409  if (!$i) $totalarray['nbfield']++;
410  }
411 
412  // Date
413  if (!empty($arrayfields['cs.date_ech']['checked'])) {
414  print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
415  if (!$i) $totalarray['nbfield']++;
416  }
417 
418  // Date end period
419  if (!empty($arrayfields['cs.periode']['checked'])) {
420  print '<td class="center">';
421  if ($obj->periode) {
422  print '<a href="list.php?year='.strftime("%Y", $db->jdate($obj->periode)).'">';
423  print dol_print_date($db->jdate($obj->periode), 'day');
424  print '</a>';
425  }
426  print '</td>';
427  if (!$i) $totalarray['nbfield']++;
428  }
429 
430  // Amount
431  if (!empty($arrayfields['cs.amount']['checked'])) {
432  print '<td class="nowrap right">'.price($obj->amount).'</td>';
433  if (!$i) $totalarray['nbfield']++;
434  if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
435  $totalarray['val']['totalttcfield'] += $obj->amount;
436  }
437 
438  // Status
439  if (!empty($arrayfields['cs.paye']['checked'])) {
440  print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
441  if (!$i) $totalarray['nbfield']++;
442  }
443 
444  // Buttons
445  print '<td></td>';
446  if (!$i) $totalarray['nbfield']++;
447 
448  print '</tr>';
449  $i++;
450 }
451 
452 // Show total line
453 include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
454 
455 print '</table>';
456 print '</div>';
457 print '</form>';
458 
459 // End of page
460 llxFooter();
461 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dolGetButtonTitle($label, $helpText= '', $iconClass= 'fa fa-file', $url= '', $id= '', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
llxHeader()
Empty header.
Definition: wrapper.php:45
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
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.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
Class to manage projects.
Class to manage generation of HTML components for social contributions management.
Classe permettant la generation de composants html autre Only common components are here...
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $excludefirstand=0)
Generate a SQL string to make a filter into a range (for second of date until last second of date) ...
Definition: date.lib.php:281
print $_SERVER["PHP_SELF"]
Edit parameters.
img_next($titlealt= 'default', $moreatt= '')
Show next logo.
dol_sort_array(&$array, $index, $order= 'asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
print
Draft customers invoices.
Definition: index.php:89
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_previous($titlealt= 'default', $moreatt= '')
Show previous logo.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->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)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
llxFooter()
Empty footer.
Definition: wrapper.php:59
Classe permettant la gestion des paiements des charges La tva collectee n&#39;est calculee que sur les fa...
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.