38require
'../main.inc.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
48require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
49require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
50require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
51require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
52require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
53require_once DOL_DOCUMENT_ROOT.
'/core/class/dolgraph.class.php';
54require_once DOL_DOCUMENT_ROOT.
'/core/lib/invoice.lib.php';
61$langs->loadLangs(array(
'compta',
'bills'));
63 $langs->load(
"orders");
67$action =
GETPOST(
'action',
'aZ09');
72if ($user->socid > 0) {
74 $socid = $user->socid;
80$maxLatestEditCount = 5;
84$hookmanager->initHooks(array(
'invoiceindex'));
107llxHeader(
"", $langs->trans(
"InvoicesArea"));
112print
'<div class="fichecenter">';
114print
'<div class="twocolumns">';
116print
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
140print
'</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
144if (
isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire')) {
145 $langs->load(
"boxes");
148 $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";
149 $sql .=
", f.date_lim_reglement as datelimite";
150 $sql .=
", s.nom as name";
151 $sql .=
", s.rowid as socid";
152 $sql .=
", s.code_client, s.code_compta as code_compta_client, s.email";
153 $sql .=
", cc.rowid as country_id, cc.code as country_code";
154 $sql .=
", (SELECT SUM(pf.amount) FROM ".$db->prefix().
"paiement_facture as pf WHERE pf.fk_facture = f.rowid) as am";
155 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
156 $sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"societe as s ON s.rowid = f.fk_soc";
157 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
158 $sql .=
" WHERE f.entity IN (".getEntity(
'invoice').
")";
160 $sql .=
" AND f.fk_soc = ".((int) $socid);
163 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
164 $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).
")";
167 $parameters = array();
168 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerLastModified', $parameters);
169 $sql .= $hookmanager->resPrint;
171 $sql .=
" ORDER BY f.tms DESC";
172 $sql .=
$db->plimit($max, 0);
174 $resql =
$db->query($sql);
176 $num =
$db->num_rows($resql);
180 print
'<div class="div-table-responsive-no-min">';
181 print
'<table class="noborder centpercent">';
183 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastCustomerBills", $max);
184 print
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
187 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
189 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
190 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
191 print
'<th width="16"> </th>';
194 $total_ttc = $totalam = $total_ht = 0;
195 while ($i < $num && $i < $conf->liste_limit) {
196 $obj =
$db->fetch_object($resql);
201 $total_ht += $obj->total_ht;
202 $total_ttc += $obj->total_ttc;
206 $tmpinvoice->ref = $obj->ref;
207 $tmpinvoice->id = $obj->rowid;
208 $tmpinvoice->total_ht = $obj->total_ht;
209 $tmpinvoice->total_tva = $obj->total_tva;
210 $tmpinvoice->total_ttc = $obj->total_ttc;
211 $tmpinvoice->statut = $obj->status;
212 $tmpinvoice->status = $obj->status;
213 $tmpinvoice->paye = $obj->paye;
214 $tmpinvoice->paid = $obj->paye;
215 $tmpinvoice->date_lim_reglement =
$db->jdate($obj->datelimite);
216 $tmpinvoice->type = $obj->type;
218 $thirdpartystatic->id = $obj->socid;
219 $thirdpartystatic->name = $obj->name;
220 $thirdpartystatic->email = $obj->email;
221 $thirdpartystatic->country_id = $obj->country_id;
222 $thirdpartystatic->country_code = $obj->country_code;
223 $thirdpartystatic->email = $obj->email;
224 $thirdpartystatic->client = 1;
225 $thirdpartystatic->code_client = $obj->code_client;
227 $thirdpartystatic->code_compta_client = $obj->code_compta_client;
230 $totalallpayments = $tmpinvoice->getSommePaiement(0);
231 $totalallpayments += $tmpinvoice->getSumCreditNotesUsed(0);
232 $totalallpayments += $tmpinvoice->getSumDepositsUsed(0);
233 print
'<tr class="oddeven">';
234 print
'<td class="nowrap">';
236 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
238 print
'<td class="nobordernopadding nowraponall">';
239 print $tmpinvoice->getNomUrl(1,
'');
241 if ($tmpinvoice->hasDelay()) {
242 print
'<td width="20" class="nobordernopadding nowrap">';
246 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
249 $urlsource = $_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
250 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
251 print
'</td></tr></table>';
255 print
'<td class="tdoverflowmax150">';
256 print $thirdpartystatic->getNomUrl(1,
'customer', 44);
259 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
261 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
263 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>';
265 print
'<td>'.$tmpinvoice->getLibStatut(3, $totalallpayments).
'</td>';
269 $total_ttc += $obj->total_ttc;
270 $total_ht += $obj->total_ht;
271 $totalam += $obj->am;
277 print
'<tr class="oddeven">';
278 print
'<td class="nowrap" colspan="5">';
279 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
288 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
290 print
'</table></div><br>';
299if ((
isModEnabled(
'fournisseur') && !
getDolGlobalString(
'MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight(
"fournisseur",
"facture",
"lire")) || (
isModEnabled(
'supplier_invoice') && $user->hasRight(
"supplier_invoice",
"lire"))) {
300 $langs->load(
"boxes");
303 $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";
304 $sql .=
", s.nom as name";
305 $sql .=
", s.rowid as socid";
306 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur, s.email";
307 $sql .=
", (SELECT SUM(pf.amount) FROM ".$db->prefix().
"paiementfourn_facturefourn as pf WHERE pf.fk_facturefourn = ff.rowid) as am";
308 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
309 $sql .=
" WHERE s.rowid = ff.fk_soc";
310 $sql .=
" AND ff.entity IN (".getEntity(
'facture_fourn').
")";
312 $sql .=
" AND ff.fk_soc = ".((int) $socid);
315 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
316 $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).
")";
319 $parameters = array();
320 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierLastModified', $parameters);
321 $sql .= $hookmanager->resPrint;
323 $sql .=
" ORDER BY ff.tms DESC";
324 $sql .=
$db->plimit($max, 0);
326 $resql =
$db->query($sql);
328 $num =
$db->num_rows($resql);
330 print
'<div class="div-table-responsive-no-min">';
331 print
'<table class="noborder centpercent">';
332 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastSupplierBills", $max);
333 print
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?sortfield=f.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
336 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
338 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
339 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
340 print
'<th width="16"> </th>';
344 $total_ht = $total_ttc = $totalam = 0;
348 $obj =
$db->fetch_object($resql);
353 $total_ht += $obj->total_ht;
354 $total_ttc += $obj->total_ttc;
358 $facstatic->ref = $obj->ref;
359 $facstatic->id = $obj->rowid;
360 $facstatic->total_ht = $obj->total_ht;
361 $facstatic->total_tva = $obj->total_tva;
362 $facstatic->total_ttc = $obj->total_ttc;
363 $facstatic->statut = $obj->status;
364 $facstatic->status = $obj->status;
365 $facstatic->paye = $obj->paye;
366 $facstatic->paid = $obj->paye;
367 $facstatic->type = $obj->type;
368 $facstatic->ref_supplier = $obj->ref_supplier;
370 $thirdpartystatic->id = $obj->socid;
371 $thirdpartystatic->name = $obj->name;
372 $thirdpartystatic->email = $obj->email;
373 $thirdpartystatic->country_id = 0;
374 $thirdpartystatic->country_code =
'';
375 $thirdpartystatic->client = 0;
376 $thirdpartystatic->fournisseur = 1;
377 $thirdpartystatic->code_client =
'';
378 $thirdpartystatic->code_fournisseur = $obj->code_fournisseur;
379 $thirdpartystatic->code_compta_client =
'';
380 $thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
382 print
'<tr class="oddeven nowraponall tdoverflowmax100"><td>';
383 print $facstatic->getNomUrl(1,
'');
385 print
'<td class="nowrap tdoverflowmax100">';
386 print $thirdpartystatic->getNomUrl(1,
'supplier');
389 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
391 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
392 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>';
394 $alreadypaid = $facstatic->getSommePaiement();
395 $alreadypaid += $facstatic->getSumCreditNotesUsed();
396 $alreadypaid += $facstatic->getSumDepositsUsed();
398 print
'<td>'.$facstatic->getLibStatut(3, $alreadypaid).
'</td>';
401 $total_ht += $obj->total_ht;
402 $total_ttc += $obj->total_ttc;
403 $totalam += $obj->am;
408 print
'<tr class="oddeven">';
409 print
'<td class="nowrap" colspan="5">';
410 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
419 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
421 print
'</table></div><br>';
430if (
isModEnabled(
'don') && $user->hasRight(
'don',
'lire')) {
431 include_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
433 $langs->load(
"boxes");
434 $donationstatic =
new Don(
$db);
436 $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, d.fk_soc as socid";
437 $sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
438 $sql .=
" WHERE d.entity IN (".getEntity(
'donation').
")";
440 $parameters = array();
441 $reshook = $hookmanager->executeHooks(
'printFieldListWhereLastDonations', $parameters);
442 $sql .= $hookmanager->resPrint;
444 $sql .=
$db->order(
"d.tms",
"DESC");
445 $sql .=
$db->plimit($max, 0);
447 $result =
$db->query($sql);
449 $num =
$db->num_rows($result);
454 print
'<div class="div-table-responsive-no-min">';
455 print
'<table class="noborder centpercent">';
456 print
'<tr class="liste_titre">';
457 print
'<th colspan="2">'.$langs->trans(
"BoxTitleLastModifiedDonations", $max);
458 print
'<a href="'.DOL_URL_ROOT.
'/don/list.php?sortfield=d.tms&sortorder=desc"><span class="badge marginleftonly">...</span></a>';
460 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
461 print
'<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
462 print
'<th width="16"> </th>';
466 $total_ttc = $totalam = $total_ht = 0;
468 while ($i < $num && $i < $max) {
469 $obj =
$db->fetch_object($result);
474 $total_ht += $obj->total_ht;
475 $total_ttc += $obj->total_ttc;
479 $donationstatic->id = $obj->rowid;
480 $donationstatic->ref = $obj->rowid;
481 $donationstatic->lastname = $obj->lastname;
482 $donationstatic->firstname = $obj->firstname;
483 $donationstatic->date =
$db->jdate($obj->date);
484 $donationstatic->status = $obj->status;
487 if (!empty($obj->socid)) {
489 $ret = $companystatic->fetch($obj->socid);
491 $label = $companystatic->getNomUrl(1);
494 $label = $donationstatic->getFullName($langs);
496 $label .= ($label ?
' - ' :
'').$obj->societe;
500 print
'<tr class="oddeven tdoverflowmax100">';
501 print
'<td>'.$donationstatic->getNomUrl(1).
'</td>';
502 print
'<td>'.$label.
'</td>';
503 print
'<td class="nowrap right"><span class="amount">'.price($obj->amount).
'</span></td>';
504 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>';
505 print
'<td>'.$donationstatic->getLibStatut(3).
'</td>';
512 print
'<tr class="oddeven">';
513 print
'<td class="nowrap" colspan="5">';
514 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
519 print
'<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
521 print
'</table></div><br>';
530if (
isModEnabled(
'tax') && $user->hasRight(
'tax',
'charges',
'lire')) {
534 $sql =
"SELECT c.rowid, c.amount, c.date_ech, c.paye,";
535 $sql .=
" cc.libelle as label,";
536 $sql .=
" SUM(pc.amount) as totalpaid";
537 $sql .=
" FROM (".MAIN_DB_PREFIX.
"c_chargesociales as cc, ".MAIN_DB_PREFIX.
"chargesociales as c)";
538 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementcharge as pc ON pc.fk_charge = c.rowid";
539 $sql .=
" WHERE c.fk_type = cc.id";
540 $sql .=
" AND c.entity IN (".getEntity(
'tax').
')';
541 $sql .=
" AND c.paye = 0";
543 $parameters = array();
544 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSocialContributions', $parameters);
545 $sql .= $hookmanager->resPrint;
547 $sql .=
" GROUP BY c.rowid, c.amount, c.date_ech, c.paye, cc.libelle";
549 $resql =
$db->query($sql);
551 $num =
$db->num_rows($resql);
553 print
'<div class="div-table-responsive-no-min">';
554 print
'<table class="noborder centpercent">';
555 print
'<tr class="liste_titre">';
556 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>';
557 print
'<th align="center">'.$langs->trans(
"DateDue").
'</th>';
558 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
559 print
'<th class="right">'.$langs->trans(
"Paid").
'</th>';
560 print
'<th align="center" width="16"> </th>';
569 $obj =
$db->fetch_object($resql);
573 $tot_ttc += $obj->amount;
574 $tot_paid += $obj->totalpaid;
579 $chargestatic->id = $obj->rowid;
580 $chargestatic->ref = $obj->rowid;
581 $chargestatic->label = $obj->label;
582 $chargestatic->paye = $obj->paye;
583 $chargestatic->status = $obj->paye;
585 print
'<tr class="oddeven">';
586 print
'<td class="nowraponall">'.$chargestatic->getNomUrl(1).
'</td>';
587 print
'<td class="center">'.dol_print_date(
$db->jdate($obj->date_ech),
'day').
'</td>';
588 print
'<td class="nowrap right"><span class="amount">'.price($obj->amount).
'</span></td>';
589 print
'<td class="nowrap right"><span class="amount">'.price($obj->totalpaid).
'</span></td>';
590 print
'<td class="center">'.$chargestatic->getLibStatut(3).
'</td>';
593 $tot_ttc += $obj->amount;
598 print
'<tr class="oddeven">';
599 print
'<td class="nowrap" colspan="5">';
600 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
605 print
'<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans(
"Total").
'</td>';
606 print
'<td class="nowrap right">'.price($tot_ttc).
'</td>';
607 print
'<td class="nowrap right">'.price($tot_paid).
'</td>';
608 print
'<td class="right"> </td>';
611 print
'<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
613 print
"</table></div><br>";
626 $langs->load(
"orders");
628 $sql =
"SELECT sum(f.total_ht) as tot_fht, sum(f.total_ttc) as tot_fttc";
629 $sql .=
", s.nom as name, s.email";
630 $sql .=
", s.rowid as socid";
631 $sql .=
", s.code_client, s.code_compta as code_compta_client";
632 $sql .=
", c.rowid, c.ref, c.facture, c.fk_statut as status, c.total_ht, c.total_tva, c.total_ttc,";
633 $sql .=
" cc.rowid as country_id, cc.code as country_code";
634 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
635 $sql .=
", ".MAIN_DB_PREFIX.
"commande as c";
636 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"element_element as el ON el.fk_source = c.rowid AND el.sourcetype = 'commande'";
637 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"facture AS f ON el.fk_target = f.rowid AND el.targettype = 'facture'";
638 $sql .=
" WHERE c.fk_soc = s.rowid";
639 $sql .=
" AND c.entity IN (".getEntity(
'commande').
")";
641 $sql .=
" AND c.fk_soc = ".((int) $socid);
644 $sql .=
" AND c.facture = 0";
646 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
647 $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).
")";
651 $parameters = array();
652 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerOrderToBill', $parameters);
653 $sql .= $hookmanager->resPrint;
655 $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";
657 $resql =
$db->query($sql);
659 $num =
$db->num_rows($resql);
665 print
'<div class="div-table-responsive-no-min">';
666 print
'<table class="noborder centpercent">';
668 print
'<tr class="liste_titre">';
669 print
'<th colspan="2">';
670 print $langs->trans(
"OrdersDeliveredToBill");
671 print
'<a href="'.DOL_URL_ROOT.
'/commande/list.php?search_status='.
Commande::STATUS_CLOSED.
'&search_billed=0">';
672 print
'<span class="badge marginleftonly">'.$num.
'</span>';
677 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
679 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
680 print
'<th class="right">'.$langs->trans(
"ToBill").
'</th>';
681 print
'<th align="center" width="16"> </th>';
684 $tot_ht = $tot_ttc = $tot_tobill = 0;
685 $total_ht = $total_ttc = 0;
688 $obj =
$db->fetch_object($resql);
693 $total_ht += $obj->total_ht;
694 $total_ttc += $obj->total_ttc;
698 $societestatic->id = $obj->socid;
699 $societestatic->name = $obj->name;
700 $societestatic->email = $obj->email;
701 $societestatic->country_id = $obj->country_id;
702 $societestatic->country_code = $obj->country_code;
703 $societestatic->client = 1;
704 $societestatic->code_client = $obj->code_client;
706 $societestatic->code_compta_client = $obj->code_compta_client;
709 $commandestatic->id = $obj->rowid;
710 $commandestatic->ref = $obj->ref;
711 $commandestatic->statut = $obj->status;
712 $commandestatic->status = $obj->status;
713 $commandestatic->billed = $obj->facture;
715 print
'<tr class="oddeven">';
716 print
'<td class="nowrap">';
718 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
719 print
'<td class="nobordernopadding nowrap">';
720 print $commandestatic->getNomUrl(1);
722 print
'<td width="20" class="nobordernopadding nowrap">';
725 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
728 $urlsource = $_SERVER[
'PHP_SELF'].
'?id='.$obj->rowid;
729 print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
730 print
'</td></tr></table>';
734 print
'<td class="nowrap tdoverflowmax100">';
735 print $societestatic->getNomUrl(1,
'customer');
738 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
740 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
741 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc - $obj->tot_fttc).
'</span></td>';
742 print
'<td>'.$commandestatic->getLibStatut(3).
'</td>';
744 $tot_ht += $obj->total_ht;
745 $tot_ttc += $obj->total_ttc;
747 $tot_tobill += ($obj->total_ttc - $obj->tot_fttc);
752 print
'<tr class="oddeven">';
753 print
'<td class="nowrap" colspan="5">';
754 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
759 print
'<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <span style="font-weight: normal">('.$langs->trans(
"RemainderToBill").
': '.
price($tot_tobill).
')</span> </td>';
761 print
'<td class="right">'.price($tot_ht).
'</td>';
763 print
'<td class="nowrap right">'.price($tot_ttc).
'</td>';
764 print
'<td class="nowrap right">'.price($tot_tobill).
'</td>';
765 print
'<td> </td>';
767 print
'</table></div><br>';
779 $langs->load(
"projects");
780 print
'<div class="div-table-responsive-no-min">';
781 print
'<table class="noborder centpercent">';
782 print
'<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"TasksToDo").
'</th>';
785 $resql =
$db->query($sql);
787 $num_rows =
$db->num_rows($resql);
788 while ($i < $num_rows) {
789 $obj =
$db->fetch_object($resql);
791 print
'<tr class="oddeven"><td>'.dol_print_date(
$db->jdate($obj->da),
"day").
'</td>';
792 print
'<td><a href="action/card.php">'.$obj->label.
'</a></td></tr>';
797 print
"</table></div><br>";
801print
'</div></div></div>';
803$parameters = array(
'user' => $user);
805$reshook = $hookmanager->executeHooks(
'dashboardAccountancy', $parameters, $object, $action);
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
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...)
dol_now($mode='gmt')
Return date for now.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a 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.