39 global $db, $langs, $conf, $user;
44 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/card.php?id='.
$object->id;
45 $head[$h][1] = $langs->trans(
'CustomerInvoice');
46 $head[$h][2] =
'compta';
50 $nbContact = count(
$object->liste_contact(-1,
'internal')) + count(
$object->liste_contact(-1,
'external'));
51 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/contact.php?id='.urlencode((
string) (
$object->id));
52 $head[$h][1] = $langs->trans(
'ContactsAddresses');
54 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbContact.
'</span>';
56 $head[$h][2] =
'contact';
60 if (isModEnabled(
'prelevement')) {
61 $nbStandingOrders = 0;
62 $sql =
"SELECT COUNT(pfd.rowid) as nb";
63 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_demande as pfd";
64 $sql .=
" WHERE pfd.fk_facture = ".((int)
$object->id);
65 $sql .=
" AND type = 'ban'";
66 $resql = $db->query($sql);
68 $obj = $db->fetch_object($resql);
70 $nbStandingOrders = $obj->nb;
75 $langs->load(
"banks");
77 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/prelevement.php?id='.urlencode((
string) (
$object->id));
78 $head[$h][1] = $langs->trans(
'StandingOrders');
79 if ($nbStandingOrders > 0) {
80 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbStandingOrders.
'</span>';
82 $head[$h][2] =
'standingorders';
94 if (!empty(
$object->note_private)) {
97 if (!empty(
$object->note_public)) {
100 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/note.php?id='.
$object->id;
101 $head[$h][1] = $langs->trans(
'Notes');
103 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
105 $head[$h][2] =
'note';
109 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
110 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
112 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
114 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/document.php?id='.
$object->id;
115 $head[$h][1] = $langs->trans(
'Documents');
116 if (($nbFiles + $nbLinks) > 0) {
117 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
119 $head[$h][2] =
'documents';
122 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/agenda.php?id='.
$object->id;
123 $head[$h][1] = $langs->trans(
"Events");
124 if (isModEnabled(
'agenda') && ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
127 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
128 $cachekey =
'count_events_facture_'.$object->id;
130 if (!is_null($dataretrieved)) {
131 $nbEvent = $dataretrieved;
133 $sql =
"SELECT COUNT(id) as nb";
134 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
135 $sql .=
" WHERE fk_element = ".((int)
$object->id);
136 $sql .=
" AND elementtype = 'invoice'";
137 $resql = $db->query($sql);
139 $obj = $db->fetch_object($resql);
142 dol_syslog(
'Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
148 $head[$h][1] .= $langs->trans(
"Agenda");
150 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbEvent.
'</span>';
153 $head[$h][2] =
'agenda';
170 global $langs, $conf, $user, $db;
173 $extrafields->fetch_name_optionals_label(
'facture');
174 $extrafields->fetch_name_optionals_label(
'facturedet');
175 $extrafields->fetch_name_optionals_label(
'facture_rec');
176 $extrafields->fetch_name_optionals_label(
'facturedet_rec');
181 $head[$h][0] = DOL_URL_ROOT.
'/admin/invoice.php';
182 $head[$h][1] = $langs->trans(
"Miscellaneous");
183 $head[$h][2] =
'general';
186 $head[$h][0] = DOL_URL_ROOT.
'/admin/payment.php';
187 $head[$h][1] = $langs->trans(
"Payments");
188 $head[$h][2] =
'payment';
197 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/invoice_cust_extrafields.php';
198 $head[$h][1] = $langs->trans(
"ExtraFieldsCustomerInvoices");
199 $nbExtrafields = $extrafields->attributes[
'facture'][
'count'];
200 if ($nbExtrafields > 0) {
201 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
203 $head[$h][2] =
'attributes';
206 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/invoicedet_cust_extrafields.php';
207 $head[$h][1] = $langs->trans(
"ExtraFieldsLines");
208 $nbExtrafields = $extrafields->attributes[
'facturedet'][
'count'];
209 if ($nbExtrafields > 0) {
210 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
212 $head[$h][2] =
'attributeslines';
215 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/invoice_rec_cust_extrafields.php';
216 $head[$h][1] = $langs->trans(
"ExtraFieldsCustomerInvoicesRec");
217 $nbExtrafields = $extrafields->attributes[
'facture_rec'][
'count'];
218 if ($nbExtrafields > 0) {
219 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
221 $head[$h][2] =
'attributesrec';
224 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/invoicedet_rec_cust_extrafields.php';
225 $head[$h][1] = $langs->trans(
"ExtraFieldsLinesRec");
226 $nbExtrafields = $extrafields->attributes[
'facturedet_rec'][
'count'];
227 if ($nbExtrafields > 0) {
228 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
230 $head[$h][2] =
'attributeslinesrec';
234 $head[$h][0] = DOL_URL_ROOT.
'/admin/invoice_situation.php';
235 $head[$h][1] = $langs->trans(
"InvoiceSituation");
236 $head[$h][2] =
'situation';
254 global $db, $langs, $conf, $user;
259 $head[$h][0] = DOL_URL_ROOT .
'/compta/facture/card-rec.php?id=' .
$object->id;
260 $head[$h][1] = $langs->trans(
"RepeatableInvoice");
261 $head[$h][2] =
'card';
264 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/agenda-rec.php?id='.
$object->id;
265 $head[$h][1] = $langs->trans(
"Events");
266 if (isModEnabled(
'agenda') && ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
269 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
270 $cachekey =
'count_events_facturerec_'.$object->id;
272 if (!is_null($dataretrieved)) {
273 $nbEvent = $dataretrieved;
275 $sql =
"SELECT COUNT(id) as nb";
276 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
277 $sql .=
" WHERE fk_element = ".((int)
$object->id);
278 $sql .=
" AND elementtype = 'invoicerec'";
279 $resql = $db->query($sql);
281 $obj = $db->fetch_object($resql);
284 dol_syslog(
'Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
290 $head[$h][1] .= $langs->trans(
"Agenda");
292 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbEvent.
'</span>';
295 $head[$h][2] =
'agenda';
317 global $db, $langs, $conf;
322 $head[$h][0] = DOL_URL_ROOT .
'/fourn/facture/card-rec.php?id=' .
$object->id;
323 $head[$h][1] = $langs->trans(
"RepeatableSupplierInvoice");
324 $head[$h][2] =
'card';
346 global $conf, $db, $langs, $user;
348 if (($mode ==
'customers' && isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire'))
349 || ($mode ==
'suppliers' && (isModEnabled(
'fournisseur') || isModEnabled(
'supplier_invoice')) && $user->hasRight(
'fournisseur',
'facture',
'lire'))
351 global $badgeStatus1, $badgeStatus3, $badgeStatus4, $badgeStatus8, $badgeStatus11;
352 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
354 $now = date_create(date(
'Y-m-d',
dol_now()));
355 $datenowsub30 = date_create(date(
'Y-m-d',
dol_now()));
356 $datenowsub15 = date_create(date(
'Y-m-d',
dol_now()));
357 $datenowadd30 = date_create(date(
'Y-m-d',
dol_now()));
358 $datenowadd15 = date_create(date(
'Y-m-d',
dol_now()));
359 $interval30days = date_interval_create_from_date_string(
'30 days');
360 $interval15days = date_interval_create_from_date_string(
'15 days');
361 date_sub($datenowsub30, $interval30days);
362 date_sub($datenowsub15, $interval15days);
363 date_add($datenowadd30, $interval30days);
364 date_add($datenowadd15, $interval15days);
367 $sql .=
" sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($datenowsub30,
'Y-m-d').
"'", 1, 0).
") as nblate30";
368 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($datenowsub15,
'Y-m-d').
"'", 1, 0).
") as nblate15";
369 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($now,
'Y-m-d').
"'", 1, 0).
") as nblatenow";
370 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement >= '".date_format($now,
'Y-m-d').
"' OR f.date_lim_reglement IS NULL", 1, 0).
") as nbnotlatenow";
371 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement > '".date_format($datenowadd15,
'Y-m-d').
"'", 1, 0).
") as nbnotlate15";
372 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement > '".date_format($datenowadd30,
'Y-m-d').
"'", 1, 0).
") as nbnotlate30";
373 if ($mode ==
'customers') {
374 $element =
'invoice';
375 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
376 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
377 $element =
'supplier_invoice';
378 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f";
382 $sql .=
" WHERE f.entity IN (".getEntity($element).
")";
383 $sql .=
" AND f.type <> 2";
384 $sql .=
" AND f.fk_statut = 1";
385 if (isset($user->socid) && $user->socid > 0) {
386 $sql .=
" AND f.fk_soc = ".((int) $user->socid);
389 $resql = $db->query($sql);
391 $num = $db->num_rows($resql);
394 $dataseries = array();
397 $obj = $db->fetch_object($resql);
406 $dataseries[$i] = array($langs->transnoentitiesnoconv(
'NbOfOpenInvoices'), $obj->nblate30, $obj->nblate15 - $obj->nblate30, $obj->nblatenow - $obj->nblate15, $obj->nbnotlatenow - $obj->nbnotlate15, $obj->nbnotlate15 - $obj->nbnotlate30, $obj->nbnotlate30);
409 if (!empty($dataseries[0])) {
410 foreach ($dataseries[0] as $key => $value) {
411 if (is_numeric($value)) {
417 $langs->trans(
'InvoiceLate30Days'),
418 $langs->trans(
'InvoiceLate15Days'),
419 $langs->trans(
'InvoiceLateMinus15Days'),
420 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate') : $langs->trans(
"InvoiceToPay"),
421 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate15Days') : $langs->trans(
"InvoiceToPay15Days"),
422 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate30Days') : $langs->trans(
"InvoiceToPay30Days"),
425 $colorseries = array($badgeStatus8, $badgeStatus1, $badgeStatus3, $badgeStatus4, $badgeStatus11,
'-'.$badgeStatus11);
427 $result =
'<div class="div-table-responsive-no-min">';
428 $result .=
'<table class="noborder nohover centpercent">';
429 $result .=
'<tr class="liste_titre">';
430 $result .=
'<td>'.$langs->trans(
"NbOfOpenInvoices").
' - ';
431 if ($mode ==
'customers') {
432 $result .= $langs->trans(
"CustomerInvoice");
433 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
434 $result .= $langs->trans(
"SupplierInvoice");
441 if ($conf->use_javascript_ajax) {
444 $dolgraph->SetData($dataseries);
446 $dolgraph->setLegend($legend);
448 $dolgraph->SetDataColor(array_values($colorseries));
449 $dolgraph->setShowLegend(2);
450 $dolgraph->setShowPercent(1);
451 $dolgraph->SetType(array(
'bars',
'bars',
'bars',
'bars',
'bars',
'bars'));
453 $dolgraph->setHeight(
'160');
454 $dolgraph->setWidth(
'450');
455 $dolgraph->setHideXValues(
true);
456 if ($mode ==
'customers') {
457 $dolgraph->draw(
'idgraphcustomerinvoices');
458 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
459 $dolgraph->draw(
'idgraphfourninvoices');
463 $result .=
'<tr maxwidth="255">';
464 $result .=
'<td class="center">'.$dolgraph->show($total ? 0 : $langs->trans(
"NoOpenInvoice")).
'</td>';
470 $result .=
'</table>';
490 global $conf, $db, $langs, $user, $hookmanager;
494 if (isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire')) {
495 if ($user->socid > 0) $socid = $user->socid;
496 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
498 $tmpinvoice =
new Facture($db);
500 $sql =
"SELECT f.rowid, f.ref, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.ref_client";
501 $sql .=
", f.type, f.fk_statut as status, f.paye";
502 $sql .=
", s.nom as name";
503 $sql .=
", s.rowid as socid, s.email";
504 $sql .=
", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur";
505 $sql .=
", cc.rowid as country_id, cc.code as country_code";
506 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
507 $sql .=
", sc.fk_soc, sc.fk_user ";
509 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f, ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
510 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
511 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
513 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT;
514 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
515 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
516 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
520 $sql .=
" AND f.fk_soc = ".((int) $socid);
523 $parameters = array();
524 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerDraft', $parameters);
525 $sql .= $hookmanager->resPrint;
527 $sql .=
" GROUP BY f.rowid, f.ref, f.datef, f.total_ht, f.total_tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,";
528 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
529 $sql .=
" cc.rowid, cc.code";
530 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
531 $sql .=
", sc.fk_soc, sc.fk_user";
535 $parameters = array();
536 $reshook = $hookmanager->executeHooks(
'printFieldListGroupByCustomerDraft', $parameters);
537 $sql .= $hookmanager->resPrint;
539 $resql = $db->query($sql);
542 $num = $db->num_rows($resql);
543 $nbofloop = min($num, $maxofloop);
545 $result .=
'<div class="div-table-responsive-no-min">';
546 $result .=
'<table class="noborder centpercent">';
548 $result .=
'<tr class="liste_titre">';
549 $result .=
'<th colspan="3">';
550 $result .= $langs->trans(
"CustomersDraftInvoices");
551 $result .=
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?search_status='.
Facture::STATUS_DRAFT.
'">';
552 $result .=
'<span class="badge marginleftonly">'.$num.
'</span>';
558 $companystatic =
new Societe($db);
563 while ($i < $nbofloop) {
564 $obj = $db->fetch_object($resql);
566 if ($i >= $maxCount) {
569 $tot_ttc += $obj->total_ttc;
573 $tmpinvoice->id = $obj->rowid;
574 $tmpinvoice->ref = $obj->ref;
575 $tmpinvoice->date = $db->jdate($obj->date);
576 $tmpinvoice->type = $obj->type;
577 $tmpinvoice->total_ht = $obj->total_ht;
578 $tmpinvoice->total_tva = $obj->total_tva;
579 $tmpinvoice->total_ttc = $obj->total_ttc;
580 $tmpinvoice->ref_client = $obj->ref_client;
581 $tmpinvoice->statut = $obj->status;
582 $tmpinvoice->paye = $obj->paye;
584 $companystatic->id = $obj->socid;
585 $companystatic->name = $obj->name;
586 $companystatic->email = $obj->email;
587 $companystatic->country_id = $obj->country_id;
588 $companystatic->country_code = $obj->country_code;
589 $companystatic->client = 1;
590 $companystatic->code_client = $obj->code_client;
591 $companystatic->code_fournisseur = $obj->code_fournisseur;
592 $companystatic->code_compta = $obj->code_compta;
593 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
595 $result .=
'<tr class="oddeven">';
596 $result .=
'<td class="nowrap tdoverflowmax100">';
597 $result .= $tmpinvoice->getNomUrl(1,
'');
599 $result .=
'<td class="nowrap tdoverflowmax100">';
600 $result .= $companystatic->getNomUrl(1,
'customer');
602 $result .=
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
604 $tot_ttc += $obj->total_ttc;
609 $result .=
'<tr class="oddeven">';
610 $result .=
'<td class="nowrap" colspan="3">';
611 $result .=
'<span class="opacitymedium">'.$langs->trans(
"More").
'...'.($othernb < $maxofloop ?
' ('.$othernb.
')' :
'').
'</span>';
613 $result .=
"</tr>\n";
616 $result .=
'<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
617 $result .=
'<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
620 $result .=
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
622 $result .=
"</table></div>";
641 global $conf, $db, $langs, $user, $hookmanager;
645 if ((isModEnabled(
'fournisseur') || isModEnabled(
'supplier_invoice')) && $user->hasRight(
'facture',
'lire')) {
646 if ($user->socid > 0) $socid = $user->socid;
647 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
651 $sql =
"SELECT f.ref, f.rowid, f.total_ht, f.total_tva, f.total_ttc, f.type, f.ref_supplier, f.fk_statut as status, f.paye";
652 $sql .=
", s.nom as name";
653 $sql .=
", s.rowid as socid, s.email";
654 $sql .=
", s.code_client, s.code_compta";
655 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
656 $sql .=
", cc.rowid as country_id, cc.code as country_code";
657 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f, ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
658 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
659 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
661 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT;
662 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
663 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
664 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
667 $sql .=
" AND f.fk_soc = ".((int) $socid);
670 $parameters = array();
671 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierDraft', $parameters);
672 $sql .= $hookmanager->resPrint;
673 $resql = $db->query($sql);
676 $num = $db->num_rows($resql);
677 $nbofloop = min($num, $maxofloop);
679 $result .=
'<div class="div-table-responsive-no-min">';
680 $result .=
'<table class="noborder centpercent">';
682 $result .=
'<tr class="liste_titre">';
683 $result .=
'<th colspan="3">';
684 $result .= $langs->trans(
"SuppliersDraftInvoices");
686 $result .=
'<span class="badge marginleftonly">'.$num.
'</span>';
692 $companystatic =
new Societe($db);
697 while ($i < $nbofloop) {
698 $obj = $db->fetch_object($resql);
700 if ($i >= $maxCount) {
703 $tot_ttc += $obj->total_ttc;
707 $facturesupplierstatic->ref = $obj->ref;
708 $facturesupplierstatic->id = $obj->rowid;
709 $facturesupplierstatic->total_ht = $obj->total_ht;
710 $facturesupplierstatic->total_tva = $obj->total_tva;
711 $facturesupplierstatic->total_ttc = $obj->total_ttc;
712 $facturesupplierstatic->ref_supplier = $obj->ref_supplier;
713 $facturesupplierstatic->type = $obj->type;
714 $facturesupplierstatic->statut = $obj->status;
715 $facturesupplierstatic->statusi = $obj->status;
716 $facturesupplierstatic->paye = $obj->paye;
717 $facturesupplierstatic->paid = $obj->paye;
719 $companystatic->id = $obj->socid;
720 $companystatic->name = $obj->name;
721 $companystatic->email = $obj->email;
722 $companystatic->country_id = $obj->country_id;
723 $companystatic->country_code = $obj->country_code;
724 $companystatic->fournisseur = 1;
725 $companystatic->code_client = $obj->code_client;
726 $companystatic->code_fournisseur = $obj->code_fournisseur;
727 $companystatic->code_compta = $obj->code_compta;
728 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
730 $result .=
'<tr class="oddeven">';
731 $result .=
'<td class="nowrap tdoverflowmax100">';
732 $result .= $facturesupplierstatic->getNomUrl(1,
'');
734 $result .=
'<td class="nowrap tdoverflowmax100">';
735 $result .= $companystatic->getNomUrl(1,
'supplier');
737 $result .=
'<td class="right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
739 $tot_ttc += $obj->total_ttc;
744 $result .=
'<tr class="oddeven">';
745 $result .=
'<td class="nowrap" colspan="3">';
746 $result .=
'<span class="opacitymedium">'.$langs->trans(
"More").
'...'.($othernb < $maxofloop ?
' ('.$othernb.
')' :
'').
'</span>';
748 $result .=
"</tr>\n";
751 $result .=
'<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
752 $result .=
'<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
755 $result .=
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
757 $result .=
"</table></div>";
777 global $conf, $db, $langs, $user;
778 if ($user->socid > 0) $socid = $user->socid;
779 $sql =
"SELECT f.rowid, f.entity, f.ref, f.fk_statut as status, f.paye, f.type, f.total_ht, f.total_tva, f.total_ttc, f.datec,";
780 $sql .=
" s.nom as socname, s.rowid as socid, s.canvas, s.client";
781 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
782 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
783 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
784 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
786 $sql .=
" WHERE f.fk_soc = s.rowid";
787 $sql .=
" AND f.entity IN (".getEntity(
'facture').
")";
789 $sql .=
" AND f.fk_soc = ".((int) $socid);
791 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
792 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
794 $sql .=
" ORDER BY f.tms DESC";
795 $sql .= $db->plimit($maxCount, 0);
797 $resql = $db->query($sql);
802 $num = $db->num_rows($resql);
804 $result =
'<div class="div-table-responsive-no-min">';
805 $result .=
'<table class="noborder centpercent">';
807 $result .=
'<tr class="liste_titre">';
808 $result .=
'<th colspan="3">'.$langs->trans(
"LastCustomersBills", $maxCount).
'</th>';
809 $result .=
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
810 $result .=
'<th class="right"></th>';
814 $result .=
'</table>';
820 $objectstatic =
new Facture($db);
821 $companystatic =
new Societe($db);
825 $obj = $db->fetch_object($resql);
827 $objectstatic->id = $obj->rowid;
828 $objectstatic->ref = $obj->ref;
829 $objectstatic->paye = $obj->paye;
830 $objectstatic->statut = $obj->status;
831 $objectstatic->total_ht = $obj->total_ht;
832 $objectstatic->total_tva = $obj->total_tva;
833 $objectstatic->total_ttc = $obj->total_ttc;
834 $objectstatic->type = $obj->type;
836 $companystatic->id = $obj->socid;
837 $companystatic->name = $obj->socname;
838 $companystatic->client = $obj->client;
839 $companystatic->canvas = $obj->canvas;
842 $filedir = $conf->propal->multidir_output[$obj->entity].
'/'.$filename;
844 $result .=
'<tr class="nowrap">';
846 $result .=
'<td class="oddeven">';
847 $result .=
'<table class="nobordernopadding">';
848 $result .=
'<tr class="nocellnopadd">';
850 $result .=
'<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).
'</td>';
851 $result .=
'<td width="16" class="nobordernopadding nowrap"> </td>';
852 $result .=
'<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).
'</td>';
855 $result .=
'</table>';
858 $result .=
'<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1,
'customer').
'</td>';
859 $result .=
'<td>'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
860 $result .=
'<td class="right amount">'.price($obj->total_ttc).
'</td>';
863 $payment = $objectstatic->getSommePaiement();
864 $result .=
'<td class="right">'.$objectstatic->getLibStatut(5, $payment).
'</td>';
871 $result .=
'</table>';
885 global $conf, $db, $langs, $user;
886 if ($user->socid > 0) $socid = $user->socid;
887 $sql =
"SELECT f.rowid, f.entity, f.ref, f.fk_statut as status, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.type, f.ref_supplier, f.datec,";
888 $sql .=
" s.nom as socname, s.rowid as socid, s.canvas, s.client";
889 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f";
890 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
891 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
892 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
894 $sql .=
" WHERE f.fk_soc = s.rowid";
895 $sql .=
" AND f.entity IN (".getEntity(
'facture_fourn').
")";
897 $sql .=
" AND f.fk_soc = ".((int) $socid);
899 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
900 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
902 $sql .=
" ORDER BY f.tms DESC";
903 $sql .= $db->plimit($maxCount, 0);
905 $resql = $db->query($sql);
911 $num = $db->num_rows($resql);
913 $result =
'<div class="div-table-responsive-no-min">';
914 $result .=
'<table class="noborder centpercent">';
915 $result .=
'<tr class="liste_titre">';
916 $result .=
'<th colspan="3">'.$langs->trans(
"BoxTitleLastSupplierBills", $maxCount).
' ';
917 $result .=
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?sortfield=f.tms&sortorder=DESC">';
918 $result .=
'<span class="badge">...</span>';
921 $result .=
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
922 $result .=
'<th class="right"></th>';
926 $result .=
'</table>';
932 $companystatic =
new Societe($db);
937 $obj = $db->fetch_object($resql);
939 $objectstatic->id = $obj->rowid;
940 $objectstatic->ref = $obj->ref;
941 $objectstatic->paye = $obj->paye;
942 $objectstatic->paid = $obj->paye;
943 $objectstatic->statut = $obj->status;
944 $objectstatic->status = $obj->status;
945 $objectstatic->total_ht = $obj->total_ht;
946 $objectstatic->total_tva = $obj->total_tva;
947 $objectstatic->total_ttc = $obj->total_ttc;
948 $objectstatic->type = $obj->type;
950 $companystatic->id = $obj->socid;
951 $companystatic->name = $obj->socname;
952 $companystatic->client = $obj->client;
953 $companystatic->canvas = $obj->canvas;
956 $filedir = $conf->propal->multidir_output[$obj->entity].
'/'.$filename;
958 $result .=
'<tr class="nowrap">';
960 $result .=
'<td class="oddeven">';
961 $result .=
'<table class="nobordernopadding">';
962 $result .=
'<tr class="nocellnopadd">';
964 $result .=
'<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).
'</td>';
965 $result .=
'<td width="16" class="nobordernopadding nowrap"> </td>';
966 $result .=
'<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).
'</td>';
969 $result .=
'</table>';
972 $result .=
'<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1,
'supplier').
'</td>';
974 $result .=
'<td>'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
976 $result .=
'<td class="amount right">'.price($obj->total_ttc).
'</td>';
978 $result .=
'<td class="right">'.$objectstatic->getLibStatut(5).
'</td>';
985 $result .=
'</table>';
999 global $conf, $db, $langs, $user, $hookmanager;
1003 if (isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire')) {
1004 if ($user->socid > 0) $socid = $user->socid;
1005 $tmpinvoice =
new Facture($db);
1007 $sql =
"SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms";
1008 $sql .=
", f.date_lim_reglement as datelimite";
1009 $sql .=
", s.nom as name";
1010 $sql .=
", s.rowid as socid, s.email";
1011 $sql .=
", s.code_client, s.code_compta";
1012 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1013 $sql .=
", cc.rowid as country_id, cc.code as country_code";
1014 $sql .=
", sum(pf.amount) as am";
1015 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays,".MAIN_DB_PREFIX.
"facture as f";
1016 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf on f.rowid=pf.fk_facture";
1017 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
1018 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1020 $sql .=
" WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED;
1021 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
1022 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
1023 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1026 $sql .=
" AND f.fk_soc = ".((int) $socid);
1029 $parameters = array();
1030 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerUnpaid', $parameters);
1031 $sql .= $hookmanager->resPrint;
1033 $sql .=
" GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total_ht, f.total_tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
1034 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
1035 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1036 $sql .=
" ORDER BY f.datef ASC, f.ref ASC";
1038 $resql = $db->query($sql);
1040 $num = $db->num_rows($resql);
1046 print
'<div class="div-table-responsive-no-min">';
1047 print
'<table class="noborder centpercent">';
1049 print
'<tr class="liste_titre">';
1050 print
'<th colspan="2">';
1051 print $langs->trans(
"BillsCustomersUnpaid", $num).
' ';
1053 print
'<span class="badge">'.$num.
'</span>';
1057 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1059 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1061 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1062 print
'<th class="right">'.$langs->trans(
"Received").
'</th>';
1063 print
'<th width="16"> </th>';
1066 $societestatic =
new Societe($db);
1067 $total_ttc = $totalam = $total = 0;
1069 $obj = $db->fetch_object($resql);
1071 if ($i >= $maxCount) {
1074 $total += $obj->total_ht;
1075 $total_ttc += $obj->total_ttc;
1076 $totalam += $obj->am;
1080 $tmpinvoice->ref = $obj->ref;
1081 $tmpinvoice->id = $obj->rowid;
1082 $tmpinvoice->total_ht = $obj->total_ht;
1083 $tmpinvoice->total_tva = $obj->total_tva;
1084 $tmpinvoice->total_ttc = $obj->total_ttc;
1085 $tmpinvoice->type = $obj->type;
1086 $tmpinvoice->statut = $obj->status;
1087 $tmpinvoice->paye = $obj->paye;
1088 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
1090 $societestatic->id = $obj->socid;
1091 $societestatic->name = $obj->name;
1092 $societestatic->email = $obj->email;
1093 $societestatic->country_id = $obj->country_id;
1094 $societestatic->country_code = $obj->country_code;
1095 $societestatic->client = 1;
1096 $societestatic->code_client = $obj->code_client;
1097 $societestatic->code_fournisseur = $obj->code_fournisseur;
1098 $societestatic->code_compta = $obj->code_compta;
1099 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1101 print
'<tr class="oddeven">';
1102 print
'<td class="nowrap">';
1104 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
1105 print
'<td class="nobordernopadding nowrap">';
1106 print $tmpinvoice->getNomUrl(1,
'');
1108 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
1111 $urlsource = $_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
1112 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
1113 print
'</td></tr></table>';
1116 print
'<td class="nowrap tdoverflowmax100">';
1117 print $societestatic->getNomUrl(1,
'customer');
1119 print
'<td class="right">';
1121 if ($tmpinvoice->hasDelay()) {
1126 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1128 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1129 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1130 print
'<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
1133 $total_ttc += $obj->total_ttc;
1134 $total += $obj->total_ht;
1135 $totalam += $obj->am;
1145 print
'<tr class="oddeven">';
1146 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1147 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1152 print
'<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <span style="font-weight: normal">('.$langs->trans(
"RemainderToTake").
': '.
price($total_ttc - $totalam).
')</span> </td>';
1153 print
'<td> </td>';
1155 print
'<td class="right"><span class="amount">'.price($total).
'</span></td>';
1157 print
'<td class="nowrap right"><span class="amount">'.price($total_ttc).
'</span></td>';
1158 print
'<td class="nowrap right"><span class="amount">'.price($totalam).
'</span></td>';
1159 print
'<td> </td>';
1166 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1168 print
'</table></div><br>';
1188 global $conf, $db, $langs, $user, $hookmanager;
1192 if (isModEnabled(
"supplier_invoice") && ($user->hasRight(
'fournisseur',
'facture',
'lire') || $user->hasRight(
'supplier_invoice',
'read'))) {
1193 if ($user->socid > 0) $socid = $user->socid;
1196 $sql =
"SELECT ff.rowid, ff.ref, ff.fk_statut as status, ff.type, ff.libelle as label, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye";
1197 $sql .=
", ff.date_lim_reglement";
1198 $sql .=
", s.nom as name";
1199 $sql .=
", s.rowid as socid, s.email";
1200 $sql .=
", s.code_client, s.code_compta";
1201 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1202 $sql .=
", sum(pf.amount) as am";
1203 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
1204 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
1205 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
1206 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1208 $sql .=
" WHERE s.rowid = ff.fk_soc";
1209 $sql .=
" AND ff.entity = ".$conf->entity;
1210 $sql .=
" AND ff.paye = 0";
1211 $sql .=
" AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED;
1212 if (empty($user->socid) && !$user->hasRight(
'societe',
'client',
'voir')) {
1213 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1216 $sql .=
" AND ff.fk_soc = ".((int) $socid);
1219 $parameters = array();
1220 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierUnpaid', $parameters);
1221 $sql .= $hookmanager->resPrint;
1223 $sql .=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
1224 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
1225 $sql .=
" ORDER BY ff.date_lim_reglement ASC";
1227 $resql = $db->query($sql);
1229 $num = $db->num_rows($resql);
1234 print
'<div class="div-table-responsive-no-min">';
1235 print
'<table class="noborder centpercent">';
1237 print
'<tr class="liste_titre">';
1238 print
'<th colspan="2">';
1239 print $langs->trans(
"BillsSuppliersUnpaid", $num).
' ';
1241 print
'<span class="badge">'.$num.
'</span>';
1245 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1247 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1249 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1250 print
'<th class="right">'.$langs->trans(
"Paid").
'</th>';
1251 print
'<th width="16"> </th>';
1253 $societestatic =
new Societe($db);
1256 $total = $total_ttc = $totalam = 0;
1258 $obj = $db->fetch_object($resql);
1260 if ($i >= $maxCount) {
1263 $total += $obj->total_ht;
1264 $total_ttc += $obj->total_ttc;
1268 $facstatic->ref = $obj->ref;
1269 $facstatic->id = $obj->rowid;
1270 $facstatic->type = $obj->type;
1271 $facstatic->total_ht = $obj->total_ht;
1272 $facstatic->total_tva = $obj->total_tva;
1273 $facstatic->total_ttc = $obj->total_ttc;
1274 $facstatic->statut = $obj->status;
1275 $facstatic->status = $obj->status;
1276 $facstatic->paid = $obj->paye;
1277 $facstatic->paye = $obj->paye;
1279 $societestatic->id = $obj->socid;
1280 $societestatic->name = $obj->name;
1281 $societestatic->email = $obj->email;
1282 $societestatic->client = 0;
1283 $societestatic->fournisseur = 1;
1284 $societestatic->code_client = $obj->code_client;
1285 $societestatic->code_fournisseur = $obj->code_fournisseur;
1286 $societestatic->code_compta = $obj->code_compta;
1287 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1289 print
'<tr class="oddeven">';
1290 print
'<td class="nowrap tdoverflowmax100">';
1291 print $facstatic->getNomUrl(1,
'');
1293 print
'<td class="nowrap tdoverflowmax100">'.$societestatic->getNomUrl(1,
'supplier').
'</td>';
1294 print
'<td class="right">'.dol_print_date($db->jdate($obj->date_lim_reglement),
'day').
'</td>';
1296 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1298 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1299 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1300 print
'<td>'.$facstatic->getLibStatut(3, $obj->am).
'</td>';
1302 $total += $obj->total_ht;
1303 $total_ttc += $obj->total_ttc;
1304 $totalam += $obj->am;
1313 print
'<tr class="oddeven">';
1314 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1315 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1320 print
'<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <span style="font-weight: normal">('.$langs->trans(
"RemainderToPay").
': '.
price($total_ttc - $totalam).
')</span> </td>';
1321 print
'<td> </td>';
1323 print
'<td class="right">'.price($total).
'</td>';
1325 print
'<td class="nowrap right">'.price($total_ttc).
'</td>';
1326 print
'<td class="nowrap right">'.price($totalam).
'</td>';
1327 print
'<td> </td>';
1334 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1336 print
'</table></div><br>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage suppliers invoices.
const STATUS_VALIDATED
Validated (need to be paid)
Class to manage invoices.
const STATUS_DRAFT
Draft status.
const STATUS_VALIDATED
Validated (need to be paid)
static count($dbs, $objecttype, $objectid)
Return nb of links.
Class to manage third parties objects (customers, suppliers, prospects...)
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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).
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...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
getNumberInvoicesPieChart($mode)
Return an HTML table that contains a pie chart of the number of customers or supplier invoices.
invoice_admin_prepare_head()
Return array head with list of tabs to view object information.
getCustomerInvoiceLatestEditTable($maxCount=5, $socid=0)
Return a HTML table that contains a list with latest edited customer invoices.
invoice_rec_prepare_head($object)
Return array head with list of tabs to view object information.
getPurchaseInvoiceLatestEditTable($maxCount=5, $socid=0)
Return a HTML table that contains a list with latest edited supplier invoices.
getCustomerInvoiceDraftTable($maxCount=500, $socid=0)
Return a HTML table that contains a list with customer invoice drafts.
supplier_invoice_rec_prepare_head($object)
Return array head with list of tabs to view object information.
getDraftSupplierTable($maxCount=500, $socid=0)
Return a HTML table that contains a list with customer invoice drafts.
getCustomerInvoiceUnpaidOpenTable($maxCount=500, $socid=0)
Return a HTML table that contains of unpaid customers invoices.
facture_prepare_head($object)
Initialize the array of tabs for customer invoice.
getPurchaseInvoiceUnpaidOpenTable($maxCount=500, $socid=0)
Return a HTML table that contains of unpaid purchase invoices.
dol_setcache($memoryid, $data, $expire=0)
Save data into a memory area shared by all users, all sessions on server.
dol_getcache($memoryid)
Read a memory area shared by all users, all sessions on server.