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 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
497 $tmpinvoice =
new Facture($db);
499 $sql =
"SELECT f.rowid, f.ref, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.ref_client";
500 $sql .=
", f.type, f.fk_statut as status, f.paye";
501 $sql .=
", s.nom as name";
502 $sql .=
", s.rowid as socid, s.email";
503 $sql .=
", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur";
504 $sql .=
", cc.rowid as country_id, cc.code as country_code";
505 if (!$user->hasRight(
'societe',
'client',
'voir')) {
506 $sql .=
", sc.fk_soc, sc.fk_user ";
508 $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";
509 if (!$user->hasRight(
'societe',
'client',
'voir')) {
510 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
512 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT;
513 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
514 if (!$user->hasRight(
'societe',
'client',
'voir')) {
515 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
519 $sql .=
" AND f.fk_soc = ".((int) $socid);
522 $parameters = array();
523 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerDraft', $parameters);
524 $sql .= $hookmanager->resPrint;
526 $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,";
527 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
528 $sql .=
" cc.rowid, cc.code";
529 if (!$user->hasRight(
'societe',
'client',
'voir')) {
530 $sql .=
", sc.fk_soc, sc.fk_user";
534 $parameters = array();
535 $reshook = $hookmanager->executeHooks(
'printFieldListGroupByCustomerDraft', $parameters);
536 $sql .= $hookmanager->resPrint;
538 $resql = $db->query($sql);
541 $num = $db->num_rows($resql);
542 $nbofloop = min($num, $maxofloop);
544 $result .=
'<div class="div-table-responsive-no-min">';
545 $result .=
'<table class="noborder centpercent">';
547 $result .=
'<tr class="liste_titre">';
548 $result .=
'<th colspan="3">';
549 $result .= $langs->trans(
"CustomersDraftInvoices");
550 $result .=
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?search_status='.
Facture::STATUS_DRAFT.
'">';
551 $result .=
'<span class="badge marginleftonly">'.$num.
'</span>';
557 $companystatic =
new Societe($db);
562 while ($i < $nbofloop) {
563 $obj = $db->fetch_object($resql);
565 if ($i >= $maxCount) {
568 $tot_ttc += $obj->total_ttc;
572 $tmpinvoice->id = $obj->rowid;
573 $tmpinvoice->ref = $obj->ref;
574 $tmpinvoice->date = $db->jdate($obj->date);
575 $tmpinvoice->type = $obj->type;
576 $tmpinvoice->total_ht = $obj->total_ht;
577 $tmpinvoice->total_tva = $obj->total_tva;
578 $tmpinvoice->total_ttc = $obj->total_ttc;
579 $tmpinvoice->ref_client = $obj->ref_client;
580 $tmpinvoice->statut = $obj->status;
581 $tmpinvoice->paye = $obj->paye;
583 $companystatic->id = $obj->socid;
584 $companystatic->name = $obj->name;
585 $companystatic->email = $obj->email;
586 $companystatic->country_id = $obj->country_id;
587 $companystatic->country_code = $obj->country_code;
588 $companystatic->client = 1;
589 $companystatic->code_client = $obj->code_client;
590 $companystatic->code_fournisseur = $obj->code_fournisseur;
591 $companystatic->code_compta = $obj->code_compta;
592 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
594 $result .=
'<tr class="oddeven">';
595 $result .=
'<td class="nowrap tdoverflowmax100">';
596 $result .= $tmpinvoice->getNomUrl(1,
'');
598 $result .=
'<td class="nowrap tdoverflowmax100">';
599 $result .= $companystatic->getNomUrl(1,
'customer');
601 $result .=
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
603 $tot_ttc += $obj->total_ttc;
608 $result .=
'<tr class="oddeven">';
609 $result .=
'<td class="nowrap" colspan="3">';
610 $result .=
'<span class="opacitymedium">'.$langs->trans(
"More").
'...'.($othernb < $maxofloop ?
' ('.$othernb.
')' :
'').
'</span>';
612 $result .=
"</tr>\n";
615 $result .=
'<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
616 $result .=
'<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
619 $result .=
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
621 $result .=
"</table></div>";
640 global $conf, $db, $langs, $user, $hookmanager;
644 if ((isModEnabled(
'fournisseur') || isModEnabled(
'supplier_invoice')) && $user->hasRight(
'facture',
'lire')) {
645 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
649 $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";
650 $sql .=
", s.nom as name";
651 $sql .=
", s.rowid as socid, s.email";
652 $sql .=
", s.code_client, s.code_compta";
653 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
654 $sql .=
", cc.rowid as country_id, cc.code as country_code";
655 $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";
656 if (!$user->hasRight(
'societe',
'client',
'voir')) {
657 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
659 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT;
660 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
661 if (!$user->hasRight(
'societe',
'client',
'voir')) {
662 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
665 $sql .=
" AND f.fk_soc = ".((int) $socid);
668 $parameters = array();
669 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierDraft', $parameters);
670 $sql .= $hookmanager->resPrint;
671 $resql = $db->query($sql);
674 $num = $db->num_rows($resql);
675 $nbofloop = min($num, $maxofloop);
677 $result .=
'<div class="div-table-responsive-no-min">';
678 $result .=
'<table class="noborder centpercent">';
680 $result .=
'<tr class="liste_titre">';
681 $result .=
'<th colspan="3">';
682 $result .= $langs->trans(
"SuppliersDraftInvoices");
684 $result .=
'<span class="badge marginleftonly">'.$num.
'</span>';
690 $companystatic =
new Societe($db);
695 while ($i < $nbofloop) {
696 $obj = $db->fetch_object($resql);
698 if ($i >= $maxCount) {
701 $tot_ttc += $obj->total_ttc;
705 $facturesupplierstatic->ref = $obj->ref;
706 $facturesupplierstatic->id = $obj->rowid;
707 $facturesupplierstatic->total_ht = $obj->total_ht;
708 $facturesupplierstatic->total_tva = $obj->total_tva;
709 $facturesupplierstatic->total_ttc = $obj->total_ttc;
710 $facturesupplierstatic->ref_supplier = $obj->ref_supplier;
711 $facturesupplierstatic->type = $obj->type;
712 $facturesupplierstatic->statut = $obj->status;
713 $facturesupplierstatic->statusi = $obj->status;
714 $facturesupplierstatic->paye = $obj->paye;
715 $facturesupplierstatic->paid = $obj->paye;
717 $companystatic->id = $obj->socid;
718 $companystatic->name = $obj->name;
719 $companystatic->email = $obj->email;
720 $companystatic->country_id = $obj->country_id;
721 $companystatic->country_code = $obj->country_code;
722 $companystatic->fournisseur = 1;
723 $companystatic->code_client = $obj->code_client;
724 $companystatic->code_fournisseur = $obj->code_fournisseur;
725 $companystatic->code_compta = $obj->code_compta;
726 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
728 $result .=
'<tr class="oddeven">';
729 $result .=
'<td class="nowrap tdoverflowmax100">';
730 $result .= $facturesupplierstatic->getNomUrl(1,
'');
732 $result .=
'<td class="nowrap tdoverflowmax100">';
733 $result .= $companystatic->getNomUrl(1,
'supplier');
735 $result .=
'<td class="right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
737 $tot_ttc += $obj->total_ttc;
742 $result .=
'<tr class="oddeven">';
743 $result .=
'<td class="nowrap" colspan="3">';
744 $result .=
'<span class="opacitymedium">'.$langs->trans(
"More").
'...'.($othernb < $maxofloop ?
' ('.$othernb.
')' :
'').
'</span>';
746 $result .=
"</tr>\n";
749 $result .=
'<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
750 $result .=
'<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
753 $result .=
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
755 $result .=
"</table></div>";
775 global $conf, $db, $langs, $user;
777 $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,";
778 $sql .=
" s.nom as socname, s.rowid as socid, s.canvas, s.client";
779 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
780 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
781 if (!$user->hasRight(
'societe',
'client',
'voir')) {
782 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
784 $sql .=
" WHERE f.fk_soc = s.rowid";
785 $sql .=
" AND f.entity IN (".getEntity(
'facture').
")";
787 $sql .=
" AND f.fk_soc = ".((int) $socid);
789 if (!$user->hasRight(
'societe',
'client',
'voir')) {
790 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
792 $sql .=
" ORDER BY f.tms DESC";
793 $sql .= $db->plimit($maxCount, 0);
795 $resql = $db->query($sql);
800 $num = $db->num_rows($resql);
802 $result =
'<div class="div-table-responsive-no-min">';
803 $result .=
'<table class="noborder centpercent">';
805 $result .=
'<tr class="liste_titre">';
806 $result .=
'<th colspan="3">'.$langs->trans(
"LastCustomersBills", $maxCount).
'</th>';
807 $result .=
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
808 $result .=
'<th class="right"></th>';
812 $result .=
'</table>';
818 $objectstatic =
new Facture($db);
819 $companystatic =
new Societe($db);
823 $obj = $db->fetch_object($resql);
825 $objectstatic->id = $obj->rowid;
826 $objectstatic->ref = $obj->ref;
827 $objectstatic->paye = $obj->paye;
828 $objectstatic->statut = $obj->status;
829 $objectstatic->total_ht = $obj->total_ht;
830 $objectstatic->total_tva = $obj->total_tva;
831 $objectstatic->total_ttc = $obj->total_ttc;
832 $objectstatic->type = $obj->type;
834 $companystatic->id = $obj->socid;
835 $companystatic->name = $obj->socname;
836 $companystatic->client = $obj->client;
837 $companystatic->canvas = $obj->canvas;
840 $filedir = $conf->propal->multidir_output[$obj->entity].
'/'.$filename;
842 $result .=
'<tr class="nowrap">';
844 $result .=
'<td class="oddeven">';
845 $result .=
'<table class="nobordernopadding">';
846 $result .=
'<tr class="nocellnopadd">';
848 $result .=
'<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).
'</td>';
849 $result .=
'<td width="16" class="nobordernopadding nowrap"> </td>';
850 $result .=
'<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).
'</td>';
853 $result .=
'</table>';
856 $result .=
'<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1,
'customer').
'</td>';
857 $result .=
'<td>'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
858 $result .=
'<td class="right amount">'.price($obj->total_ttc).
'</td>';
861 $payment = $objectstatic->getSommePaiement();
862 $result .=
'<td class="right">'.$objectstatic->getLibStatut(5, $payment).
'</td>';
869 $result .=
'</table>';
883 global $conf, $db, $langs, $user;
885 $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,";
886 $sql .=
" s.nom as socname, s.rowid as socid, s.canvas, s.client";
887 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f";
888 $sql .=
", ".MAIN_DB_PREFIX.
"societe as s";
889 if (!$user->hasRight(
'societe',
'client',
'voir')) {
890 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
892 $sql .=
" WHERE f.fk_soc = s.rowid";
893 $sql .=
" AND f.entity IN (".getEntity(
'facture_fourn').
")";
895 $sql .=
" AND f.fk_soc = ".((int) $socid);
897 if (!$user->hasRight(
'societe',
'client',
'voir')) {
898 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
900 $sql .=
" ORDER BY f.tms DESC";
901 $sql .= $db->plimit($maxCount, 0);
903 $resql = $db->query($sql);
909 $num = $db->num_rows($resql);
911 $result =
'<div class="div-table-responsive-no-min">';
912 $result .=
'<table class="noborder centpercent">';
913 $result .=
'<tr class="liste_titre">';
914 $result .=
'<th colspan="3">'.$langs->trans(
"BoxTitleLastSupplierBills", $maxCount).
' ';
915 $result .=
'<a href="'.DOL_URL_ROOT.
'/fourn/facture/list.php?sortfield=f.tms&sortorder=DESC">';
916 $result .=
'<span class="badge">...</span>';
919 $result .=
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
920 $result .=
'<th class="right"></th>';
924 $result .=
'</table>';
930 $companystatic =
new Societe($db);
935 $obj = $db->fetch_object($resql);
937 $objectstatic->id = $obj->rowid;
938 $objectstatic->ref = $obj->ref;
939 $objectstatic->paye = $obj->paye;
940 $objectstatic->paid = $obj->paye;
941 $objectstatic->statut = $obj->status;
942 $objectstatic->status = $obj->status;
943 $objectstatic->total_ht = $obj->total_ht;
944 $objectstatic->total_tva = $obj->total_tva;
945 $objectstatic->total_ttc = $obj->total_ttc;
946 $objectstatic->type = $obj->type;
948 $companystatic->id = $obj->socid;
949 $companystatic->name = $obj->socname;
950 $companystatic->client = $obj->client;
951 $companystatic->canvas = $obj->canvas;
954 $filedir = $conf->propal->multidir_output[$obj->entity].
'/'.$filename;
956 $result .=
'<tr class="nowrap">';
958 $result .=
'<td class="oddeven">';
959 $result .=
'<table class="nobordernopadding">';
960 $result .=
'<tr class="nocellnopadd">';
962 $result .=
'<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).
'</td>';
963 $result .=
'<td width="16" class="nobordernopadding nowrap"> </td>';
964 $result .=
'<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).
'</td>';
967 $result .=
'</table>';
970 $result .=
'<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1,
'supplier').
'</td>';
972 $result .=
'<td>'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
974 $result .=
'<td class="amount right">'.price($obj->total_ttc).
'</td>';
976 $result .=
'<td class="right">'.$objectstatic->getLibStatut(5).
'</td>';
983 $result .=
'</table>';
997 global $conf, $db, $langs, $user, $hookmanager;
1001 if (isModEnabled(
'invoice') && $user->hasRight(
'facture',
'lire')) {
1002 $tmpinvoice =
new Facture($db);
1004 $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";
1005 $sql .=
", f.date_lim_reglement as datelimite";
1006 $sql .=
", s.nom as name";
1007 $sql .=
", s.rowid as socid, s.email";
1008 $sql .=
", s.code_client, s.code_compta";
1009 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1010 $sql .=
", cc.rowid as country_id, cc.code as country_code";
1011 $sql .=
", sum(pf.amount) as am";
1012 $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";
1013 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf on f.rowid=pf.fk_facture";
1014 if (!$user->hasRight(
'societe',
'client',
'voir')) {
1015 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1017 $sql .=
" WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED;
1018 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
1019 if (!$user->hasRight(
'societe',
'client',
'voir')) {
1020 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1023 $sql .=
" AND f.fk_soc = ".((int) $socid);
1026 $parameters = array();
1027 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerUnpaid', $parameters);
1028 $sql .= $hookmanager->resPrint;
1030 $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,";
1031 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
1032 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1033 $sql .=
" ORDER BY f.datef ASC, f.ref ASC";
1035 $resql = $db->query($sql);
1037 $num = $db->num_rows($resql);
1043 print
'<div class="div-table-responsive-no-min">';
1044 print
'<table class="noborder centpercent">';
1046 print
'<tr class="liste_titre">';
1047 print
'<th colspan="2">';
1048 print $langs->trans(
"BillsCustomersUnpaid", $num).
' ';
1050 print
'<span class="badge">'.$num.
'</span>';
1054 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1056 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1058 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1059 print
'<th class="right">'.$langs->trans(
"Received").
'</th>';
1060 print
'<th width="16"> </th>';
1063 $societestatic =
new Societe($db);
1064 $total_ttc = $totalam = $total = 0;
1066 $obj = $db->fetch_object($resql);
1068 if ($i >= $maxCount) {
1071 $total += $obj->total_ht;
1072 $total_ttc += $obj->total_ttc;
1073 $totalam += $obj->am;
1077 $tmpinvoice->ref = $obj->ref;
1078 $tmpinvoice->id = $obj->rowid;
1079 $tmpinvoice->total_ht = $obj->total_ht;
1080 $tmpinvoice->total_tva = $obj->total_tva;
1081 $tmpinvoice->total_ttc = $obj->total_ttc;
1082 $tmpinvoice->type = $obj->type;
1083 $tmpinvoice->statut = $obj->status;
1084 $tmpinvoice->paye = $obj->paye;
1085 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
1087 $societestatic->id = $obj->socid;
1088 $societestatic->name = $obj->name;
1089 $societestatic->email = $obj->email;
1090 $societestatic->country_id = $obj->country_id;
1091 $societestatic->country_code = $obj->country_code;
1092 $societestatic->client = 1;
1093 $societestatic->code_client = $obj->code_client;
1094 $societestatic->code_fournisseur = $obj->code_fournisseur;
1095 $societestatic->code_compta = $obj->code_compta;
1096 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1098 print
'<tr class="oddeven">';
1099 print
'<td class="nowrap">';
1101 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
1102 print
'<td class="nobordernopadding nowrap">';
1103 print $tmpinvoice->getNomUrl(1,
'');
1105 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
1108 $urlsource = $_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
1109 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
1110 print
'</td></tr></table>';
1113 print
'<td class="nowrap tdoverflowmax100">';
1114 print $societestatic->getNomUrl(1,
'customer');
1116 print
'<td class="right">';
1118 if ($tmpinvoice->hasDelay()) {
1123 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1125 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1126 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1127 print
'<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
1130 $total_ttc += $obj->total_ttc;
1131 $total += $obj->total_ht;
1132 $totalam += $obj->am;
1142 print
'<tr class="oddeven">';
1143 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1144 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1149 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>';
1150 print
'<td> </td>';
1152 print
'<td class="right"><span class="amount">'.price($total).
'</span></td>';
1154 print
'<td class="nowrap right"><span class="amount">'.price($total_ttc).
'</span></td>';
1155 print
'<td class="nowrap right"><span class="amount">'.price($totalam).
'</span></td>';
1156 print
'<td> </td>';
1163 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1165 print
'</table></div><br>';
1185 global $conf, $db, $langs, $user, $hookmanager;
1189 if (isModEnabled(
"supplier_invoice") && ($user->hasRight(
'fournisseur',
'facture',
'lire') || $user->hasRight(
'supplier_invoice',
'read'))) {
1192 $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";
1193 $sql .=
", ff.date_lim_reglement";
1194 $sql .=
", s.nom as name";
1195 $sql .=
", s.rowid as socid, s.email";
1196 $sql .=
", s.code_client, s.code_compta";
1197 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1198 $sql .=
", sum(pf.amount) as am";
1199 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
1200 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
1201 if (!$user->hasRight(
'societe',
'client',
'voir')) {
1202 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1204 $sql .=
" WHERE s.rowid = ff.fk_soc";
1205 $sql .=
" AND ff.entity = ".$conf->entity;
1206 $sql .=
" AND ff.paye = 0";
1207 $sql .=
" AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED;
1208 if (!$user->hasRight(
'societe',
'client',
'voir')) {
1209 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1212 $sql .=
" AND ff.fk_soc = ".((int) $socid);
1215 $parameters = array();
1216 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierUnpaid', $parameters);
1217 $sql .= $hookmanager->resPrint;
1219 $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,";
1220 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
1221 $sql .=
" ORDER BY ff.date_lim_reglement ASC";
1223 $resql = $db->query($sql);
1225 $num = $db->num_rows($resql);
1230 print
'<div class="div-table-responsive-no-min">';
1231 print
'<table class="noborder centpercent">';
1233 print
'<tr class="liste_titre">';
1234 print
'<th colspan="2">';
1235 print $langs->trans(
"BillsSuppliersUnpaid", $num).
' ';
1237 print
'<span class="badge">'.$num.
'</span>';
1241 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1243 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1245 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1246 print
'<th class="right">'.$langs->trans(
"Paid").
'</th>';
1247 print
'<th width="16"> </th>';
1249 $societestatic =
new Societe($db);
1252 $total = $total_ttc = $totalam = 0;
1254 $obj = $db->fetch_object($resql);
1256 if ($i >= $maxCount) {
1259 $total += $obj->total_ht;
1260 $total_ttc += $obj->total_ttc;
1264 $facstatic->ref = $obj->ref;
1265 $facstatic->id = $obj->rowid;
1266 $facstatic->type = $obj->type;
1267 $facstatic->total_ht = $obj->total_ht;
1268 $facstatic->total_tva = $obj->total_tva;
1269 $facstatic->total_ttc = $obj->total_ttc;
1270 $facstatic->statut = $obj->status;
1271 $facstatic->status = $obj->status;
1272 $facstatic->paid = $obj->paye;
1273 $facstatic->paye = $obj->paye;
1275 $societestatic->id = $obj->socid;
1276 $societestatic->name = $obj->name;
1277 $societestatic->email = $obj->email;
1278 $societestatic->client = 0;
1279 $societestatic->fournisseur = 1;
1280 $societestatic->code_client = $obj->code_client;
1281 $societestatic->code_fournisseur = $obj->code_fournisseur;
1282 $societestatic->code_compta = $obj->code_compta;
1283 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1285 print
'<tr class="oddeven">';
1286 print
'<td class="nowrap tdoverflowmax100">';
1287 print $facstatic->getNomUrl(1,
'');
1289 print
'<td class="nowrap tdoverflowmax100">'.$societestatic->getNomUrl(1,
'supplier').
'</td>';
1290 print
'<td class="right">'.dol_print_date($db->jdate($obj->date_lim_reglement),
'day').
'</td>';
1292 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1294 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1295 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1296 print
'<td>'.$facstatic->getLibStatut(3, $obj->am).
'</td>';
1298 $total += $obj->total_ht;
1299 $total_ttc += $obj->total_ttc;
1300 $totalam += $obj->am;
1309 print
'<tr class="oddeven">';
1310 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1311 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1316 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>';
1317 print
'<td> </td>';
1319 print
'<td class="right">'.price($total).
'</td>';
1321 print
'<td class="nowrap right">'.price($total_ttc).
'</td>';
1322 print
'<td class="nowrap right">'.price($totalam).
'</td>';
1323 print
'<td> </td>';
1330 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1332 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.