38 require
'../main.inc.php';
39 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
40 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
41 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
42 require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
43 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
44 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
45 require_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
46 require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
54 $langs->loadLangs(array(
'compta',
'bills'));
56 $langs->load(
"orders");
60 $action =
GETPOST(
'action',
'aZ09');
65 if ($user->socid > 0) {
67 $socid = $user->socid;
72 $maxDraftCount = !
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
73 $maxLatestEditCount = 5;
74 $maxOpenCount = !
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD;
77 $hookmanager->initHooks(array(
'invoiceindex'));
80 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
96 $form =
new Form($db);
98 $thirdpartystatic =
new Societe($db);
100 llxHeader(
"", $langs->trans(
"InvoicesArea"));
105 print
'<div class="fichecenter"><div class="fichethirdleft">';
127 print
'</div><div class="fichetwothirdright">';
131 if (
isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire')) {
132 $langs->load(
"boxes");
133 $tmpinvoice =
new Facture($db);
135 $sql =
"SELECT f.rowid, f.ref, f.fk_statut as status, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms";
136 $sql .=
", f.date_lim_reglement as datelimite";
137 $sql .=
", s.nom as name";
138 $sql .=
", s.rowid as socid";
139 $sql .=
", s.code_client, s.code_compta, s.email";
140 $sql .=
", cc.rowid as country_id, cc.code as country_code";
141 $sql .=
", (SELECT SUM(pf.amount) FROM ".$db->prefix().
"paiement_facture as pf WHERE pf.fk_facture = f.rowid) as am";
142 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
143 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"societe as s ON s.rowid = f.fk_soc";
144 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
145 $sql .=
" WHERE f.entity IN (".getEntity(
'invoice').
")";
147 $sql .=
" AND f.fk_soc = ".((int) $socid);
150 if (!$user->hasRight(
'societe',
'client',
'voir')) {
151 $sql .=
" AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = f.fk_soc AND sc.fk_user = ".((int) $user->id).
")";
154 $parameters = array();
155 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerLastModified', $parameters);
156 $sql .= $hookmanager->resPrint;
158 $sql .=
" ORDER BY f.tms DESC";
159 $sql .= $db->plimit($max, 0);
161 $resql = $db->query(
$sql);
163 $num = $db->num_rows($resql);
167 print
'<div class="div-table-responsive-no-min">';
168 print
'<table class="noborder centpercent">';
170 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastCustomerBills", $max);
171 print
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
174 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
176 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
177 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
178 print
'<th width="16"> </th>';
181 $total_ttc = $totalam = $total_ht = 0;
182 while ($i < $num && $i < $conf->liste_limit) {
183 $obj = $db->fetch_object($resql);
188 $total_ht += $obj->total_ht;
189 $total_ttc += $obj->total_ttc;
193 $tmpinvoice->ref = $obj->ref;
194 $tmpinvoice->id = $obj->rowid;
195 $tmpinvoice->total_ht = $obj->total_ht;
196 $tmpinvoice->total_tva = $obj->total_tva;
197 $tmpinvoice->total_ttc = $obj->total_ttc;
198 $tmpinvoice->statut = $obj->status;
199 $tmpinvoice->status = $obj->status;
200 $tmpinvoice->paye = $obj->paye;
201 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
202 $tmpinvoice->type = $obj->type;
204 $thirdpartystatic->id = $obj->socid;
205 $thirdpartystatic->name = $obj->name;
206 $thirdpartystatic->email = $obj->email;
207 $thirdpartystatic->country_id = $obj->country_id;
208 $thirdpartystatic->country_code = $obj->country_code;
209 $thirdpartystatic->email = $obj->email;
210 $thirdpartystatic->client = 1;
211 $thirdpartystatic->code_client = $obj->code_client;
213 $thirdpartystatic->code_compta_client = $obj->code_compta;
216 print
'<tr class="oddeven">';
217 print
'<td class="nowrap">';
219 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
221 print
'<td class="nobordernopadding nowraponall">';
222 print $tmpinvoice->getNomUrl(1,
'');
224 if ($tmpinvoice->hasDelay()) {
225 print
'<td width="20" class="nobordernopadding nowrap">';
229 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
232 $urlsource = $_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
233 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
234 print
'</td></tr></table>';
238 print
'<td class="tdoverflowmax150">';
239 print $thirdpartystatic->getNomUrl(1,
'customer', 44);
242 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
244 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
246 print
'<td class="right" title="'.dol_escape_htmltag($langs->trans(
"DateModificationShort").
' : '.
dol_print_date($db->jdate($obj->tms),
'dayhour',
'tzuserrel')).
'">'.
dol_print_date($db->jdate($obj->tms),
'day',
'tzuserrel').
'</td>';
248 print
'<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
252 $total_ttc += $obj->total_ttc;
253 $total_ht += $obj->total_ht;
254 $totalam += $obj->am;
260 print
'<tr class="oddeven">';
261 print
'<td class="nowrap" colspan="5">';
262 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
271 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
273 print
'</table></div><br>';
282 if ((
isModEnabled(
'fournisseur') && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight(
"fournisseur",
"facture",
"lire")) || (
isModEnabled(
'supplier_invoice') && $user->hasRight(
"supplier_invoice",
"lire"))) {
283 $langs->load(
"boxes");
286 $sql =
"SELECT ff.rowid, ff.ref, ff.fk_statut as status, ff.type, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.tms, ff.paye, ff.ref_supplier";
287 $sql .=
", s.nom as name";
288 $sql .=
", s.rowid as socid";
289 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur, s.email";
290 $sql .=
", (SELECT SUM(pf.amount) FROM ".$db->prefix().
"paiementfourn_facturefourn as pf WHERE pf.fk_facturefourn = ff.rowid) as am";
291 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
292 $sql .=
" WHERE s.rowid = ff.fk_soc";
293 $sql .=
" AND ff.entity IN (".getEntity(
'facture_fourn').
")";
295 $sql .=
" AND ff.fk_soc = ".((int) $socid);
298 if (!$user->hasRight(
'societe',
'client',
'voir')) {
299 $sql .=
" AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = ff.fk_soc AND sc.fk_user = ".((int) $user->id).
")";
302 $parameters = array();
303 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierLastModified', $parameters);
304 $sql .= $hookmanager->resPrint;
306 $sql .=
" ORDER BY ff.tms DESC";
307 $sql .= $db->plimit($max, 0);
309 $resql = $db->query(
$sql);
311 $num = $db->num_rows($resql);
313 print
'<div class="div-table-responsive-no-min">';
314 print
'<table class="noborder centpercent">';
315 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastSupplierBills", $max);
316 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
319 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
321 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
322 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
323 print
'<th width="16"> </th>';
327 $total_ht = $total_ttc = $totalam = 0;
331 $obj = $db->fetch_object($resql);
336 $total_ht += $obj->total_ht;
337 $total_ttc += $obj->total_ttc;
341 $facstatic->ref = $obj->ref;
342 $facstatic->id = $obj->rowid;
343 $facstatic->total_ht = $obj->total_ht;
344 $facstatic->total_tva = $obj->total_tva;
345 $facstatic->total_ttc = $obj->total_ttc;
346 $facstatic->statut = $obj->status;
347 $facstatic->status = $obj->status;
348 $facstatic->paye = $obj->paye;
349 $facstatic->paid = $obj->paye;
350 $facstatic->type = $obj->type;
351 $facstatic->ref_supplier = $obj->ref_supplier;
353 $thirdpartystatic->id = $obj->socid;
354 $thirdpartystatic->name = $obj->name;
355 $thirdpartystatic->email = $obj->email;
356 $thirdpartystatic->country_id = 0;
357 $thirdpartystatic->country_code =
'';
358 $thirdpartystatic->client = 0;
359 $thirdpartystatic->fournisseur = 1;
360 $thirdpartystatic->code_client =
'';
361 $thirdpartystatic->code_fournisseur = $obj->code_fournisseur;
362 $thirdpartystatic->code_compta_client =
'';
363 $thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
365 print
'<tr class="oddeven nowraponall tdoverflowmax100"><td>';
366 print $facstatic->getNomUrl(1,
'');
368 print
'<td class="nowrap tdoverflowmax100">';
369 print $thirdpartystatic->getNomUrl(1,
'supplier');
372 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
374 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
375 print
'<td class="right" title="'.dol_escape_htmltag($langs->trans(
"DateModificationShort").
' : '.
dol_print_date($db->jdate($obj->tms),
'dayhour',
'tzuserrel')).
'">'.
dol_print_date($db->jdate($obj->tms),
'day',
'tzuserrel').
'</td>';
376 $alreadypaid = $facstatic->getSommePaiement();
377 print
'<td>'.$facstatic->getLibStatut(3, $alreadypaid).
'</td>';
379 $total_ht += $obj->total_ht;
380 $total_ttc += $obj->total_ttc;
381 $totalam += $obj->am;
386 print
'<tr class="oddeven">';
387 print
'<td class="nowrap" colspan="5">';
388 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
397 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
399 print
'</table></div><br>';
408 if (
isModEnabled(
'don') && $user->hasRight(
'don',
'lire')) {
409 include_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
411 $langs->load(
"boxes");
412 $donationstatic =
new Don($db);
414 $sql =
"SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status";
415 $sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
416 $sql .=
" WHERE d.entity IN (".getEntity(
'donation').
")";
418 $parameters = array();
419 $reshook = $hookmanager->executeHooks(
'printFieldListWhereLastDonations', $parameters);
420 $sql .= $hookmanager->resPrint;
422 $sql .= $db->order(
"d.tms",
"DESC");
423 $sql .= $db->plimit($max, 0);
425 $result = $db->query(
$sql);
427 $num = $db->num_rows($result);
432 print
'<div class="div-table-responsive-no-min">';
433 print
'<table class="noborder centpercent">';
434 print
'<tr class="liste_titre">';
435 print
'<th colspan="2">'.$langs->trans(
"BoxTitleLastModifiedDonations", $max);
436 print
'<a href="'.DOL_URL_ROOT.
'/don/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
438 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
439 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
440 print
'<th width="16"> </th>';
444 $total_ttc = $totalam = $total_ht = 0;
446 while ($i < $num && $i < $max) {
447 $obj = $db->fetch_object($result);
452 $total_ht += $obj->total_ht;
453 $total_ttc += $obj->total_ttc;
457 $donationstatic->id = $obj->rowid;
458 $donationstatic->ref = $obj->rowid;
459 $donationstatic->lastname = $obj->lastname;
460 $donationstatic->firstname = $obj->firstname;
461 $donationstatic->date = $db->jdate($obj->date);
462 $donationstatic->statut = $obj->status;
463 $donationstatic->status = $obj->status;
465 $label = $donationstatic->getFullName($langs);
467 $label .= ($label ?
' - ' :
'').$obj->societe;
470 print
'<tr class="oddeven tdoverflowmax100">';
471 print
'<td>'.$donationstatic->getNomUrl(1).
'</td>';
472 print
'<td>'.$label.
'</td>';
473 print
'<td class="nowrap right"><span class="amount">'.price($obj->amount).
'</span></td>';
474 print
'<td class="right" title="'.dol_escape_htmltag($langs->trans(
"DateModificationShort").
' : '.
dol_print_date($db->jdate($obj->dm),
'dayhour',
'tzuserrel')).
'">'.
dol_print_date($db->jdate($obj->dm),
'day',
'tzuserrel').
'</td>';
475 print
'<td>'.$donationstatic->getLibStatut(3).
'</td>';
482 print
'<tr class="oddeven">';
483 print
'<td class="nowrap" colspan="5">';
484 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
489 print
'<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
491 print
'</table></div><br>';
500 if (
isModEnabled(
'tax') && $user->hasRight(
'tax',
'charges',
'lire')) {
504 $sql =
"SELECT c.rowid, c.amount, c.date_ech, c.paye,";
505 $sql .=
" cc.libelle as label,";
506 $sql .=
" SUM(pc.amount) as sumpaid";
507 $sql .=
" FROM (".MAIN_DB_PREFIX.
"c_chargesociales as cc, ".MAIN_DB_PREFIX.
"chargesociales as c)";
508 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementcharge as pc ON pc.fk_charge = c.rowid";
509 $sql .=
" WHERE c.fk_type = cc.id";
510 $sql .=
" AND c.entity IN (".getEntity(
'tax').
')';
511 $sql .=
" AND c.paye = 0";
513 $parameters = array();
514 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSocialContributions', $parameters);
515 $sql .= $hookmanager->resPrint;
517 $sql .=
" GROUP BY c.rowid, c.amount, c.date_ech, c.paye, cc.libelle";
519 $resql = $db->query(
$sql);
521 $num = $db->num_rows($resql);
523 print
'<div class="div-table-responsive-no-min">';
524 print
'<table class="noborder centpercent">';
525 print
'<tr class="liste_titre">';
526 print
'<th>'.$langs->trans(
"ContributionsToPay").($num ?
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/list.php?status=0"><span class="badge marginleftonly">'.$num.
'</span></a>' :
'').
'</th>';
527 print
'<th align="center">'.$langs->trans(
"DateDue").
'</th>';
528 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
529 print
'<th class="right">'.$langs->trans(
"Paid").
'</th>';
530 print
'<th align="center" width="16"> </th>';
539 $obj = $db->fetch_object($resql);
543 $tot_ttc += $obj->amount;
544 $tot_paid += $obj->sumpaid;
549 $chargestatic->id = $obj->rowid;
550 $chargestatic->ref = $obj->rowid;
551 $chargestatic->label = $obj->label;
552 $chargestatic->paye = $obj->paye;
553 $chargestatic->status = $obj->paye;
555 print
'<tr class="oddeven">';
556 print
'<td class="nowraponall">'.$chargestatic->getNomUrl(1).
'</td>';
557 print
'<td class="center">'.dol_print_date($db->jdate($obj->date_ech),
'day').
'</td>';
558 print
'<td class="nowrap right"><span class="amount">'.price($obj->amount).
'</span></td>';
559 print
'<td class="nowrap right"><span class="amount">'.price($obj->sumpaid).
'</span></td>';
560 print
'<td class="center">'.$chargestatic->getLibStatut(3).
'</td>';
563 $tot_ttc += $obj->amount;
568 print
'<tr class="oddeven">';
569 print
'<td class="nowrap" colspan="5">';
570 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
575 print
'<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans(
"Total").
'</td>';
576 print
'<td class="nowrap right">'.price($tot_ttc).
'</td>';
577 print
'<td class="nowrap right">'.price($tot_paid).
'</td>';
578 print
'<td class="right"> </td>';
581 print
'<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
583 print
"</table></div><br>";
595 $commandestatic =
new Commande($db);
596 $langs->load(
"orders");
598 $sql =
"SELECT sum(f.total_ht) as tot_fht, sum(f.total_ttc) as tot_fttc";
599 $sql .=
", s.nom as name, s.email";
600 $sql .=
", s.rowid as socid";
601 $sql .=
", s.code_client, s.code_compta";
602 $sql .=
", c.rowid, c.ref, c.facture, c.fk_statut as status, c.total_ht, c.total_tva, c.total_ttc,";
603 $sql .=
" cc.rowid as country_id, cc.code as country_code";
604 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
605 $sql .=
", ".MAIN_DB_PREFIX.
"commande as c";
606 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"element_element as el ON el.fk_source = c.rowid AND el.sourcetype = 'commande'";
607 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"facture AS f ON el.fk_target = f.rowid AND el.targettype = 'facture'";
608 $sql .=
" WHERE c.fk_soc = s.rowid";
609 $sql .=
" AND c.entity IN (".getEntity(
'commande').
")";
611 $sql .=
" AND c.fk_soc = ".((int) $socid);
614 $sql .=
" AND c.facture = 0";
616 if (!$user->hasRight(
'societe',
'client',
'voir')) {
617 $sql .=
" AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX.
"societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc AND sc.fk_user = ".((int) $user->id).
")";
621 $parameters = array();
622 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerOrderToBill', $parameters);
623 $sql .= $hookmanager->resPrint;
625 $sql .=
" GROUP BY s.nom, s.email, s.rowid, s.code_client, s.code_compta, c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.total_tva, c.total_ttc, cc.rowid, cc.code";
627 $resql = $db->query(
$sql);
629 $num = $db->num_rows($resql);
635 print
'<div class="div-table-responsive-no-min">';
636 print
'<table class="noborder centpercent">';
638 print
'<tr class="liste_titre">';
639 print
'<th colspan="2">';
640 print $langs->trans(
"OrdersDeliveredToBill");
641 print
'<a href="'.DOL_URL_ROOT.
'/commande/list.php?search_status='.
Commande::STATUS_CLOSED.
'&search_billed=0">';
642 print
'<span class="badge marginleftonly">'.$num.
'</span>';
647 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
649 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
650 print
'<th class="right">'.$langs->trans(
"ToBill").
'</th>';
651 print
'<th align="center" width="16"> </th>';
654 $tot_ht = $tot_ttc = $tot_tobill = 0;
655 $societestatic =
new Societe($db);
657 $obj = $db->fetch_object($resql);
662 $total_ht += $obj->total_ht;
663 $total_ttc += $obj->total_ttc;
667 $societestatic->id = $obj->socid;
668 $societestatic->name = $obj->name;
669 $societestatic->email = $obj->email;
670 $societestatic->country_id = $obj->country_id;
671 $societestatic->country_code = $obj->country_code;
672 $societestatic->client = 1;
673 $societestatic->code_client = $obj->code_client;
675 $societestatic->code_compta_client = $obj->code_compta;
678 $commandestatic->id = $obj->rowid;
679 $commandestatic->ref = $obj->ref;
680 $commandestatic->statut = $obj->status;
681 $commandestatic->billed = $obj->facture;
683 print
'<tr class="oddeven">';
684 print
'<td class="nowrap">';
686 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
687 print
'<td class="nobordernopadding nowrap">';
688 print $commandestatic->getNomUrl(1);
690 print
'<td width="20" class="nobordernopadding nowrap">';
693 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
696 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$obj->rowid;
697 print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
698 print
'</td></tr></table>';
702 print
'<td class="nowrap tdoverflowmax100">';
703 print $societestatic->getNomUrl(1,
'customer');
706 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
708 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
709 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc - $obj->tot_fttc).
'</span></td>';
710 print
'<td>'.$commandestatic->getLibStatut(3).
'</td>';
712 $tot_ht += $obj->total_ht;
713 $tot_ttc += $obj->total_ttc;
715 $tot_tobill += ($obj->total_ttc - $obj->tot_fttc);
720 print
'<tr class="oddeven">';
721 print
'<td class="nowrap" colspan="5">';
722 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
727 print
'<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <span style="font-weight: normal">('.$langs->trans(
"RemainderToBill").
': '.
price($tot_tobill).
')</span> </td>';
729 print
'<td class="right">'.price($tot_ht).
'</td>';
731 print
'<td class="nowrap right">'.price($tot_ttc).
'</td>';
732 print
'<td class="nowrap right">'.price($tot_tobill).
'</td>';
733 print
'<td> </td>';
735 print
'</table></div><br>';
747 print
'<div class="div-table-responsive-no-min">';
748 print
'<table class="noborder centpercent">';
749 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"TasksToDo").
'</th>';
752 $resql = $db->query(
$sql);
754 $num_rows = $db->num_rows($resql);
755 while ($i < $num_rows) {
756 $obj = $db->fetch_object($resql);
758 print
'<tr class="oddeven"><td>'.dol_print_date($db->jdate($obj->da),
"day").
'</td>';
759 print
'<td><a href="action/card.php">'.$obj->label.
'</a></td></tr>';
764 print
"</table></div><br>";
768 print
'</div></div>';
770 $parameters = array(
'user' => $user);
771 $reshook = $hookmanager->executeHooks(
'dashboardAccountancy', $parameters,
$object);
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class for managing the social charges.
Class to manage customers orders.
const STATUS_CLOSED
Closed (Sent, billed or not)
Class to manage donations.
Class to manage suppliers invoices.
Class to manage invoices.
Class to manage third parties objects (customers, suppliers, prospects...)
if(isModEnabled('invoice') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) if(isModEnabled('invoice') &&isModEnabled('order') && $user->hasRight("commande", "lire") &&!getDolGlobalString('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')) $sql
Social contributions to pay.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
getNumberInvoicesPieChart($mode)
Return an HTML table that contains a pie chart of the number of customers or supplier invoices.
getCustomerInvoiceDraftTable($maxCount=500, $socid=0)
Return a HTML table that contains a list with customer invoice drafts.
getDraftSupplierTable($maxCount=500, $socid=0)
Return a HTML table that contains a list with customer invoice drafts.
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.