33 require
'../main.inc.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
36 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
49 $langs->loadLangs(array(
'compta',
'bills'));
50 if (!empty($conf->commande->enabled))
51 $langs->load(
"orders");
53 $action =
GETPOST(
'action',
'aZ09');
61 $socid = $user->socid;
64 $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
67 $hookmanager->initHooks(array(
'invoiceindex'));
80 $form =
new Form($db);
82 $thirdpartystatic =
new Societe($db);
84 llxHeader(
"", $langs->trans(
"AccountancyTreasuryArea"));
89 print '<div class="fichecenter"><div class="fichethirdleft">';
92 if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS))
95 if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
97 $listofsearchfields[
'search_invoice'] = array(
'text'=>
'CustomerInvoice');
100 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire)
102 $listofsearchfields[
'search_supplier_invoice'] = array(
'text'=>
'SupplierInvoice');
104 if (!empty($conf->don->enabled) && $user->rights->don->lire)
106 $langs->load(
"donations");
107 $listofsearchfields[
'search_donation'] = array(
'text'=>
'Donation');
110 if (count($listofsearchfields))
112 print '<form method="post" action="'.DOL_URL_ROOT.
'/core/search.php">';
113 print '<input type="hidden" name="token" value="'.newToken().
'">';
114 print '<div class="div-table-responsive-no-min">';
115 print '<table class="noborder nohover centpercent">';
117 foreach ($listofsearchfields as $key => $value)
119 if ($i == 0)
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans(
"Search").
'</td></tr>';
120 print '<tr '.$bc[
false].
'>';
121 print '<td class="nowrap"><label for="'.$key.
'">'.$langs->trans($value[
"text"]).
'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.
'" id="'.$key.
'"></td>';
122 if ($i == 0)
print '<td rowspan="'.count($listofsearchfields).
'"><input type="submit" value="'.$langs->trans(
"Search").
'" class="button"></td>';
137 if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
139 $tmpinvoice =
new Facture($db);
141 $sql =
"SELECT f.rowid, f.ref, f.datef as date, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.ref_client";
142 $sql .=
", f.type, f.fk_statut as status, f.paye";
143 $sql .=
", s.nom as name";
144 $sql .=
", s.rowid as socid, s.email";
145 $sql .=
", s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur";
146 $sql .=
", cc.rowid as country_id, cc.code as country_code";
147 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", sc.fk_soc, sc.fk_user ";
148 $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";
149 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
150 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT;
151 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
152 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
156 $sql .=
" AND f.fk_soc = $socid";
159 $parameters = array();
160 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerDraft', $parameters);
161 $sql .= $hookmanager->resPrint;
163 $sql .=
" GROUP BY f.rowid, f.ref, f.datef, f.total, f.tva, f.total_ttc, f.ref_client, f.type, f.fk_statut, f.paye,";
164 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur,";
165 $sql .=
" cc.rowid, cc.code";
166 if (!$user->rights->societe->client->voir && !$socid) $sql.=
", sc.fk_soc, sc.fk_user";
169 $parameters = array();
170 $reshook = $hookmanager->executeHooks(
'printFieldListGroupByCustomerDraft', $parameters);
171 $sql .= $hookmanager->resPrint;
173 $resql = $db->query($sql);
177 $num = $db->num_rows(
$resql);
179 print '<div class="div-table-responsive-no-min">';
180 print '<table class="noborder centpercent">';
182 print '<tr class="liste_titre">';
183 print '<th colspan="3">';
184 print $langs->trans(
"CustomersDraftInvoices").
' ';
186 print '<span class="badge marginleftonlyshort">'.$num.
'</span>';
193 $companystatic =
new Societe($db);
199 $obj = $db->fetch_object(
$resql);
201 $tmpinvoice->id = $obj->rowid;
202 $tmpinvoice->ref = $obj->ref;
203 $tmpinvoice->date = $db->jdate($obj->date);
204 $tmpinvoice->type = $obj->type;
205 $tmpinvoice->total_ht = $obj->total_ht;
206 $tmpinvoice->total_tva = $obj->total_tva;
207 $tmpinvoice->total_ttc = $obj->total_ttc;
208 $tmpinvoice->ref_client = $obj->ref_client;
209 $tmpinvoice->statut = $obj->status;
210 $tmpinvoice->paye = $obj->paye;
212 $companystatic->id = $obj->socid;
213 $companystatic->name = $obj->name;
214 $companystatic->email = $obj->email;
215 $companystatic->country_id = $obj->country_id;
216 $companystatic->country_code = $obj->country_code;
217 $companystatic->client = 1;
218 $companystatic->code_client = $obj->code_client;
219 $companystatic->code_fournisseur = $obj->code_fournisseur;
220 $companystatic->code_compta = $obj->code_compta;
221 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
223 print '<tr class="oddeven"><td class="nowrap tdoverflowmax100">';
224 print $tmpinvoice->getNomUrl(1,
'');
226 print '<td class="nowrap tdoverflowmax100">';
227 print $companystatic->getNomUrl(1,
'customer');
229 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
231 $tot_ttc += $obj->total_ttc;
235 print '<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
236 print '<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
239 print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
241 print "</table></div><br>";
251 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
255 $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";
256 $sql .=
", s.nom as name";
257 $sql .=
", s.rowid as socid, s.email";
258 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
259 $sql .=
", cc.rowid as country_id, cc.code as country_code";
260 $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";
261 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
262 $sql .=
" WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT;
263 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
264 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
265 if ($socid) $sql .=
" AND f.fk_soc = ".$socid;
267 $parameters = array();
268 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierDraft', $parameters);
269 $sql .= $hookmanager->resPrint;
270 $resql = $db->query($sql);
274 $num = $db->num_rows(
$resql);
276 print '<div class="div-table-responsive-no-min">';
277 print '<table class="noborder centpercent">';
279 print '<tr class="liste_titre">';
280 print '<th colspan="3">';
281 print $langs->trans(
"SuppliersDraftInvoices").
' ';
283 print '<span class="badge marginleftonlyshort">'.$num.
'</span>';
290 $companystatic =
new Societe($db);
296 $obj = $db->fetch_object(
$resql);
298 $facturesupplierstatic->ref = $obj->ref;
299 $facturesupplierstatic->id = $obj->rowid;
300 $facturesupplierstatic->total_ht = $obj->total_ht;
301 $facturesupplierstatic->total_tva = $obj->total_tva;
302 $facturesupplierstatic->total_ttc = $obj->total_ttc;
303 $facturesupplierstatic->ref_supplier = $obj->ref_supplier;
304 $facturesupplierstatic->type = $obj->type;
305 $facturesupplierstatic->statut = $obj->status;
306 $facturesupplierstatic->paye = $obj->paye;
308 $companystatic->id = $obj->socid;
309 $companystatic->name = $obj->name;
310 $companystatic->email = $obj->email;
311 $companystatic->country_id = $obj->country_id;
312 $companystatic->country_code = $obj->country_code;
313 $companystatic->fournisseur = 1;
314 $companystatic->code_client = $obj->code_client;
315 $companystatic->code_fournisseur = $obj->code_fournisseur;
316 $companystatic->code_compta = $obj->code_compta;
317 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
319 print '<tr class="oddeven"><td class="nowrap tdoverflowmax100">';
320 print $facturesupplierstatic->getNomUrl(1,
'');
322 print '<td class="nowrap tdoverflowmax100">';
323 print $companystatic->getNomUrl(1,
'supplier');
325 print '<td class="right">'.price($obj->total_ttc).
'</td>';
327 $tot_ttc += $obj->total_ttc;
331 print '<tr class="liste_total"><td class="left">'.$langs->trans(
"Total").
'</td>';
332 print '<td colspan="2" class="right">'.price($tot_ttc).
'</td>';
335 print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
337 print "</table></div><br>";
345 print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
349 if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
351 $langs->load(
"boxes");
352 $tmpinvoice =
new Facture($db);
354 $sql =
"SELECT f.rowid, f.ref, f.fk_statut as status, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms";
355 $sql .=
", f.date_lim_reglement as datelimite";
356 $sql .=
", s.nom as name";
357 $sql .=
", s.rowid as socid";
358 $sql .=
", s.code_client, s.code_compta, s.email";
359 $sql .=
", cc.rowid as country_id, cc.code as country_code";
360 $sql .=
", sum(pf.amount) as am";
361 $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";
362 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf on f.rowid=pf.fk_facture";
363 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
364 $sql .=
" WHERE s.rowid = f.fk_soc";
365 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
")";
366 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
367 if ($socid) $sql .=
" AND f.fk_soc = ".$socid;
369 $parameters = array();
370 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerLastModified', $parameters);
371 $sql .= $hookmanager->resPrint;
373 $sql .=
" GROUP BY f.rowid, f.ref, f.fk_statut, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
374 $sql .=
" s.nom, s.rowid, s.code_client, s.code_compta, s.email,";
375 $sql .=
" cc.rowid, cc.code";
376 $sql .=
" ORDER BY f.tms DESC";
377 $sql .= $db->plimit($max, 0);
379 $resql = $db->query($sql);
382 $num = $db->num_rows(
$resql);
386 print '<div class="div-table-responsive-no-min">';
387 print '<table class="noborder centpercent">';
388 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastCustomerBills", $max).
'</th>';
389 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
390 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
391 print '<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
392 print '<th width="16"> </th>';
396 $total_ttc = $totalam = $total = 0;
397 while ($i < $num && $i < $conf->liste_limit)
399 $obj = $db->fetch_object(
$resql);
404 $total += $obj->total_ht;
405 $total_ttc += $obj->total_ttc;
409 $tmpinvoice->ref = $obj->ref;
410 $tmpinvoice->id = $obj->rowid;
411 $tmpinvoice->total_ht = $obj->total_ht;
412 $tmpinvoice->total_tva = $obj->total_tva;
413 $tmpinvoice->total_ttc = $obj->total_ttc;
414 $tmpinvoice->statut = $obj->status;
415 $tmpinvoice->paye = $obj->paye;
416 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
417 $tmpinvoice->type = $obj->type;
419 $thirdpartystatic->id = $obj->socid;
420 $thirdpartystatic->name = $obj->name;
421 $thirdpartystatic->email = $obj->email;
422 $thirdpartystatic->country_id = $obj->country_id;
423 $thirdpartystatic->country_code = $obj->country_code;
424 $thirdpartystatic->email = $obj->email;
425 $thirdpartystatic->client = 1;
426 $thirdpartystatic->code_client = $obj->code_client;
428 $thirdpartystatic->code_compta = $obj->code_compta;
431 print '<tr class="oddeven">';
432 print '<td class="nowrap">';
434 print '<table class="nobordernopadding"><tr class="nocellnopadd">';
435 print '<td class="nobordernopadding nowraponall">';
436 print $tmpinvoice->getNomUrl(1,
'');
438 print '<td width="20" class="nobordernopadding nowrap">';
439 if ($tmpinvoice->hasDelay()) {
443 print '<td width="16" class="nobordernopadding hideonsmartphone right">';
446 $urlsource =
$_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
447 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
448 print '</td></tr></table>';
451 print '<td class="left">';
452 print $thirdpartystatic->getNomUrl(1,
'customer', 44);
454 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="nowrap right">'.price($obj->total_ht).
'</td>';
455 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
456 print '<td class="right">'.dol_print_date($db->jdate($obj->tms),
'day').
'</td>';
457 print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
460 $total_ttc += $obj->total_ttc;
461 $total += $obj->total_ht;
462 $totalam += $obj->am;
468 print '<tr class="oddeven">';
469 print '<td class="nowrap" colspan="5">';
470 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
476 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
477 print '<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
479 print '</table></div><br>';
489 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
491 $langs->load(
"boxes");
494 $sql =
"SELECT ff.rowid, ff.ref, ff.fk_statut as status, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.tms, ff.paye";
495 $sql .=
", s.nom as name";
496 $sql .=
", s.rowid as socid";
497 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur, s.email";
498 $sql .=
", SUM(pf.amount) as am";
499 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
500 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
501 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
502 $sql .=
" WHERE s.rowid = ff.fk_soc";
503 $sql .=
" AND ff.entity = ".$conf->entity;
504 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
505 if ($socid) $sql .=
" AND ff.fk_soc = ".$socid;
507 $parameters = array();
508 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierLastModified', $parameters);
509 $sql .= $hookmanager->resPrint;
511 $sql .=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.tms, ff.paye,";
512 $sql .=
" s.nom, s.rowid, s.code_fournisseur, s.code_compta_fournisseur, s.email";
513 $sql .=
" ORDER BY ff.tms DESC ";
514 $sql .= $db->plimit($max, 0);
516 $resql = $db->query($sql);
519 $num = $db->num_rows(
$resql);
521 print '<div class="div-table-responsive-no-min">';
522 print '<table class="noborder centpercent">';
523 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans(
"BoxTitleLastSupplierBills", $max).
'</th>';
524 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
525 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
526 print '<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
527 print '<th width="16"> </th>';
532 $total = $total_ttc = $totalam = 0;
537 $obj = $db->fetch_object(
$resql);
542 $total += $obj->total_ht;
543 $total_ttc += $obj->total_ttc;
547 $facstatic->ref = $obj->ref;
548 $facstatic->id = $obj->rowid;
549 $facstatic->total_ht = $obj->total_ht;
550 $facstatic->total_tva = $obj->total_tva;
551 $facstatic->total_ttc = $obj->total_ttc;
552 $facstatic->statut = $obj->status;
553 $facstatic->paye = $obj->paye;
555 $thirdpartystatic->id = $obj->socid;
556 $thirdpartystatic->name = $obj->name;
557 $thirdpartystatic->email = $obj->email;
558 $thirdpartystatic->country_id = 0;
559 $thirdpartystatic->country_code =
'';
560 $thirdpartystatic->client = 0;
561 $thirdpartystatic->fournisseur = 1;
562 $thirdpartystatic->code_client =
'';
563 $thirdpartystatic->code_fournisseur = $obj->code_fournisseur;
564 $thirdpartystatic->code_compta =
'';
565 $thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
567 print '<tr class="oddeven nowraponall tdoverflowmax100"><td>';
568 print $facstatic->getNomUrl(1,
'');
570 print '<td class="nowrap tdoverflowmax100">';
571 print $thirdpartystatic->getNomUrl(1,
'supplier');
573 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.price($obj->total_ht).
'</td>';
574 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
575 print '<td class="right">'.dol_print_date($db->jdate($obj->tms),
'day').
'</td>';
576 print '<td>'.$facstatic->getLibStatut(3).
'</td>';
578 $total += $obj->total_ht;
579 $total_ttc += $obj->total_ttc;
580 $totalam += $obj->am;
585 print '<tr class="oddeven">';
586 print '<td class="nowrap" colspan="5">';
587 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
593 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
594 print '<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
596 print '</table></div><br>';
605 if (!empty($conf->don->enabled) && $user->rights->don->lire)
607 include_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
609 $langs->load(
"boxes");
610 $donationstatic =
new Don($db);
612 $sql =
"SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut as status";
613 $sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
614 $sql .=
" WHERE d.entity IN (".getEntity(
'donation').
")";
616 $parameters = array();
617 $reshook = $hookmanager->executeHooks(
'printFieldListWhereLastDonations', $parameters);
618 $sql .= $hookmanager->resPrint;
620 $sql .= $db->order(
"d.tms",
"DESC");
621 $sql .= $db->plimit($max, 0);
623 $result = $db->query($sql);
626 $num = $db->num_rows($result);
631 print '<div class="div-table-responsive-no-min">';
632 print '<table class="noborder centpercent">';
633 print '<tr class="liste_titre">';
634 print '<th>'.$langs->trans(
"BoxTitleLastModifiedDonations", $max).
'</th>';
636 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
637 print '<th class="right">'.$langs->trans(
"DateModificationShort").
'</th>';
638 print '<th width="16"> </th>';
642 $total_ttc = $totalam = $total = 0;
644 while ($i < $num && $i < $max)
646 $objp = $db->fetch_object($result);
651 $total += $obj->total_ht;
652 $total_ttc += $obj->total_ttc;
656 $donationstatic->id = $objp->rowid;
657 $donationstatic->ref = $objp->rowid;
658 $donationstatic->lastname = $objp->lastname;
659 $donationstatic->firstname = $objp->firstname;
660 $donationstatic->date = $objp->date;
661 $donationstatic->statut = $objp->status;
662 $donationstatic->status = $objp->status;
664 $label = $donationstatic->getFullName($langs);
665 if ($objp->societe) $label .= ($label ?
' - ' :
'').$objp->societe;
667 print '<tr class="oddeven tdoverflowmax100">';
668 print '<td>'.$donationstatic->getNomUrl(1).
'</td>';
669 print '<td>'.$label.
'</td>';
670 print '<td class="nowrap right">'.price($objp->amount).
'</td>';
671 print '<td class="right">'.dol_print_date($db->jdate($objp->dm),
'day').
'</td>';
672 print '<td>'.$donationstatic->getLibStatut(3).
'</td>';
679 print '<tr class="oddeven">';
680 print '<td class="nowrap" colspan="5">';
681 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
686 print '<tr class="oddeven"><td colspan="4" class="opacitymedium">'.$langs->trans(
"None").
'</td></tr>';
688 print '</table></div><br>';
695 if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
701 $sql =
"SELECT c.rowid, c.amount, c.date_ech, c.paye,";
702 $sql .=
" cc.libelle as label,";
703 $sql .=
" SUM(pc.amount) as sumpaid";
704 $sql .=
" FROM (".MAIN_DB_PREFIX.
"c_chargesociales as cc, ".MAIN_DB_PREFIX.
"chargesociales as c)";
705 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementcharge as pc ON pc.fk_charge = c.rowid";
706 $sql .=
" WHERE c.fk_type = cc.id";
707 $sql .=
" AND c.entity IN (".getEntity(
'tax').
')';
708 $sql .=
" AND c.paye = 0";
710 $parameters = array();
711 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSocialContributions', $parameters);
712 $sql .= $hookmanager->resPrint;
714 $sql .=
" GROUP BY c.rowid, c.amount, c.date_ech, c.paye, cc.libelle";
716 $resql = $db->query($sql);
719 $num = $db->num_rows(
$resql);
721 print '<div class="div-table-responsive-no-min">';
722 print '<table class="noborder centpercent">';
723 print '<tr class="liste_titre">';
724 print '<th>'.$langs->trans(
"ContributionsToPay").($num ?
' <a href="'.DOL_URL_ROOT.
'/compta/sociales/list.php?status=0"><span class="badge">'.$num.
'</span></a>' :
'').
'</th>';
725 print '<th align="center">'.$langs->trans(
"DateDue").
'</th>';
726 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
727 print '<th class="right">'.$langs->trans(
"Paid").
'</th>';
728 print '<th align="center" width="16"> </th>';
738 $obj = $db->fetch_object(
$resql);
743 $total += $obj->total_ht;
744 $total_ttc += $obj->total_ttc;
748 $chargestatic->id = $obj->rowid;
749 $chargestatic->ref = $obj->rowid;
750 $chargestatic->label = $obj->label;
751 $chargestatic->paye = $obj->paye;
752 $chargestatic->status = $obj->paye;
754 print '<tr class="oddeven">';
755 print '<td class="nowraponall">'.$chargestatic->getNomUrl(1).
'</td>';
756 print '<td class="center">'.dol_print_date($db->jdate($obj->date_ech),
'day').
'</td>';
757 print '<td class="nowrap right">'.price($obj->amount).
'</td>';
758 print '<td class="nowrap right">'.price($obj->sumpaid).
'</td>';
759 print '<td class="center">'.$chargestatic->getLibStatut(3).
'</td>';
762 $tot_ttc += $obj->amount;
767 print '<tr class="oddeven">';
768 print '<td class="nowrap" colspan="5">';
769 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
774 print '<tr class="liste_total"><td class="left" colspan="2">'.$langs->trans(
"Total").
'</td>';
775 print '<td class="nowrap right">'.price($tot_ttc).
'</td>';
776 print '<td class="right"></td>';
777 print '<td class="right"> </td>';
780 print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans(
"None").
'</td></tr>';
782 print "</table></div><br>";
793 if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user->rights->commande->lire && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER))
795 $commandestatic =
new Commande($db);
796 $langs->load(
"orders");
798 $sql =
"SELECT sum(f.total) as tot_fht, sum(f.total_ttc) as tot_fttc";
799 $sql .=
", s.nom as name, s.email";
800 $sql .=
", s.rowid as socid";
801 $sql .=
", s.code_client, s.code_compta";
802 $sql .=
", c.rowid, c.ref, c.facture, c.fk_statut as status, c.total_ht, c.tva as total_tva, c.total_ttc,";
803 $sql .=
" cc.rowid as country_id, cc.code as country_code";
804 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as cc ON cc.rowid = s.fk_pays";
805 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
806 $sql .=
", ".MAIN_DB_PREFIX.
"commande as c";
807 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"element_element as el ON el.fk_source = c.rowid AND el.sourcetype = 'commande'";
808 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"facture AS f ON el.fk_target = f.rowid AND el.targettype = 'facture'";
809 $sql .=
" WHERE c.fk_soc = s.rowid";
810 $sql .=
" AND c.entity = ".$conf->entity;
811 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
812 if ($socid) $sql .=
" AND c.fk_soc = ".$socid;
813 $sql .=
" AND c.fk_statut = ".Commande::STATUS_CLOSED;
814 $sql .=
" AND c.facture = 0";
816 $parameters = array();
817 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerOrderToBill', $parameters);
818 $sql .= $hookmanager->resPrint;
820 $sql .=
" GROUP BY s.nom, s.email, s.rowid, s.code_client, s.code_compta, c.rowid, c.ref, c.facture, c.fk_statut, c.total_ht, c.tva, c.total_ttc, cc.rowid, cc.code";
822 $resql = $db->query($sql);
825 $num = $db->num_rows(
$resql);
832 print '<div class="div-table-responsive-no-min">';
833 print '<table class="noborder centpercent">';
835 print "<tr class=\"liste_titre\">";
836 print '<th colspan="2">';
837 print $langs->trans(
"OrdersDeliveredToBill").
' ';
839 print '<span class="badge">'.$num.
'</span>';
843 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
844 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
845 print '<th class="right">'.$langs->trans(
"ToBill").
'</th>';
846 print '<th align="center" width="16"> </th>';
849 $tot_ht = $tot_ttc = $tot_tobill = 0;
850 $societestatic =
new Societe($db);
853 $obj = $db->fetch_object(
$resql);
858 $total += $obj->total_ht;
859 $total_ttc += $obj->total_ttc;
863 $societestatic->id = $obj->socid;
864 $societestatic->name = $obj->name;
865 $societestatic->email = $obj->email;
866 $societestatic->country_id = $obj->country_id;
867 $societestatic->country_code = $obj->country_code;
868 $societestatic->client = 1;
869 $societestatic->code_client = $obj->code_client;
871 $societestatic->code_compta = $obj->code_compta;
874 $commandestatic->id = $obj->rowid;
875 $commandestatic->ref = $obj->ref;
876 $commandestatic->statut = $obj->status;
877 $commandestatic->billed = $obj->facture;
879 print '<tr class="oddeven">';
880 print '<td class="nowrap">';
882 print '<table class="nobordernopadding"><tr class="nocellnopadd">';
883 print '<td width="110" class="nobordernopadding nowrap">';
884 print $commandestatic->getNomUrl(1);
886 print '<td width="20" class="nobordernopadding nowrap">';
889 print '<td width="16" class="nobordernopadding hideonsmartphone right">';
892 $urlsource =
$_SERVER[
'PHP_SELF'].
'?id='.$obj->rowid;
893 print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
894 print '</td></tr></table>';
898 print '<td class="nowrap tdoverflowmax100">';
899 print $societestatic->getNomUrl(1,
'customer');
901 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.price($obj->total_ht).
'</td>';
902 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
903 print '<td class="nowrap right">'.price($obj->total_ttc - $obj->tot_fttc).
'</td>';
904 print '<td>'.$commandestatic->getLibStatut(3).
'</td>';
906 $tot_ht += $obj->total_ht;
907 $tot_ttc += $obj->total_ttc;
909 $tot_tobill += ($obj->total_ttc - $obj->tot_fttc);
914 print '<tr class="oddeven">';
915 print '<td class="nowrap" colspan="5">';
916 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
921 print '<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <font style="font-weight: normal">('.$langs->trans(
"RemainderToBill").
': '.
price($tot_tobill).
')</font> </td>';
922 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.price($tot_ht).
'</td>';
923 print '<td class="nowrap right">'.price($tot_ttc).
'</td>';
924 print '<td class="nowrap right">'.price($tot_tobill).
'</td>';
925 print '<td> </td>';
927 print '</table></div><br>';
938 if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
940 $tmpinvoice =
new Facture($db);
942 $sql =
"SELECT f.rowid, f.ref, f.fk_statut as status, f.datef, f.type, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.paye, f.tms";
943 $sql .=
", f.date_lim_reglement as datelimite";
944 $sql .=
", s.nom as name";
945 $sql .=
", s.rowid as socid, s.email";
946 $sql .=
", s.code_client, s.code_compta";
947 $sql .=
", cc.rowid as country_id, cc.code as country_code";
948 $sql .=
", sum(pf.amount) as am";
949 $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";
950 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiement_facture as pf on f.rowid=pf.fk_facture";
951 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
952 $sql .=
" WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED;
953 $sql .=
" AND f.entity IN (".getEntity(
'invoice').
')';
954 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
955 if ($socid) $sql .=
" AND f.fk_soc = ".$socid;
957 $parameters = array();
958 $reshook = $hookmanager->executeHooks(
'printFieldListWhereCustomerUnpaid', $parameters);
959 $sql .= $hookmanager->resPrint;
961 $sql .=
" GROUP BY f.rowid, f.ref, f.fk_statut, f.datef, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
962 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_compta, cc.rowid, cc.code";
963 $sql .=
" ORDER BY f.datef ASC, f.ref ASC";
965 $resql = $db->query($sql);
968 $num = $db->num_rows(
$resql);
972 print '<div class="div-table-responsive-no-min">';
973 print '<table class="noborder centpercent">';
975 print '<tr class="liste_titre">';
976 print '<th colspan="2">';
977 print $langs->trans(
"BillsCustomersUnpaid", $num).
' ';
979 print '<span class="badge">'.$num.
'</span>';
983 print '<th class="right">'.$langs->trans(
"DateDue").
'</th>';
984 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
985 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
986 print '<th class="right">'.$langs->trans(
"Received").
'</th>';
987 print '<th width="16"> </th>';
991 $societestatic =
new Societe($db);
992 $total_ttc = $totalam = $total = 0;
993 while ($i < $num && $i < $conf->liste_limit)
995 $obj = $db->fetch_object(
$resql);
1000 $total += $obj->total_ht;
1001 $total_ttc += $obj->total_ttc;
1005 $tmpinvoice->ref = $obj->ref;
1006 $tmpinvoice->id = $obj->rowid;
1007 $tmpinvoice->total_ht = $obj->total_ht;
1008 $tmpinvoice->total_tva = $obj->total_tva;
1009 $tmpinvoice->total_ttc = $obj->total_ttc;
1010 $tmpinvoice->type = $obj->type;
1011 $tmpinvoice->statut = $obj->status;
1012 $tmpinvoice->paye = $obj->paye;
1013 $tmpinvoice->date_lim_reglement = $db->jdate($obj->datelimite);
1015 $societestatic->id = $obj->socid;
1016 $societestatic->name = $obj->name;
1017 $societestatic->email = $obj->email;
1018 $societestatic->country_id = $obj->country_id;
1019 $societestatic->country_code = $obj->country_code;
1020 $societestatic->client = 1;
1021 $societestatic->code_client = $obj->code_client;
1022 $societestatic->code_fournisseur = $obj->code_fournisseur;
1023 $societestatic->code_compta = $obj->code_compta;
1024 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1026 print '<tr class="oddeven">';
1027 print '<td class="nowrap">';
1029 print '<table class="nobordernopadding"><tr class="nocellnopadd">';
1030 print '<td width="110" class="nobordernopadding nowrap">';
1031 print $tmpinvoice->getNomUrl(1,
'');
1033 print '<td width="20" class="nobordernopadding nowrap">';
1034 if ($tmpinvoice->hasDelay()) {
1038 print '<td width="16" class="nobordernopadding hideonsmartphone right">';
1041 $urlsource =
$_SERVER[
'PHP_SELF'].
'?facid='.$obj->rowid;
1042 print $formfile->getDocumentsLink($tmpinvoice->element, $filename, $filedir);
1043 print '</td></tr></table>';
1046 print '<td class="nowrap tdoverflowmax100">';
1047 print $societestatic->getNomUrl(1,
'customer');
1049 print '<td class="right">'.dol_print_date($db->jdate($obj->datelimite),
'day').
'</td>';
1050 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.
price($obj->total_ht).
'</td>';
1051 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
1052 print '<td class="nowrap right">'.price($obj->am).
'</td>';
1053 print '<td>'.$tmpinvoice->getLibStatut(3, $obj->am).
'</td>';
1056 $total_ttc += $obj->total_ttc;
1057 $total += $obj->total_ht;
1058 $totalam += $obj->am;
1065 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
1066 print '<tr class="oddeven">';
1067 print '<td class="nowrap" colspan="'.$colspan.
'">';
1068 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1073 print '<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <font style="font-weight: normal">('.$langs->trans(
"RemainderToTake").
': '.
price($total_ttc - $totalam).
')</font> </td>';
1074 print '<td> </td>';
1075 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.price($total).
'</td>';
1076 print '<td class="nowrap right">'.price($total_ttc).
'</td>';
1077 print '<td class="nowrap right">'.price($totalam).
'</td>';
1078 print '<td> </td>';
1082 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
1083 print '<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1085 print '</table></div><br>';
1095 if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire)
1099 $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";
1100 $sql .=
", ff.date_lim_reglement";
1101 $sql .=
", s.nom as name";
1102 $sql .=
", s.rowid as socid, s.email";
1103 $sql .=
", s.code_client, s.code_compta";
1104 $sql .=
", s.code_fournisseur, s.code_compta_fournisseur";
1105 $sql .=
", sum(pf.amount) as am";
1106 $sql .=
" FROM ".MAIN_DB_PREFIX.
"societe as s, ".MAIN_DB_PREFIX.
"facture_fourn as ff";
1107 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"paiementfourn_facturefourn as pf on ff.rowid=pf.fk_facturefourn";
1108 if (!$user->rights->societe->client->voir && !$socid) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
1109 $sql .=
" WHERE s.rowid = ff.fk_soc";
1110 $sql .=
" AND ff.entity = ".$conf->entity;
1111 $sql .=
" AND ff.paye = 0";
1112 $sql .=
" AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED;
1113 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
1114 if ($socid) $sql .=
" AND ff.fk_soc = ".$socid;
1116 $parameters = array();
1117 $reshook = $hookmanager->executeHooks(
'printFieldListWhereSupplierUnpaid', $parameters);
1118 $sql .= $hookmanager->resPrint;
1120 $sql .=
" GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,";
1121 $sql .=
" s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur";
1122 $sql .=
" ORDER BY ff.date_lim_reglement ASC";
1124 $resql = $db->query($sql);
1127 $num = $db->num_rows(
$resql);
1130 print '<div class="div-table-responsive-no-min">';
1131 print '<table class="noborder centpercent">';
1133 print '<tr class="liste_titre">';
1134 print '<th colspan="2">';
1135 print $langs->trans(
"BillsSuppliersUnpaid", $num).
' ';
1139 print '<span class="badge">'.$num.
'</span>';
1143 print '<th class="right">'.$langs->trans(
"DateDue").
'</th>';
1144 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<th class="right">'.$langs->trans(
"AmountHT").
'</th>';
1145 print '<th class="right">'.$langs->trans(
"AmountTTC").
'</th>';
1146 print '<th class="right">'.$langs->trans(
"Paid").
'</th>';
1147 print '<th width="16"> </th>';
1149 $societestatic =
new Societe($db);
1153 $total = $total_ttc = $totalam = 0;
1156 $obj = $db->fetch_object(
$resql);
1161 $total += $obj->total_ht;
1162 $total_ttc += $obj->total_ttc;
1166 $facstatic->ref = $obj->ref;
1167 $facstatic->id = $obj->rowid;
1168 $facstatic->type = $obj->type;
1169 $facstatic->total_ht = $obj->total_ht;
1170 $facstatic->total_tva = $obj->total_tva;
1171 $facstatic->total_ttc = $obj->total_ttc;
1172 $facstatic->statut = $obj->status;
1173 $facstatic->paye = $obj->paye;
1175 $societestatic->id = $obj->socid;
1176 $societestatic->name = $obj->name;
1177 $societestatic->email = $obj->email;
1178 $societestatic->client = 0;
1179 $societestatic->fournisseur = 1;
1180 $societestatic->code_client = $obj->code_client;
1181 $societestatic->code_fournisseur = $obj->code_fournisseur;
1182 $societestatic->code_compta = $obj->code_compta;
1183 $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
1185 print '<tr class="oddeven"><td class="nowrap tdoverflowmax100">';
1186 print $facstatic->getNomUrl(1,
'');
1188 print '<td class="nowrap tdoverflowmax100">'.$societestatic->getNomUrl(1,
'supplier').
'</td>';
1189 print '<td class="right">'.dol_print_date($db->jdate($obj->date_lim_reglement),
'day').
'</td>';
1190 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.
price($obj->total_ht).
'</td>';
1191 print '<td class="nowrap right">'.price($obj->total_ttc).
'</td>';
1192 print '<td class="nowrap right">'.price($obj->am).
'</td>';
1193 print '<td>'.$facstatic->getLibStatut(3, $obj->am).
'</td>';
1195 $total += $obj->total_ht;
1196 $total_ttc += $obj->total_ttc;
1197 $totalam += $obj->am;
1203 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
1204 print '<tr class="oddeven">';
1205 print '<td class="nowrap" colspan="'.$colspan.
'">';
1206 print '<span class="opacitymedium">'.$langs->trans(
"More").
'... ('.$othernb.
')</span>';
1211 print '<tr class="liste_total"><td colspan="2">'.$langs->trans(
"Total").
' <font style="font-weight: normal">('.$langs->trans(
"RemainderToPay").
': '.
price($total_ttc - $totalam).
')</font> </td>';
1212 print '<td> </td>';
1213 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY))
print '<td class="right">'.price($total).
'</td>';
1214 print '<td class="nowrap right">'.price($total_ttc).
'</td>';
1215 print '<td class="nowrap right">'.price($totalam).
'</td>';
1216 print '<td> </td>';
1220 if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
1221 print '<tr class="oddeven"><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoInvoice").
'</td></tr>';
1223 print '</table></div><br>';
1235 print '<div class="div-table-responsive-no-min">';
1236 print '<table class="noborder centpercent">';
1237 print '<tr class="liste_titre"><thcolspan="2">'.$langs->trans(
"TasksToDo").
'</th>';
1240 while ($i < $db->num_rows(
$resql))
1242 $obj = $db->fetch_object(
$resql);
1244 print '<tr class="oddeven"><td>'.dol_print_date($db->jdate($obj->da),
"day").
'</td>';
1245 print '<td><a href="action/card.php">'.$obj->label.
'</a></td></tr>';
1249 print "</table></div><br>";
1253 print '</div></div></div>';
1255 $parameters = array(
'user' => $user);
1256 $reshook = $hookmanager->executeHooks(
'dashboardAccountancy', $parameters, $object);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
const STATUS_CLOSED
Closed (Sent, billed or not)
dol_now($mode= 'auto')
Return date for now.
const STATUS_VALIDATED
Validated (need to be paid)
Class to manage suppliers invoices.
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...
Class to manage third parties objects (customers, suppliers, prospects...)
const STATUS_VALIDATED
Validated (need to be paid)
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
Class to manage customers orders.
const STATUS_DRAFT
Draft status.
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Class to manage donations.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Class to manage invoices.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...