dolibarr  7.0.0-beta
index.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
26 require '../../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
28 require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php';
29 
30 $langs->load("propal");
31 $langs->load("companies");
32 
33 // Security check
34 $socid=GETPOST('socid','int');
35 if (isset($user->societe_id) && $user->societe_id > 0)
36 {
37  $action = '';
38  $socid = $user->societe_id;
39 }
40 $result = restrictedArea($user, 'propal');
41 
42 
43 /*
44  * View
45  */
46 $now=dol_now();
47 $propalstatic=new Propal($db);
48 $companystatic=new Societe($db);
49 $form = new Form($db);
50 $formfile = new FormFile($db);
51 $help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES:Módulo_Presupuestos";
52 
53 llxHeader("",$langs->trans("ProspectionArea"),$help_url);
54 
55 print load_fiche_titre($langs->trans("ProspectionArea"));
56 
57 //print '<table width="100%" class="notopnoleftnoright">';
58 //print '<tr><td valign="top" width="30%" class="notopnoleft">';
59 print '<div class="fichecenter"><div class="fichethirdleft">';
60 
61 
62 if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
63 {
64  print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal/list.php">';
65  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
66  print '<table class="noborder nohover" width="100%">';
67  print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
68  print '<tr class="oddeven"><td>';
69  print $langs->trans("Proposal").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
70  print "</table></form><br>\n";
71 }
72 
73 
74 /*
75  * Statistics
76  */
77 
78 $sql = "SELECT count(p.rowid), p.fk_statut";
79 $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
80 $sql.= ", ".MAIN_DB_PREFIX."propal as p";
81 if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
82 $sql.= " WHERE p.fk_soc = s.rowid";
83 $sql.= " AND p.entity IN (".getEntity('propal').")";
84 if ($user->societe_id) $sql.=' AND p.fk_soc = '.$user->societe_id;
85 if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
86 $sql.= " AND p.fk_statut IN (0,1,2,3,4)";
87 $sql.= " GROUP BY p.fk_statut";
88 $resql = $db->query($sql);
89 if ($resql)
90 {
91  $num = $db->num_rows($resql);
92  $i = 0;
93 
94  $total=0;
95  $totalinprocess=0;
96  $dataseries=array();
97  $vals=array();
98  // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not)
99  while ($i < $num)
100  {
101  $row = $db->fetch_row($resql);
102  if ($row)
103  {
104  //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1))
105  {
106  $vals[$row[1]]=$row[0];
107  $totalinprocess+=$row[0];
108  }
109  $total+=$row[0];
110  }
111  $i++;
112  }
113  $db->free($resql);
114 
115  print '<table class="noborder nohover" width="100%">';
116  print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Proposals").'</td></tr>'."\n";
117  $listofstatus=array(0,1,2,3,4);
118  foreach ($listofstatus as $status)
119  {
120  $dataseries[]=array($propalstatic->LibStatut($status,1), (isset($vals[$status])?(int) $vals[$status]:0));
121  if (! $conf->use_javascript_ajax)
122  {
123 
124  print '<tr class="oddeven">';
125  print '<td>'.$propalstatic->LibStatut($status,0).'</td>';
126  print '<td align="right"><a href="list.php?statut='.$status.'">'.(isset($vals[$status])?$vals[$status]:0).'</a></td>';
127  print "</tr>\n";
128  }
129  }
130  if ($conf->use_javascript_ajax)
131  {
132  print '<tr><td align="center" colspan="2">';
133 
134  include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
135  $dolgraph = new DolGraph();
136  $dolgraph->SetData($dataseries);
137  $dolgraph->setShowLegend(1);
138  $dolgraph->setShowPercent(1);
139  $dolgraph->SetType(array('pie'));
140  $dolgraph->setWidth('100%');
141  $dolgraph->draw('idgraphthirdparties');
142  print $dolgraph->show($total?0:1);
143 
144  print '</td></tr>';
145  }
146  //if ($totalinprocess != $total)
147  //print '<tr class="liste_total"><td>'.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')</td><td align="right">'.$totalinprocess.'</td></tr>';
148  print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td align="right">'.$total.'</td></tr>';
149  print "</table><br>";
150 }
151 else
152 {
153  dol_print_error($db);
154 }
155 
156 
157 /*
158  * Draft proposals
159  */
160 if (! empty($conf->propal->enabled))
161 {
162  $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
163  $sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
164  $sql.= ", ".MAIN_DB_PREFIX."societe as s";
165  if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
166  $sql.= " WHERE c.fk_soc = s.rowid";
167  $sql.= " AND c.entity IN (".getEntity('propal').")";
168  $sql.= " AND c.fk_statut = 0";
169  if ($socid) $sql.= " AND c.fk_soc = ".$socid;
170  if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
171 
172  $resql=$db->query($sql);
173  if ($resql)
174  {
175  print '<table class="noborder" width="100%">';
176  print '<tr class="liste_titre">';
177  print '<td colspan="2">'.$langs->trans("DraftPropals").'</td></tr>';
178  $langs->load("propal");
179  $num = $db->num_rows($resql);
180  if ($num)
181  {
182  $i = 0;
183  while ($i < $num)
184  {
185  $obj = $db->fetch_object($resql);
186  print '<tr class="oddeven">';
187 
188  $propalstatic->id=$obj->rowid;
189  $propalstatic->ref=$obj->ref;
190  print '<td class="nowrap">'.$propalstatic->getNomUrl(1).'</td>';
191 
192  $companystatic->id=$obj->socid;
193  $companystatic->name=$obj->socname;
194  $companystatic->client=$obj->client;
195  $companystatic->canvas=$obj->canvas;
196  print '<td>'.$companystatic->getNomUrl(1,'customer',24).'</td>';
197 
198  print '</tr>';
199  $i++;
200  }
201  }
202  print "</table><br>";
203  }
204 }
205 
206 
207 //print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
208 print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
209 
210 
211 $max=5;
212 
213 /*
214  * Last modified proposals
215  */
216 
217 $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,";
218 $sql.= " date_cloture as datec";
219 $sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
220 $sql.= ", ".MAIN_DB_PREFIX."societe as s";
221 if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
222 $sql.= " WHERE c.fk_soc = s.rowid";
223 $sql.= " AND c.entity IN (".getEntity('propal').")";
224 //$sql.= " AND c.fk_statut > 2";
225 if ($socid) $sql .= " AND c.fk_soc = ".$socid;
226 if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
227 $sql.= " ORDER BY c.tms DESC";
228 $sql.= $db->plimit($max, 0);
229 
230 $resql=$db->query($sql);
231 if ($resql)
232 {
233  print '<table class="noborder" width="100%">';
234  print '<tr class="liste_titre">';
235  print '<td colspan="4">'.$langs->trans("LastModifiedProposals",$max).'</td></tr>';
236 
237  $num = $db->num_rows($resql);
238  if ($num)
239  {
240  $i = 0;
241  while ($i < $num)
242  {
243  $obj = $db->fetch_object($resql);
244 
245  print '<tr class="oddeven">';
246  print '<td width="20%" class="nowrap">';
247 
248  $propalstatic->id=$obj->rowid;
249  $propalstatic->ref=$obj->ref;
250 
251  print '<table class="nobordernopadding"><tr class="nocellnopadd">';
252  print '<td width="96" class="nobordernopadding nowrap">';
253  print $propalstatic->getNomUrl(1);
254  print '</td>';
255 
256  print '<td width="16" class="nobordernopadding nowrap">';
257  print '&nbsp;';
258  print '</td>';
259 
260  print '<td width="16" align="right" class="nobordernopadding">';
261  $filename=dol_sanitizeFileName($obj->ref);
262  $filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
263  $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
264  print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
265  print '</td></tr></table>';
266 
267  print '</td>';
268 
269  $companystatic->id=$obj->socid;
270  $companystatic->name=$obj->socname;
271  $companystatic->client=$obj->client;
272  $companystatic->canvas=$obj->canvas;
273  print '<td>'.$companystatic->getNomUrl(1,'customer').'</td>';
274 
275  print '<td>'.dol_print_date($db->jdate($obj->datec),'day').'</td>';
276  print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,5).'</td>';
277  print '</tr>';
278  $i++;
279  }
280  }
281  print "</table><br>";
282 }
283 else dol_print_error($db);
284 
285 
286 /*
287  * Opened proposals
288  */
289 if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
290 {
291  $langs->load("propal");
292 
293  $now=dol_now();
294 
295  $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv";
296  $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
297  $sql.= ", ".MAIN_DB_PREFIX."propal as p";
298  if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
299  $sql.= " WHERE p.fk_soc = s.rowid";
300  $sql.= " AND p.entity IN (".getEntity('propal').")";
301  $sql.= " AND p.fk_statut = 1";
302  if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
303  if ($socid) $sql.= " AND s.rowid = ".$socid;
304  $sql.= " ORDER BY p.rowid DESC";
305 
306  $result=$db->query($sql);
307  if ($result)
308  {
309  $total = 0;
310  $num = $db->num_rows($result);
311  $i = 0;
312  if ($num > 0)
313  {
314  print '<table class="noborder" width="100%">';
315  print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
316 
317  $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
318  while ($i < $nbofloop)
319  {
320  $obj = $db->fetch_object($result);
321 
322  print '<tr class="oddeven">';
323 
324  // Ref
325  print '<td class="nowrap" width="140">';
326 
327  $propalstatic->id=$obj->propalid;
328  $propalstatic->ref=$obj->ref;
329 
330  print '<table class="nobordernopadding"><tr class="nocellnopadd">';
331  print '<td class="nobordernopadding nowrap">';
332  print $propalstatic->getNomUrl(1);
333  print '</td>';
334  print '<td width="18" class="nobordernopadding nowrap">';
335  if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
336  print '</td>';
337  print '<td width="16" align="center" class="nobordernopadding">';
338  $filename=dol_sanitizeFileName($obj->ref);
339  $filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
340  $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
341  print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
342  print '</td></tr></table>';
343 
344  print "</td>";
345 
346  $companystatic->id=$obj->socid;
347  $companystatic->name=$obj->socname;
348  $companystatic->client=$obj->client;
349  $companystatic->canvas=$obj->canvas;
350  print '<td align="left">'.$companystatic->getNomUrl(1,'customer',44).'</td>'."\n";
351 
352  print '<td align="right">';
353  print dol_print_date($db->jdate($obj->dp),'day').'</td>'."\n";
354  print '<td align="right">'.price($obj->total_ttc).'</td>';
355  print '<td align="center" width="14">'.$propalstatic->LibStatut($obj->fk_statut,3).'</td>'."\n";
356  print '</tr>'."\n";
357  $i++;
358  $total += $obj->total_ttc;
359  }
360  if ($num > $nbofloop)
361  {
362  print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
363  }
364  else if ($total>0)
365  {
366  print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td>&nbsp;</td></tr>";
367  }
368  print "</table><br>";
369  }
370  }
371  else
372  {
373  dol_print_error($db);
374  }
375 }
376 
377 /*
378  * Proposals to process
379  */
380 /*
381 if (! empty($conf->propal->enabled))
382 {
383  $sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid";
384  $sql.=" FROM ".MAIN_DB_PREFIX."propal as c";
385  $sql.= ", ".MAIN_DB_PREFIX."societe as s";
386  if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
387  $sql.= " WHERE c.fk_soc = s.rowid";
388  $sql.= " AND c.entity = ".$conf->entity;
389  $sql.= " AND c.fk_statut = 1";
390  if ($socid) $sql.= " AND c.fk_soc = ".$socid;
391  if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
392  $sql.= " ORDER BY c.rowid DESC";
393 
394  $resql=$db->query($sql);
395  if ($resql)
396  {
397  $num = $db->num_rows($resql);
398 
399  print '<table class="noborder" width="100%">';
400  print '<tr class="liste_titre">';
401  print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
402 
403  if ($num)
404  {
405  $i = 0;
406  while ($i < $num)
407  {
408 
409  $obj = $db->fetch_object($resql);
410  print '<tr class="oddeven">';
411  print '<td class="nowrap">';
412 
413  $propalstatic->id=$obj->rowid;
414  $propalstatic->ref=$obj->ref;
415 
416  print '<table class="nobordernopadding"><tr class="nocellnopadd">';
417  print '<td width="96" class="nobordernopadding nowrap">';
418  print $propalstatic->getNomUrl(1);
419  print '</td>';
420 
421  print '<td width="16" class="nobordernopadding nowrap">';
422  print '&nbsp;';
423  print '</td>';
424 
425  print '<td width="16" align="right" class="nobordernopadding">';
426  $filename=dol_sanitizeFileName($obj->ref);
427  $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
428  $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
429  print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
430  print '</td></tr></table>';
431 
432  print '</td>';
433 
434  print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'</a></td>';
435 
436  print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
437 
438  print '</tr>';
439  $i++;
440  }
441  }
442 
443  print "</table><br>";
444  }
445  else dol_print_error($db);
446 }
447 */
448 
449 /*
450  * Proposal that are in a shipping process
451  */
452 /*if (! empty($conf->propal->enabled))
453 {
454  $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid";
455  $sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
456  $sql.= ", ".MAIN_DB_PREFIX."societe as s";
457  if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
458  $sql.= " WHERE c.fk_soc = s.rowid";
459  $sql.= " AND c.entity = ".$conf->entity;
460  $sql.= " AND c.fk_statut = 2 ";
461  if ($socid) $sql.= " AND c.fk_soc = ".$socid;
462  if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
463  $sql.= " ORDER BY c.rowid DESC";
464 
465  $resql=$db->query($sql);
466  if ($resql)
467  {
468  $num = $db->num_rows($resql);
469 
470  print '<table class="noborder" width="100%">';
471  print '<tr class="liste_titre">';
472  print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></td></tr>';
473 
474  if ($num)
475  {
476  $i = 0;
477  while ($i < $num)
478  {
479 
480  $obj = $db->fetch_object($resql);
481  print '<tr class="oddeven">';
482  print '<td width="20%" class="nowrap">';
483 
484  $propalstatic->id=$obj->rowid;
485  $propalstatic->ref=$obj->ref;
486 
487  print '<table class="nobordernopadding"><tr class="nocellnopadd">';
488  print '<td width="96" class="nobordernopadding nowrap">';
489  print $propalstatic->getNomUrl(1);
490  print '</td>';
491 
492  print '<td width="16" class="nobordernopadding nowrap">';
493  print '&nbsp;';
494  print '</td>';
495 
496  print '<td width="16" align="right" class="nobordernopadding">';
497  $filename=dol_sanitizeFileName($obj->ref);
498  $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
499  $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
500  print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
501  print '</td></tr></table>';
502 
503  print '</td>';
504 
505  print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
506 
507  print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
508 
509  print '</tr>';
510  $i++;
511  }
512  }
513  print "</table><br>";
514  }
515  else dol_print_error($db);
516 }
517 */
518 
519 //print '</td></tr></table>';
520 print '</div></div></div>';
521 
522 
523 llxFooter();
524 
525 $db->close();
llxFooter()
Footer empty.
Definition: index.php:43
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
if(empty($reshook)) $form
View.
Definition: perms.php:103
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage generation of HTML components Only common components must be here.
Class to manage third parties objects (customers, suppliers, prospects...)
img_warning($titlealt= 'default', $moreatt= '')
Show warning logo.
llxHeader()
Header empty.
Definition: index.php:37
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_now($mode='gmt')
Return date for now.
Class to offer components to list and upload files.
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_print_date($time, $format='', $tzoutput='tzserver', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
print
Draft customers invoices.
Definition: index.php:91
Class to build graphs.
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
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.
Class to manage proposals.