38 global $db, $langs, $conf, $user;
43 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/card.php?id='.$object->id;
44 $head[$h][1] = $langs->trans(
'CustomerInvoice');
45 $head[$h][2] =
'compta';
49 $nbContact = count($object->liste_contact(-1,
'internal')) + count($object->liste_contact(-1,
'external'));
50 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/contact.php?id='.urlencode($object->id);
51 $head[$h][1] = $langs->trans(
'ContactsAddresses');
53 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbContact.
'</span>';
55 $head[$h][2] =
'contact';
59 if (isModEnabled(
'prelevement')) {
60 $nbStandingOrders = 0;
61 $sql =
"SELECT COUNT(pfd.rowid) as nb";
62 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_demande as pfd";
63 $sql .=
" WHERE pfd.fk_facture = ".((int) $object->id);
64 $sql .=
" AND type = 'ban'";
65 $resql = $db->query($sql);
67 $obj = $db->fetch_object($resql);
69 $nbStandingOrders = $obj->nb;
74 $langs->load(
"banks");
76 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/prelevement.php?id='.urlencode($object->id);
77 $head[$h][1] = $langs->trans(
'StandingOrders');
78 if ($nbStandingOrders > 0) {
79 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbStandingOrders.
'</span>';
81 $head[$h][2] =
'standingorders';
93 if (!empty($object->note_private)) {
96 if (!empty($object->note_public)) {
99 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/note.php?id='.$object->id;
100 $head[$h][1] = $langs->trans(
'Notes');
102 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
104 $head[$h][2] =
'note';
108 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
109 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
111 if (!empty($conf->facture->multidir_output[$object->entity])) {
112 $upload_dir = $conf->facture->multidir_output[$object->entity].
"/".
dol_sanitizeFileName($object->ref);
114 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
115 $nbLinks =
Link::count($db, $object->element, $object->id);
116 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/document.php?id='.$object->id;
117 $head[$h][1] = $langs->trans(
'Documents');
118 if (($nbFiles + $nbLinks) > 0) {
119 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
121 $head[$h][2] =
'documents';
124 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/agenda.php?id='.$object->id;
125 $head[$h][1] = $langs->trans(
"Events");
126 if (isModEnabled(
'agenda')&& ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
129 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
130 $cachekey =
'count_events_facture_'.$object->id;
132 if (!is_null($dataretrieved)) {
133 $nbEvent = $dataretrieved;
135 $sql =
"SELECT COUNT(id) as nb";
136 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
137 $sql .=
" WHERE fk_element = ".((int) $object->id);
138 $sql .=
" AND elementtype = 'invoice'";
139 $resql = $db->query($sql);
141 $obj = $db->fetch_object($resql);
144 dol_syslog(
'Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
150 $head[$h][1] .= $langs->trans(
"Agenda");
152 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbEvent.
'</span>';
155 $head[$h][2] =
'agenda';
172 global $langs, $conf, $user, $db;
175 $extrafields->fetch_name_optionals_label(
'facture');
176 $extrafields->fetch_name_optionals_label(
'facturedet');
177 $extrafields->fetch_name_optionals_label(
'facture_rec');
178 $extrafields->fetch_name_optionals_label(
'facturedet_rec');
183 $head[$h][0] = DOL_URL_ROOT.
'/admin/facture.php';
184 $head[$h][1] = $langs->trans(
"Miscellaneous");
185 $head[$h][2] =
'general';
188 $head[$h][0] = DOL_URL_ROOT.
'/admin/payment.php';
189 $head[$h][1] = $langs->trans(
"Payments");
190 $head[$h][2] =
'payment';
199 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/facture_cust_extrafields.php';
200 $head[$h][1] = $langs->trans(
"ExtraFieldsCustomerInvoices");
201 $nbExtrafields = $extrafields->attributes[
'facture'][
'count'];
202 if ($nbExtrafields > 0) {
203 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
205 $head[$h][2] =
'attributes';
208 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/facturedet_cust_extrafields.php';
209 $head[$h][1] = $langs->trans(
"ExtraFieldsLines");
210 $nbExtrafields = $extrafields->attributes[
'facturedet'][
'count'];
211 if ($nbExtrafields > 0) {
212 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
214 $head[$h][2] =
'attributeslines';
217 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/facture_rec_cust_extrafields.php';
218 $head[$h][1] = $langs->trans(
"ExtraFieldsCustomerInvoicesRec");
219 $nbExtrafields = $extrafields->attributes[
'facture_rec'][
'count'];
220 if ($nbExtrafields > 0) {
221 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
223 $head[$h][2] =
'attributesrec';
226 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/admin/facturedet_rec_cust_extrafields.php';
227 $head[$h][1] = $langs->trans(
"ExtraFieldsLinesRec");
228 $nbExtrafields = $extrafields->attributes[
'facturedet_rec'][
'count'];
229 if ($nbExtrafields > 0) {
230 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
232 $head[$h][2] =
'attributeslinesrec';
236 $head[$h][0] = DOL_URL_ROOT.
'/admin/facture_situation.php';
237 $head[$h][1] = $langs->trans(
"InvoiceSituation");
238 $head[$h][2] =
'situation';
256 global $db, $langs, $conf, $user;
261 $head[$h][0] = DOL_URL_ROOT .
'/compta/facture/card-rec.php?id=' . $object->id;
262 $head[$h][1] = $langs->trans(
"RepeatableInvoice");
263 $head[$h][2] =
'card';
266 $head[$h][0] = DOL_URL_ROOT.
'/compta/facture/agenda-rec.php?id='.$object->id;
267 $head[$h][1] = $langs->trans(
"Events");
268 if (isModEnabled(
'agenda')&& ($user->hasRight(
'agenda',
'myactions',
'read') || $user->hasRight(
'agenda',
'allactions',
'read'))) {
271 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
272 $cachekey =
'count_events_facturerec_'.$object->id;
274 if (!is_null($dataretrieved)) {
275 $nbEvent = $dataretrieved;
277 $sql =
"SELECT COUNT(id) as nb";
278 $sql .=
" FROM ".MAIN_DB_PREFIX.
"actioncomm";
279 $sql .=
" WHERE fk_element = ".((int) $object->id);
280 $sql .=
" AND elementtype = 'invoicerec'";
281 $resql = $db->query($sql);
283 $obj = $db->fetch_object($resql);
286 dol_syslog(
'Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
292 $head[$h][1] .= $langs->trans(
"Agenda");
294 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbEvent.
'</span>';
297 $head[$h][2] =
'agenda';
319 global $db, $langs, $conf;
324 $head[$h][0] = DOL_URL_ROOT .
'/fourn/facture/card-rec.php?id=' . $object->id;
325 $head[$h][1] = $langs->trans(
"RepeatableSupplierInvoice");
326 $head[$h][2] =
'card';
348 global $conf, $db, $langs, $user;
350 if (($mode ==
'customers' && isModEnabled(
'facture') && $user->hasRight(
'facture',
'lire'))
351 || ($mode ==
'suppliers' && (isModEnabled(
'fournisseur') || isModEnabled(
'supplier_invoice')) && $user->hasRight(
'fournisseur',
'facture',
'lire'))
353 global $badgeStatus1, $badgeStatus3, $badgeStatus4, $badgeStatus8, $badgeStatus11;
354 include DOL_DOCUMENT_ROOT.
'/theme/'.$conf->theme.
'/theme_vars.inc.php';
356 $now = date_create(date(
'Y-m-d',
dol_now()));
357 $datenowsub30 = date_create(date(
'Y-m-d',
dol_now()));
358 $datenowsub15 = date_create(date(
'Y-m-d',
dol_now()));
359 $datenowadd30 = date_create(date(
'Y-m-d',
dol_now()));
360 $datenowadd15 = date_create(date(
'Y-m-d',
dol_now()));
361 $interval30days = date_interval_create_from_date_string(
'30 days');
362 $interval15days = date_interval_create_from_date_string(
'15 days');
363 date_sub($datenowsub30, $interval30days);
364 date_sub($datenowsub15, $interval15days);
365 date_add($datenowadd30, $interval30days);
366 date_add($datenowadd15, $interval15days);
369 $sql .=
" sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($datenowsub30,
'Y-m-d').
"'", 1, 0).
") as nblate30";
370 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($datenowsub15,
'Y-m-d').
"'", 1, 0).
") as nblate15";
371 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement < '".date_format($now,
'Y-m-d').
"'", 1, 0).
") as nblatenow";
372 $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";
373 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement > '".date_format($datenowadd15,
'Y-m-d').
"'", 1, 0).
") as nbnotlate15";
374 $sql .=
", sum(".$db->ifsql(
"f.date_lim_reglement > '".date_format($datenowadd30,
'Y-m-d').
"'", 1, 0).
") as nbnotlate30";
375 if ($mode ==
'customers') {
376 $element =
'invoice';
377 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture as f";
378 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
379 $element =
'supplier_invoice';
380 $sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn as f";
384 $sql .=
" WHERE f.entity IN (".getEntity($element).
")";
385 $sql .=
" AND f.type <> 2";
386 $sql .=
" AND f.fk_statut = 1";
387 if (isset($user->socid) && $user->socid > 0) {
388 $sql .=
" AND f.fk_soc = ".((int) $user->socid);
391 $resql = $db->query($sql);
393 $num = $db->num_rows($resql);
396 $dataseries = array();
399 $obj = $db->fetch_object($resql);
408 $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);
411 if (!empty($dataseries[0])) {
412 foreach ($dataseries[0] as $key => $value) {
413 if (is_numeric($value)) {
419 $langs->trans(
'InvoiceLate30Days'),
420 $langs->trans(
'InvoiceLate15Days'),
421 $langs->trans(
'InvoiceLateMinus15Days'),
422 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate') : $langs->trans(
"InvoiceToPay"),
423 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate15Days') : $langs->trans(
"InvoiceToPay15Days"),
424 $mode ==
'customers' ? $langs->trans(
'InvoiceNotLate30Days') : $langs->trans(
"InvoiceToPay30Days"),
427 $colorseries = array($badgeStatus8, $badgeStatus1, $badgeStatus3, $badgeStatus4, $badgeStatus11,
'-'.$badgeStatus11);
429 $result =
'<div class="div-table-responsive-no-min">';
430 $result .=
'<table class="noborder nohover centpercent">';
431 $result .=
'<tr class="liste_titre">';
432 $result .=
'<td>'.$langs->trans(
"NbOfOpenInvoices").
' - ';
433 if ($mode ==
'customers') {
434 $result .= $langs->trans(
"CustomerInvoice");
435 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
436 $result .= $langs->trans(
"SupplierInvoice");
443 if ($conf->use_javascript_ajax) {
446 $dolgraph->SetData($dataseries);
448 $dolgraph->setLegend($legend);
450 $dolgraph->SetDataColor(array_values($colorseries));
451 $dolgraph->setShowLegend(2);
452 $dolgraph->setShowPercent(1);
453 $dolgraph->SetType(array(
'bars',
'bars',
'bars',
'bars',
'bars',
'bars'));
455 $dolgraph->setHeight(
'160');
456 $dolgraph->setWidth(
'450');
457 $dolgraph->setHideXValues(
true);
458 if ($mode ==
'customers') {
459 $dolgraph->draw(
'idgraphcustomerinvoices');
460 } elseif ($mode ==
'fourn' || $mode ==
'suppliers') {
461 $dolgraph->draw(
'idgraphfourninvoices');
465 $result .=
'<tr maxwidth="255">';
466 $result .=
'<td class="center">'.$dolgraph->show($total ? 0 : $langs->trans(
"NoOpenInvoice")).
'</td>';
472 $result .=
'</table>';
492 global $conf, $db, $langs, $user, $hookmanager;
496 if (isModEnabled(
'facture') && $user->hasRight(
'facture',
'lire')) {
497 $maxofloop = (!
getDolGlobalString(
'MAIN_MAXLIST_OVERLOAD') ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD);
499 $tmpinvoice =
new Facture($db);
501 $sql =
"SELECT f.rowid, f.ref, f.datef as date, f.total_ht, f.total_tva, f.total_ttc, f.ref_client";
502 $sql .=
", f.type, f.fk_statut as status, f.paye";
503 $sql .=
", s.nom as name";
504 $sql .=
", s.rowid as socid, s.email";
505 $sql .=
", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur";
506 $sql .=
", cc.rowid as country_id, cc.code as country_code";
507 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
508 $sql .=
", sc.fk_soc, sc.fk_user ";
510 $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";
511 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
512 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
514 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT;
515 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
516 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
517 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
521 $sql .=
" AND f.fk_soc = ".((int) $socid);
524 $parameters = array();
525 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerDraft', $parameters);
526 $sql .= $hookmanager->resPrint;
528 $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,";
529 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
530 $sql .=
" cc.rowid, cc.code";
531 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
532 $sql .=
", sc.fk_soc, sc.fk_user";
536 $parameters = array();
537 $reshook = $hookmanager->executeHooks(
'printFieldListGroupByCustomerDraft', $parameters);
538 $sql .= $hookmanager->resPrint;
540 $resql = $db->query($sql);
543 $num = $db->num_rows($resql);
544 $nbofloop = min($num, $maxofloop);
546 $result .=
'<div class="div-table-responsive-no-min">';
547 $result .=
'<table class="noborder centpercent">';
549 $result .=
'<tr class="liste_titre">';
550 $result .=
'<th colspan="3">';
551 $result .= $langs->trans(
"CustomersDraftInvoices").
' ';
552 $result .=
'<a href="'.DOL_URL_ROOT.
'/compta/facture/list.php?search_status='.
Facture::STATUS_DRAFT.
'">';
553 $result .=
'<span class="badge marginleftonlyshort">'.$num.
'</span>';
559 $companystatic =
new Societe($db);
564 while ($i < $nbofloop) {
565 $obj = $db->fetch_object($resql);
567 if ($i >= $maxCount) {
570 $tot_ttc += $obj->total_ttc;
574 $tmpinvoice->id = $obj->rowid;
575 $tmpinvoice->ref = $obj->ref;
576 $tmpinvoice->date = $db->jdate($obj->date);
577 $tmpinvoice->type = $obj->type;
578 $tmpinvoice->total_ht = $obj->total_ht;
579 $tmpinvoice->total_tva = $obj->total_tva;
580 $tmpinvoice->total_ttc = $obj->total_ttc;
581 $tmpinvoice->ref_client = $obj->ref_client;
582 $tmpinvoice->statut = $obj->status;
583 $tmpinvoice->paye = $obj->paye;
585 $companystatic->id = $obj->socid;
586 $companystatic->name = $obj->name;
587 $companystatic->email = $obj->email;
588 $companystatic->country_id = $obj->country_id;
589 $companystatic->country_code = $obj->country_code;
590 $companystatic->client = 1;
591 $companystatic->code_client = $obj->code_client;
592 $companystatic->code_fournisseur = $obj->code_fournisseur;
593 $companystatic->code_compta = $obj->code_compta;
594 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
596 $result .=
'<tr class="oddeven">';
597 $result .=
'<td class="nowrap tdoverflowmax100">';
598 $result .= $tmpinvoice->getNomUrl(1,
'');
600 $result .=
'<td class="nowrap tdoverflowmax100">';
601 $result .= $companystatic->getNomUrl(1,
'customer');
603 $result .=
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
605 $tot_ttc += $obj->total_ttc;
610 $result .=
'<tr class="oddeven">';
611 $result .=
'<td class="nowrap" colspan="3">';
612 $result .=
'<span class="opacitymedium">'.$langs->trans(
"More").
'...'.($othernb < $maxofloop ?
' ('.$othernb.
')' :
'').
'</span>';
614 $result .=
"</tr>\n";
617 $result .=
'<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
618 $result .=
'<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
621 $result .=
'<tr class="oddeven"><td colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</span></td></tr>';
623 $result .=
"</table></div>";
642 global $conf, $db, $langs, $user, $hookmanager;
646 if ((isModEnabled(
'fournisseur') || isModEnabled(
'supplier_invoice')) && $user->hasRight(
'facture',
'lire')) {
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 (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
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 (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
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 marginleftonlyshort">'.$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->paye = $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') && !$socid) {
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') && !$socid) {
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') && !$socid) {
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') && !$socid) {
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).
'</th>';
915 $result .=
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
916 $result .=
'<th class="right"></th>';
920 $result .=
'</table>';
926 $companystatic =
new Societe($db);
931 $obj = $db->fetch_object($resql);
933 $objectstatic->id = $obj->rowid;
934 $objectstatic->ref = $obj->ref;
935 $objectstatic->paye = $obj->paye;
936 $objectstatic->statut = $obj->status;
937 $objectstatic->total_ht = $obj->total_ht;
938 $objectstatic->total_tva = $obj->total_tva;
939 $objectstatic->total_ttc = $obj->total_ttc;
940 $objectstatic->type = $obj->type;
942 $companystatic->id = $obj->socid;
943 $companystatic->name = $obj->socname;
944 $companystatic->client = $obj->client;
945 $companystatic->canvas = $obj->canvas;
948 $filedir = $conf->propal->multidir_output[$obj->entity].
'/'.$filename;
950 $result .=
'<tr class="nowrap">';
952 $result .=
'<td class="oddeven">';
953 $result .=
'<table class="nobordernopadding">';
954 $result .=
'<tr class="nocellnopadd">';
956 $result .=
'<td width="96" class="nobordernopadding nowrap">'.$objectstatic->getNomUrl(1).
'</td>';
957 $result .=
'<td width="16" class="nobordernopadding nowrap"> </td>';
958 $result .=
'<td width="16" class="nobordernopadding right">'.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).
'</td>';
961 $result .=
'</table>';
964 $result .=
'<td class="tdoverflowmax150">'.$companystatic->getNomUrl(1,
'supplier').
'</td>';
966 $result .=
'<td>'.dol_print_date($db->jdate($obj->datec),
'day').
'</td>';
968 $result .=
'<td class="amount right">'.price($obj->total_ttc).
'</td>';
970 $result .=
'<td class="right">'.$objectstatic->getLibStatut(5).
'</td>';
977 $result .=
'</table>';
991 global $conf, $db, $langs, $user, $hookmanager;
995 if (isModEnabled(
'facture') && $user->hasRight(
'facture',
'lire')) {
996 $tmpinvoice =
new Facture($db);
998 $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";
999 $sql .=
", f.date_lim_reglement as datelimite";
1000 $sql .=
", s.nom as name";
1001 $sql .=
", s.rowid as socid, s.email";
1002 $sql .=
", s.code_client, s.code_compta";
1003 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1004 $sql .=
", cc.rowid as country_id, cc.code as country_code";
1005 $sql .=
", sum(pf.amount) as am";
1006 $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";
1007 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf on f.rowid=pf.fk_facture";
1008 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
1009 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1011 $sql .=
" WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED;
1012 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
1013 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
1014 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1017 $sql .=
" AND f.fk_soc = ".((int) $socid);
1020 $parameters = array();
1021 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerUnpaid', $parameters);
1022 $sql .= $hookmanager->resPrint;
1024 $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,";
1025 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
1026 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1027 $sql .=
" ORDER BY f.datef ASC, f.ref ASC";
1029 $resql = $db->query($sql);
1031 $num = $db->num_rows($resql);
1037 print
'<div class="div-table-responsive-no-min">';
1038 print
'<table class="noborder centpercent">';
1040 print
'<tr class="liste_titre">';
1041 print
'<th colspan="2">';
1042 print $langs->trans(
"BillsCustomersUnpaid", $num).
' ';
1044 print
'<span class="badge">'.$num.
'</span>';
1048 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1050 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1052 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1053 print
'<th class="right">'.$langs->trans(
"Received").
'</th>';
1054 print
'<th width="16"> </th>';
1057 $societestatic =
new Societe($db);
1058 $total_ttc = $totalam = $total = 0;
1060 $obj = $db->fetch_object($resql);
1062 if ($i >= $maxCount) {
1065 $total += $obj->total_ht;
1066 $total_ttc += $obj->total_ttc;
1067 $totalam += $obj->am;
1071 $tmpinvoice->ref = $obj->ref;
1072 $tmpinvoice->id = $obj->rowid;
1073 $tmpinvoice->total_ht = $obj->total_ht;
1074 $tmpinvoice->total_tva = $obj->total_tva;
1075 $tmpinvoice->total_ttc = $obj->total_ttc;
1076 $tmpinvoice->type = $obj->type;
1077 $tmpinvoice->statut = $obj->status;
1078 $tmpinvoice->paye = $obj->paye;
1079 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
1081 $societestatic->id = $obj->socid;
1082 $societestatic->name = $obj->name;
1083 $societestatic->email = $obj->email;
1084 $societestatic->country_id = $obj->country_id;
1085 $societestatic->country_code = $obj->country_code;
1086 $societestatic->client = 1;
1087 $societestatic->code_client = $obj->code_client;
1088 $societestatic->code_fournisseur = $obj->code_fournisseur;
1089 $societestatic->code_compta = $obj->code_compta;
1090 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1092 print
'<tr class="oddeven">';
1093 print
'<td class="nowrap">';
1095 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
1096 print
'<td class="nobordernopadding nowrap">';
1097 print $tmpinvoice->getNomUrl(1,
'');
1099 print
'<td width="16" class="nobordernopadding hideonsmartphone right">';
1102 $urlsource = $_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
1103 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
1104 print
'</td></tr></table>';
1107 print
'<td class="nowrap tdoverflowmax100">';
1108 print $societestatic->getNomUrl(1,
'customer');
1110 print
'<td class="right">';
1112 if ($tmpinvoice->hasDelay()) {
1117 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1119 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1120 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1121 print
'<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
1124 $total_ttc += $obj->total_ttc;
1125 $total += $obj->total_ht;
1126 $totalam += $obj->am;
1136 print
'<tr class="oddeven">';
1137 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1138 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1143 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>';
1144 print
'<td> </td>';
1146 print
'<td class="right"><span class="amount">'.price($total).
'</span></td>';
1148 print
'<td class="nowrap right"><span class="amount">'.price($total_ttc).
'</span></td>';
1149 print
'<td class="nowrap right"><span class="amount">'.price($totalam).
'</span></td>';
1150 print
'<td> </td>';
1157 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1159 print
'</table></div><br>';
1179 global $conf, $db, $langs, $user, $hookmanager;
1183 if (isModEnabled(
"supplier_invoice") && ($user->hasRight(
'fournisseur',
'facture',
'lire') || $user->hasRight(
'supplier_invoice',
'read'))) {
1186 $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";
1187 $sql .=
", ff.date_lim_reglement";
1188 $sql .=
", s.nom as name";
1189 $sql .=
", s.rowid as socid, s.email";
1190 $sql .=
", s.code_client, s.code_compta";
1191 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1192 $sql .=
", sum(pf.amount) as am";
1193 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
1194 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
1195 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
1196 $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1198 $sql .=
" WHERE s.rowid = ff.fk_soc";
1199 $sql .=
" AND ff.entity = ".$conf->entity;
1200 $sql .=
" AND ff.paye = 0";
1201 $sql .=
" AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED;
1202 if (!$user->hasRight(
'societe',
'client',
'voir') && !$socid) {
1203 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
1206 $sql .=
" AND ff.fk_soc = ".((int) $socid);
1209 $parameters = array();
1210 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierUnpaid', $parameters);
1211 $sql .= $hookmanager->resPrint;
1213 $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,";
1214 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
1215 $sql .=
" ORDER BY ff.date_lim_reglement ASC";
1217 $resql = $db->query($sql);
1219 $num = $db->num_rows($resql);
1224 print
'<div class="div-table-responsive-no-min">';
1225 print
'<table class="noborder centpercent">';
1227 print
'<tr class="liste_titre">';
1228 print
'<th colspan="2">';
1229 print $langs->trans(
"BillsSuppliersUnpaid", $num).
' ';
1231 print
'<span class="badge">'.$num.
'</span>';
1235 print
'<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1237 print
'<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1239 print
'<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1240 print
'<th class="right">'.$langs->trans(
"Paid").
'</th>';
1241 print
'<th width="16"> </th>';
1243 $societestatic =
new Societe($db);
1246 $total = $total_ttc = $totalam = 0;
1248 $obj = $db->fetch_object($resql);
1250 if ($i >= $maxCount) {
1253 $total += $obj->total_ht;
1254 $total_ttc += $obj->total_ttc;
1258 $facstatic->ref = $obj->ref;
1259 $facstatic->id = $obj->rowid;
1260 $facstatic->type = $obj->type;
1261 $facstatic->total_ht = $obj->total_ht;
1262 $facstatic->total_tva = $obj->total_tva;
1263 $facstatic->total_ttc = $obj->total_ttc;
1264 $facstatic->statut = $obj->status;
1265 $facstatic->paye = $obj->paye;
1267 $societestatic->id = $obj->socid;
1268 $societestatic->name = $obj->name;
1269 $societestatic->email = $obj->email;
1270 $societestatic->client = 0;
1271 $societestatic->fournisseur = 1;
1272 $societestatic->code_client = $obj->code_client;
1273 $societestatic->code_fournisseur = $obj->code_fournisseur;
1274 $societestatic->code_compta = $obj->code_compta;
1275 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1277 print
'<tr class="oddeven">';
1278 print
'<td class="nowrap tdoverflowmax100">';
1279 print $facstatic->getNomUrl(1,
'');
1281 print
'<td class="nowrap tdoverflowmax100">'.$societestatic->getNomUrl(1,
'supplier').
'</td>';
1282 print
'<td class="right">'.dol_print_date($db->jdate($obj->date_lim_reglement),
'day').
'</td>';
1284 print
'<td class="right"><span class="amount">'.price($obj->total_ht).
'</span></td>';
1286 print
'<td class="nowrap right"><span class="amount">'.price($obj->total_ttc).
'</span></td>';
1287 print
'<td class="nowrap right"><span class="amount">'.price($obj->am).
'</span></td>';
1288 print
'<td>'.$facstatic->getLibStatut(3, $obj->am).
'</td>';
1290 $total += $obj->total_ht;
1291 $total_ttc += $obj->total_ttc;
1292 $totalam += $obj->am;
1301 print
'<tr class="oddeven">';
1302 print
'<td class="nowrap" colspan="'.$colspan.
'">';
1303 print
'<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1308 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>';
1309 print
'<td> </td>';
1311 print
'<td class="right">'.price($total).
'</td>';
1313 print
'<td class="nowrap right">'.price($total_ttc).
'</td>';
1314 print
'<td class="nowrap right">'.price($totalam).
'</td>';
1315 print
'<td> </td>';
1322 print
'<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1324 print
'</table></div><br>';
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($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.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
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 informations.
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 informations.
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 informations.
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.