28 require
"../main.inc.php";
29 require_once DOL_DOCUMENT_ROOT.
"/contrat/class/contrat.class.php";
30 require_once DOL_DOCUMENT_ROOT.
"/product/class/product.class.php";
35 $hookmanager->initHooks(array(
'contractindex'));
38 $langs->loadLangs(array(
'products',
'companies',
'contracts'));
40 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
41 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
49 if (!empty($user->socid)) $socid = $user->socid;
52 $staticcompany =
new Societe($db);
53 $staticcontrat =
new Contrat($db);
55 $productstatic =
new Product($db);
78 print '<div class="fichecenter"><div class="fichethirdleft">';
81 if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS))
84 if (!empty($conf->contrat->enabled))
86 print
'<form method="post" action="'.DOL_URL_ROOT.
'/contrat/list.php">';
87 print
'<input type="hidden" name="token" value="'.newToken().
'">';
89 print
'<div class="div-table-responsive-no-min">';
90 print
'<table class="noborder nohover centpercent">';
91 print
'<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Search").
'</td></tr>';
92 print
'<tr class="oddeven">';
93 print
'<td class="nowrap">'.$langs->trans(
"Contract").
':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
94 print
'<td><input type="submit" value="'.$langs->trans(
"Search").
'" class="button"></td></tr>';
95 print
"</table></div></form>\n";
108 $dataseries = array();
112 $sql =
"SELECT count(cd.rowid) as nb, cd.statut as status";
113 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
114 $sql .=
", ".MAIN_DB_PREFIX.
"contratdet as cd, ".MAIN_DB_PREFIX.
"contrat as c";
115 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
116 $sql .=
" WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
117 $sql .=
" AND (cd.statut != 4 OR (cd.statut = 4 AND (cd.date_fin_validite is null or cd.date_fin_validite >= '".$db->idate($now).
"')))";
118 $sql .=
" AND c.entity IN (".getEntity(
'contract', 0).
")";
119 if ($user->socid) $sql .=
' AND c.fk_soc = '.$user->socid;
120 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
121 $sql .=
" GROUP BY cd.statut";
122 $resql = $db->query($sql);
125 $num = $db->num_rows(
$resql);
129 $obj = $db->fetch_object(
$resql);
132 $nb[$obj->status] = $obj->nb;
133 if ($obj->status != 5)
135 $vals[$obj->status] = $obj->nb;
136 $totalinprocess += $obj->nb;
147 $sql =
"SELECT count(cd.rowid) as nb, cd.statut as status";
148 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s";
149 $sql .=
", ".MAIN_DB_PREFIX.
"contratdet as cd, ".MAIN_DB_PREFIX.
"contrat as c";
150 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
151 $sql .=
" WHERE cd.fk_contrat = c.rowid AND c.fk_soc = s.rowid";
152 $sql .=
" AND (cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now).
"')";
153 $sql .=
" AND c.entity IN (".getEntity(
'contract', 0).
")";
154 if ($user->socid) $sql .=
' AND c.fk_soc = '.$user->socid;
155 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
156 $sql .=
" GROUP BY cd.statut";
157 $resql = $db->query($sql);
160 $num = $db->num_rows(
$resql);
166 $obj = $db->fetch_object(
$resql);
169 $nb[$obj->status.true] = $obj->nb;
170 if ($obj->status != 5)
172 $vals[$obj->status.true] = $obj->nb;
173 $totalinprocess += $obj->nb;
184 $colorseries = array();
186 include_once DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
188 print
'<div class="div-table-responsive-no-min">';
189 print
'<table class="noborder nohover centpercent">';
190 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"Statistics").
' - '.$langs->trans(
"Services").
'</th></tr>'.
"\n";
191 $listofstatus = array(0, 4, 4, 5); $bool =
false;
192 foreach ($listofstatus as $status)
194 $dataseries[] = array($staticcontratligne->LibStatut($status, 1, ($bool ? 1 : 0)), (isset($nb[$status.$bool]) ? (int) $nb[$status.$bool] : 0));
195 if ($status == ContratLigne::STATUS_INITIAL) $colorseries[$status.$bool] =
'-'.$badgeStatus0;
196 if ($status == ContratLigne::STATUS_OPEN && !$bool) $colorseries[$status.$bool] = $badgeStatus4;
197 if ($status == ContratLigne::STATUS_OPEN && $bool) $colorseries[$status.$bool] = $badgeStatus1;
198 if ($status == ContratLigne::STATUS_CLOSED) $colorseries[$status.$bool] = $badgeStatus6;
200 if (empty($conf->use_javascript_ajax))
202 print
'<tr class="oddeven">';
203 print
'<td>'.$staticcontratligne->LibStatut($status, 0, ($bool ? 1 : 0)).
'</td>';
204 print
'<td class="right"><a href="services_list.php?mode='.$status.($bool ?
'&filter=expired' :
'').
'">'.($nb[$status.$bool] ? $nb[$status.$bool] : 0).
' '.$staticcontratligne->LibStatut($status, 3, ($bool ? 1 : 0)).
'</a></td>';
207 if ($status == 4 && !$bool) $bool =
true;
210 if (!empty($conf->use_javascript_ajax))
212 print
'<tr class="impair"><td class="center" colspan="2">';
214 include_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
216 $dolgraph->SetData($dataseries);
217 $dolgraph->SetDataColor(array_values($colorseries));
218 $dolgraph->setShowLegend(2);
219 $dolgraph->setShowPercent(1);
220 $dolgraph->SetType(array(
'pie'));
221 $dolgraph->setHeight(
'200');
222 $dolgraph->draw(
'idgraphstatus');
223 print $dolgraph->show($total ? 0 : 1);
227 $listofstatus = array(0, 4, 4, 5); $bool =
false;
228 foreach ($listofstatus as $status)
230 if (empty($conf->use_javascript_ajax))
232 print
'<tr class="oddeven">';
233 print
'<td>'.$staticcontratligne->LibStatut($status, 0, ($bool ? 1 : 0)).
'</td>';
234 print
'<td class="right"><a href="services_list.php?mode='.$status.($bool ?
'&filter=expired' :
'').
'">'.($nb[$status.$bool] ? $nb[$status.$bool] : 0).
' '.$staticcontratligne->LibStatut($status, 3, ($bool ? 1 : 0)).
'</a></td>';
235 if ($status == 4 && !$bool) $bool =
true;
242 print
'<tr class="liste_total"><td>'.$langs->trans(
"Total").
'</td><td class="right">'.$total.
'</td></tr>';
243 print
"</table></div><br>";
248 if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire)
250 $sql =
"SELECT c.rowid, c.ref,";
251 $sql .=
" s.nom as name, s.rowid as socid";
252 $sql .=
" FROM ".MAIN_DB_PREFIX.
"contrat as c, ".MAIN_DB_PREFIX.
"societe as s";
253 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
254 $sql .=
" WHERE s.rowid = c.fk_soc";
255 $sql .=
" AND c.entity IN (".getEntity(
'contract', 0).
")";
256 $sql .=
" AND c.statut = 0";
257 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
258 if ($socid) $sql .=
" AND c.fk_soc = ".$socid;
260 $resql = $db->query($sql);
264 $num = $db->num_rows(
$resql);
266 print
'<div class="div-table-responsive-no-min">';
267 print
'<table class="noborder centpercent">';
268 print
'<tr class="liste_titre">';
269 print
'<th colspan="3">'.$langs->trans(
"DraftContracts").($num ?
'<span class="badge marginleftonlyshort">'.$num.
'</span>' :
'').
'</th></tr>';
272 $companystatic =
new Societe($db);
278 $obj = $db->fetch_object(
$resql);
280 $staticcontrat->ref = $obj->ref;
281 $staticcontrat->id = $obj->rowid;
283 $companystatic->id = $obj->socid;
284 $companystatic->name = $obj->name;
285 $companystatic->client = 1;
287 print
'<tr class="oddeven"><td class="nowrap">';
288 print $staticcontrat->getNomUrl(1,
'');
291 print $companystatic->getNomUrl(1,
'', 16);
298 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"NoContracts").
'</td></tr>';
300 print
"</table></div><br>";
309 print
'</div><div class="fichetwothirdright"><div class="ficheaddleft">';
315 $sql .=
' sum('.$db->ifsql(
"cd.statut=0", 1, 0).
') as nb_initial,';
316 $sql .=
' sum('.$db->ifsql(
"cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '".$db->idate($now).
"')", 1, 0).
') as nb_running,';
317 $sql .=
' sum('.$db->ifsql(
"cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now).
"')", 1, 0).
') as nb_expired,';
318 $sql .=
' sum('.$db->ifsql(
"cd.statut=4 AND (cd.date_fin_validite IS NOT NULL AND cd.date_fin_validite < '".$db->idate($now - $conf->contrat->services->expires->warning_delay).
"')", 1, 0).
') as nb_late,';
319 $sql .=
' sum('.$db->ifsql(
"cd.statut=5", 1, 0).
') as nb_closed,';
320 $sql .=
" c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom as name, s.rowid as socid";
321 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s,";
322 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" ".MAIN_DB_PREFIX.
"societe_commerciaux as sc,";
323 $sql .=
" ".MAIN_DB_PREFIX.
"contrat as c";
324 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"contratdet as cd ON c.rowid = cd.fk_contrat";
325 $sql .=
" WHERE c.fk_soc = s.rowid";
326 $sql .=
" AND c.entity IN (".getEntity(
'contract', 0).
")";
327 $sql .=
" AND c.statut > 0";
328 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
329 if ($socid) $sql .=
" AND s.rowid = ".$socid;
330 $sql .=
" GROUP BY c.rowid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid";
331 $sql .=
" ORDER BY c.tms DESC";
332 $sql .=
" LIMIT ".$max;
335 $result = $db->query($sql);
338 $num = $db->num_rows($result);
341 print
'<div class="div-table-responsive-no-min">';
342 print
'<table class="noborder centpercent">';
344 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"LastContracts", 5).
'</th>';
345 print
'<th class="center">'.$langs->trans(
"DateModification").
'</th>';
347 print
'<th class="center" width="80" colspan="4">'.$langs->trans(
"Services").
'</th>';
352 $obj = $db->fetch_object($result);
354 print
'<tr class="oddeven">';
355 print
'<td class="nowraponall">';
356 $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid);
357 $staticcontrat->id = $obj->cid;
358 print $staticcontrat->getNomUrl(1, 16);
359 if ($obj->nb_late) print
img_warning($langs->trans(
"Late"));
362 $staticcompany->id = $obj->socid;
363 $staticcompany->name = $obj->name;
364 print $staticcompany->getNomUrl(1,
'', 20);
366 print
'<td class="center">'.dol_print_date($db->jdate($obj->tms),
'dayhour').
'</td>';
368 print
'<td class="right nowraponall" width="32">'.($obj->nb_initial > 0 ?
'<span class="paddingright">'.$obj->nb_initial.
'</span>'.$staticcontratligne->LibStatut(0, 3, -1,
'class="paddingleft"') :
'').
'</td>';
369 print
'<td class="right nowraponall" width="32">'.($obj->nb_running > 0 ?
'<span class="paddingright">'.$obj->nb_running.
'</span>'.$staticcontratligne->LibStatut(4, 3, 0,
'class="marginleft"') :
'').
'</td>';
370 print
'<td class="right nowraponall" width="32">'.($obj->nb_expired > 0 ?
'<span class="paddingright">'.$obj->nb_expired.
'</span>'.$staticcontratligne->LibStatut(4, 3, 1,
'class="paddingleft"') :
'').
'</td>';
371 print
'<td class="right nowraponall" width="32">'.($obj->nb_closed > 0 ?
'<span class="paddingright">'.$obj->nb_closed.
'</span>'.$staticcontratligne->LibStatut(5, 3, -1,
'class="paddingleft"') :
'').
'</td>';
377 print
"</table></div>";
385 $sql =
"SELECT c.ref, c.fk_soc, ";
386 $sql .=
" cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat, cd.date_fin_validite,";
387 $sql .=
" s.nom as name,";
388 $sql .=
" p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity";
389 $sql .=
" FROM (".MAIN_DB_PREFIX.
"contrat as c";
390 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
391 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
392 $sql .=
", ".MAIN_DB_PREFIX.
"contratdet as cd";
393 $sql .=
") LEFT JOIN ".MAIN_DB_PREFIX.
"product as p ON cd.fk_product = p.rowid";
394 $sql .=
" WHERE c.entity IN (".getEntity(
'contract', 0).
")";
395 $sql .=
" AND cd.fk_contrat = c.rowid";
396 $sql .=
" AND c.fk_soc = s.rowid";
397 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
398 if ($socid) $sql .=
" AND s.rowid = ".$socid;
399 $sql .=
" ORDER BY cd.tms DESC";
401 $resql = $db->query($sql);
404 $num = $db->num_rows(
$resql);
407 print
'<div class="div-table-responsive-no-min">';
408 print
'<table class="noborder centpercent">';
410 print
'<tr class="liste_titre"><th colspan="4">'.$langs->trans(
"LastModifiedServices", $max).
'</th>';
413 while ($i < min($num, $max))
415 $obj = $db->fetch_object(
$resql);
417 print
'<tr class="oddeven">';
418 print
'<td class="nowraponall">';
419 $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
420 $staticcontrat->id = $obj->fk_contrat;
421 print $staticcontrat->getNomUrl(1, 16);
425 if ($obj->fk_product > 0)
427 $productstatic->id = $obj->fk_product;
428 $productstatic->type = $obj->ptype;
429 $productstatic->ref = $obj->pref;
430 $productstatic->entity = $obj->pentity;
431 print $productstatic->getNomUrl(1,
'', 20);
433 print
'<a href="'.DOL_URL_ROOT.
'/contrat/card.php?id='.$obj->fk_contrat.
'">'.
img_object($langs->trans(
"ShowService"),
"service");
434 if ($obj->label) print
' '.dol_trunc($obj->label, 20).
'</a>';
435 else print
'</a> '.dol_trunc($obj->note, 20);
439 $staticcompany->id = $obj->fk_soc;
440 $staticcompany->name = $obj->name;
441 print $staticcompany->getNomUrl(1,
'', 20);
443 print
'<td class="nowrap right"><a href="'.DOL_URL_ROOT.
'/contrat/card.php?id='.$obj->fk_contrat.
'&ligne='.$obj->cid.
'">';
444 $dateend = $db->jdate($obj->date_fin_validite);
445 print $staticcontratligne->LibStatut($obj->statut, 3, ($dateend && $dateend < $now) ? 1 : 0);
452 print
"</table></div>";
460 $sql =
"SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
461 $sql .=
" s.nom as name,";
462 $sql .=
" p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity";
463 $sql .=
" FROM (".MAIN_DB_PREFIX.
"contrat as c";
464 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
465 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
466 $sql .=
", ".MAIN_DB_PREFIX.
"contratdet as cd";
467 $sql .=
" ) LEFT JOIN ".MAIN_DB_PREFIX.
"product as p ON cd.fk_product = p.rowid";
468 $sql .=
" WHERE c.entity IN (".getEntity(
'contract', 0).
")";
469 $sql .=
" AND c.statut = 1";
470 $sql .=
" AND cd.statut = 0";
471 $sql .=
" AND cd.fk_contrat = c.rowid";
472 $sql .=
" AND c.fk_soc = s.rowid";
473 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
474 if ($socid) $sql .=
" AND s.rowid = ".$socid;
475 $sql .=
" ORDER BY cd.tms DESC";
477 $resql = $db->query($sql);
480 $num = $db->num_rows(
$resql);
483 print
'<div class="div-table-responsive-no-min">';
484 print
'<table class="noborder centpercent">';
486 print
'<tr class="liste_titre"><th colspan="4">'.$langs->trans(
"NotActivatedServices").
' <a href="'.DOL_URL_ROOT.
'/contrat/services_list.php?mode=0"><span class="badge">'.$num.
'</span></a></th>';
491 $obj = $db->fetch_object(
$resql);
493 print
'<tr class="oddeven">';
495 print
'<td class="nowraponall">';
496 $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
497 $staticcontrat->id = $obj->fk_contrat;
498 print $staticcontrat->getNomUrl(1, 16);
500 print
'<td class="nowrap">';
501 if ($obj->fk_product > 0)
503 $productstatic->id = $obj->fk_product;
504 $productstatic->type = $obj->ptype;
505 $productstatic->ref = $obj->pref;
506 $productstatic->entity = $obj->pentity;
507 print $productstatic->getNomUrl(1,
'', 20);
509 print
'<a href="'.DOL_URL_ROOT.
'/contrat/card.php?id='.$obj->fk_contrat.
'">'.
img_object($langs->trans(
"ShowService"),
"service");
510 if ($obj->label) print
' '.dol_trunc($obj->label, 20).
'</a>';
511 else print
'</a> '.dol_trunc($obj->note, 20);
515 $staticcompany->id = $obj->fk_soc;
516 $staticcompany->name = $obj->name;
517 print $staticcompany->getNomUrl(1,
'', 20);
519 print
'<td width="16" class="right"><a href="line.php?id='.$obj->fk_contrat.
'&ligne='.$obj->cid.
'">';
520 print $staticcontratligne->LibStatut($obj->statut, 3);
527 print
"</table></div>";
535 $sql =
"SELECT c.ref, c.fk_soc, cd.rowid as cid, cd.statut, cd.label, cd.fk_product, cd.description as note, cd.fk_contrat,";
536 $sql .=
" s.nom as name,";
537 $sql .=
" p.rowid as pid, p.ref as pref, p.label as plabel, p.fk_product_type as ptype, p.entity as pentity";
538 $sql .=
" FROM (".MAIN_DB_PREFIX.
"contrat as c";
539 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
540 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
541 $sql .=
", ".MAIN_DB_PREFIX.
"contratdet as cd";
542 $sql .=
" ) LEFT JOIN ".MAIN_DB_PREFIX.
"product as p ON cd.fk_product = p.rowid";
543 $sql .=
" WHERE c.entity IN (".getEntity(
'contract', 0).
")";
544 $sql .=
" AND c.statut = 1";
545 $sql .=
" AND cd.statut = 4";
546 $sql .=
" AND cd.date_fin_validite < '".$db->idate($now).
"'";
547 $sql .=
" AND cd.fk_contrat = c.rowid";
548 $sql .=
" AND c.fk_soc = s.rowid";
549 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
550 if ($socid) $sql .=
" AND s.rowid = ".$socid;
551 $sql .=
" ORDER BY cd.tms DESC";
553 $resql = $db->query($sql);
556 $num = $db->num_rows(
$resql);
559 print
'<div class="div-table-responsive-no-min">';
560 print
'<table class="noborder centpercent">';
562 print
'<tr class="liste_titre"><th colspan="4">'.$langs->trans(
"ListOfExpiredServices").
' <a href="'.DOL_URL_ROOT.
'/contrat/services_list.php?mode=4&filter=expired"><span class="badge">'.$num.
'</span></a></th>';
567 $obj = $db->fetch_object(
$resql);
569 print
'<tr class="oddeven">';
571 print
'<td class="nowraponall">';
572 $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat);
573 $staticcontrat->id = $obj->fk_contrat;
574 print $staticcontrat->getNomUrl(1, 16);
576 print
'<td class="nowrap">';
577 if ($obj->fk_product > 0)
579 $productstatic->id = $obj->fk_product;
580 $productstatic->type = $obj->ptype;
581 $productstatic->ref = $obj->pref;
582 $productstatic->entity = $obj->pentity;
583 print $productstatic->getNomUrl(1,
'', 20);
585 print
'<a href="'.DOL_URL_ROOT.
'/contrat/card.php?id='.$obj->fk_contrat.
'">'.
img_object($langs->trans(
"ShowService"),
"service");
586 if ($obj->label) print
' '.dol_trunc($obj->label, 20).
'</a>';
587 else print
'</a> '.dol_trunc($obj->note, 20);
591 $staticcompany->id = $obj->fk_soc;
592 $staticcompany->name = $obj->name;
593 print $staticcompany->getNomUrl(1,
'', 20);
595 print
'<td width="16" class="right"><a href="line.php?id='.$obj->fk_contrat.
'&ligne='.$obj->cid.
'">';
596 print $staticcontratligne->LibStatut($obj->statut, 3, 1);
603 print
"</table></div>";
610 print
'</div></div></div>';
612 $parameters = array(
'user' => $user);
613 $reshook = $hookmanager->executeHooks(
'dashboardContracts', $parameters, $object);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage products or services.
dol_now($mode= 'auto')
Return date for now.
Class to manage contracts.
Class to manage lines of contracts.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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.
print
Draft customers invoices.
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.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...