27require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formaccounting.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.product.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingaccount.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
41$langs->loadLangs(array(
"compta",
"bills",
"other",
"accountancy",
"productbatch",
"products"));
43$optioncss =
GETPOST(
'optioncss',
'aZ');
45$account_parent =
GETPOST(
'account_parent');
46$changeaccount =
GETPOST(
'changeaccount');
48$search_societe =
GETPOST(
'search_societe',
'alpha');
49$search_lineid =
GETPOST(
'search_lineid',
'int');
50$search_ref =
GETPOST(
'search_ref',
'alpha');
51$search_invoice =
GETPOST(
'search_invoice',
'alpha');
53$search_label =
GETPOST(
'search_label',
'alpha');
54$search_desc =
GETPOST(
'search_desc',
'alpha');
55$search_amount =
GETPOST(
'search_amount',
'alpha');
56$search_account =
GETPOST(
'search_account',
'alpha');
57$search_vat =
GETPOST(
'search_vat',
'alpha');
58$search_date_startday =
GETPOST(
'search_date_startday',
'int');
59$search_date_startmonth =
GETPOST(
'search_date_startmonth',
'int');
60$search_date_startyear =
GETPOST(
'search_date_startyear',
'int');
61$search_date_endday =
GETPOST(
'search_date_endday',
'int');
62$search_date_endmonth =
GETPOST(
'search_date_endmonth',
'int');
63$search_date_endyear =
GETPOST(
'search_date_endyear',
'int');
64$search_date_start =
dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
65$search_date_end =
dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
66$search_country =
GETPOST(
'search_country',
'alpha');
67$search_tvaintra =
GETPOST(
'search_tvaintra',
'alpha');
71$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
72$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
73$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
74if (empty($page) || $page < 0) {
77$offset = $limit * $page;
81 $sortfield =
"f.datef, f.ref, l.rowid";
94if (!isModEnabled(
'accounting')) {
97if ($user->socid > 0) {
100if (!$user->hasRight(
'accounting',
'mouvements',
'lire')) {
113if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
114 $search_societe =
'';
117 $search_invoice =
'';
122 $search_account =
'';
124 $search_date_startday =
'';
125 $search_date_startmonth =
'';
126 $search_date_startyear =
'';
127 $search_date_endday =
'';
128 $search_date_endmonth =
'';
129 $search_date_endyear =
'';
130 $search_date_start =
'';
131 $search_date_end =
'';
132 $search_country =
'';
133 $search_tvaintra =
'';
136if (is_array($changeaccount) && count($changeaccount) > 0 && $user->hasRight(
'accounting',
'bind',
'write')) {
139 if (!(
GETPOST(
'account_parent',
'int') >= 0)) {
141 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Account")),
null,
'errors');
147 $sql1 =
"UPDATE ".MAIN_DB_PREFIX.
"facture_fourn_det";
148 $sql1 .=
" SET fk_code_ventilation=".(GETPOST(
'account_parent',
'int') > 0 ?
GETPOST(
'account_parent',
'int') :
'0');
149 $sql1 .=
' WHERE rowid IN ('.$db->sanitize(implode(
',', $changeaccount)).
')';
151 dol_syslog(
'accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
152 $resql1 = $db->query($sql1);
165 $account_parent =
'';
169if (
GETPOST(
'sortfield') ==
'f.datef, f.ref, l.rowid') {
170 $value = (
GETPOST(
'sortorder') ==
'asc,asc,asc' ? 0 : 1);
171 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
172 $res =
dolibarr_set_const($db,
"ACCOUNTING_LIST_SORT_VENTILATION_DONE", $value,
'yesno', 0,
'', $conf->entity);
180$form =
new Form($db);
183$help_url =
'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
185llxHeader(
'', $langs->trans(
"SuppliersVentilation").
' - '.$langs->trans(
"Dispatched"), $help_url);
187print
'<script type="text/javascript">
189 $(\'#select-all\').click(function(event) {
190 // Iterate each checkbox
191 $(\':checkbox\').each(function() {
195 $(\'#unselect-all\').click(function(event) {
196 // Iterate each checkbox
197 $(\':checkbox\').each(function() {
198 this.checked = false;
207$sql =
"SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.type as ftype, f.libelle as invoice_label, f.datef, f.fk_soc,";
208$sql .=
" l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
209$sql .=
" aa.rowid as fk_compte, aa.label as label_account, aa.labelshort as labelshort_account, aa.account_number,";
210$sql .=
" p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.tobuy, p.tosell,";
212 $sql .=
" ppe.accountancy_code_buy, ppe.accountancy_code_buy_intra, ppe.accountancy_code_buy_export,";
214 $sql .=
" p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,";
216$sql .=
" co.code as country_code, co.label as country,";
217$sql .=
" s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
219 $sql .=
", spe.accountancy_code_customer as code_compta_client";
220 $sql .=
", spe.accountancy_code_supplier as code_compta_fournisseur";
222 $sql .=
", s.code_compta as code_compta_client";
223 $sql .=
", s.code_compta_fournisseur";
225$parameters = array();
226$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
227$sql .= $hookmanager->resPrint;
228$sql .=
" FROM ".MAIN_DB_PREFIX.
"facture_fourn_det as l";
229$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"product as p ON p.rowid = l.fk_product";
231 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
233$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"accounting_account as aa ON aa.rowid = l.fk_code_ventilation";
234$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"facture_fourn as f ON f.rowid = l.fk_facture_fourn";
235$sql .=
" INNER JOIN ".MAIN_DB_PREFIX.
"societe as s ON s.rowid = f.fk_soc";
237 $sql .=
" LEFT JOIN " . MAIN_DB_PREFIX .
"societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
239$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as co ON co.rowid = s.fk_pays ";
240$sql .=
" WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
242if ($search_societe) {
248if (strlen(trim($search_invoice))) {
249 $sql .=
natural_search(array(
"f.ref",
"f.ref_supplier"), $search_invoice);
254if (strlen(trim($search_label))) {
257if (strlen(trim($search_ref))) {
260if (strlen(trim($search_desc))) {
263if (strlen(trim($search_amount))) {
266if (strlen(trim($search_account))) {
269if (strlen(trim($search_vat))) {
272if ($search_date_start) {
273 $sql .=
" AND f.datef >= '".$db->idate($search_date_start).
"'";
275if ($search_date_end) {
276 $sql .=
" AND f.datef <= '".$db->idate($search_date_end).
"'";
278if (strlen(trim($search_country))) {
280 $country_code_in_EEC = $country_code_in_EEC_without_me =
'';
281 foreach ($arrayofcode as $key => $value) {
282 $country_code_in_EEC .= ($country_code_in_EEC ?
"," :
"").
"'".$value.
"'";
283 if ($value != $mysoc->country_code) {
284 $country_code_in_EEC_without_me .= ($country_code_in_EEC_without_me ?
"," :
"").
"'".$value.
"'";
287 if ($search_country ==
'special_allnotme') {
288 $sql .=
" AND co.code <> '".$db->escape($mysoc->country_code).
"'";
289 } elseif ($search_country ==
'special_eec') {
290 $sql .=
" AND co.code IN (".$db->sanitize($country_code_in_EEC, 1).
")";
291 } elseif ($search_country ==
'special_eecnotme') {
292 $sql .=
" AND co.code IN (".$db->sanitize($country_code_in_EEC_without_me, 1).
")";
293 } elseif ($search_country ==
'special_noteec') {
294 $sql .=
" AND co.code NOT IN (".$db->sanitize($country_code_in_EEC, 1).
")";
299if (strlen(trim($search_tvaintra))) {
302$sql .=
" AND f.entity IN (".getEntity(
'facture_fourn', 0).
")";
305$parameters = array();
306$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
307$sql .= $hookmanager->resPrint;
309$sql .= $db->order($sortfield, $sortorder);
312$nbtotalofrecords =
'';
314 $result = $db->query($sql);
315 $nbtotalofrecords = $db->num_rows($result);
316 if (($page * $limit) > $nbtotalofrecords) {
322$sql .= $db->plimit($limit + 1, $offset);
324dol_syslog(
"accountancy/supplier/lines.php", LOG_DEBUG);
325$result = $db->query($sql);
327 $num_lines = $db->num_rows($result);
331 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
332 $param .=
'&contextpage='.urlencode($contextpage);
334 if ($limit > 0 && $limit != $conf->liste_limit) {
335 $param .=
'&limit='.((int) $limit);
337 if ($search_societe) {
338 $param .=
"&search_societe=".urlencode($search_societe);
340 if ($search_invoice) {
341 $param .=
"&search_invoice=".urlencode($search_invoice);
344 $param .=
"&search_ref=".urlencode($search_ref);
350 $param .=
"&search_label=".urlencode($search_label);
353 $param .=
"&search_desc=".urlencode($search_desc);
355 if ($search_account) {
356 $param .=
"&search_account=".urlencode($search_account);
359 $param .=
"&search_vat=".urlencode($search_vat);
361 if ($search_date_startday) {
362 $param .=
'&search_date_startday='.urlencode($search_date_startday);
364 if ($search_date_startmonth) {
365 $param .=
'&search_date_startmonth='.urlencode($search_date_startmonth);
367 if ($search_date_startyear) {
368 $param .=
'&search_date_startyear='.urlencode($search_date_startyear);
370 if ($search_date_endday) {
371 $param .=
'&search_date_endday='.urlencode($search_date_endday);
373 if ($search_date_endmonth) {
374 $param .=
'&search_date_endmonth='.urlencode($search_date_endmonth);
376 if ($search_date_endyear) {
377 $param .=
'&search_date_endyear='.urlencode($search_date_endyear);
379 if ($search_country) {
380 $param .=
"&search_country=".urlencode($search_country);
382 if ($search_tvaintra) {
383 $param .=
"&search_tvaintra=".urlencode($search_tvaintra);
386 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">'.
"\n";
387 print
'<input type="hidden" name="action" value="ventil">';
388 if ($optioncss !=
'') {
389 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
391 print
'<input type="hidden" name="token" value="'.newToken().
'">';
392 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
393 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
394 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
395 print
'<input type="hidden" name="page" value="'.$page.
'">';
397 print_barre_liste($langs->trans(
"InvoiceLinesDone"), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num_lines, $nbtotalofrecords,
'title_accountancy', 0,
'',
'', $limit);
398 print
'<span class="opacitymedium">'.$langs->trans(
"DescVentilDoneSupplier").
'</span><br>';
400 print
'<br><div class="inline-block divButAction paddingbottom">'.$langs->trans(
"ChangeAccount").
' ';
401 print $formaccounting->select_account($account_parent,
'account_parent', 2, array(), 0, 0,
'maxwidth300 maxwidthonsmartphone valignmiddle');
402 print
'<input type="submit" class="button small valignmiddle" value="'.$langs->trans(
"ChangeBinding").
'"/></div>';
406 print
'<div class="div-table-responsive">';
407 print
'<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
410 print
'<tr class="liste_titre_filter">';
411 print
'<td class="liste_titre"><input type="text" class="flat maxwidth25" name="search_lineid" value="'.dol_escape_htmltag($search_lineid).
'"></td>';
412 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="'.dol_escape_htmltag($search_invoice).
'"></td>';
414 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="'.dol_escape_htmltag($search_label).
'"></td>';
415 print
'<td class="liste_titre center">';
416 print
'<div class="nowrapfordate">';
417 print $form->selectDate($search_date_start ? $search_date_start : -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
419 print
'<div class="nowrapfordate">';
420 print $form->selectDate($search_date_end ? $search_date_end : -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
423 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'"></td>';
424 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="'.dol_escape_htmltag($search_desc).
'"></td>';
425 print
'<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_amount" value="'.dol_escape_htmltag($search_amount).
'"></td>';
426 print
'<td class="liste_titre right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="'.dol_escape_htmltag($search_vat).
'"></td>';
427 print
'<td class="liste_titre"><input type="text" class="flat maxwidth75imp" name="search_societe" value="'.dol_escape_htmltag($search_societe).
'"></td>';
428 print
'<td class="liste_titre">';
429 print $form->select_country($search_country,
'search_country',
'', 0,
'maxwidth100',
'code2', 1, 0, 1);
432 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="'.dol_escape_htmltag($search_tvaintra).
'"></td>';
433 print
'<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).
'"></td>';
434 print
'<td class="liste_titre center">';
435 $searchpicto = $form->showFilterButtons();
437 print
"</td></tr>\n";
439 print
'<tr class="liste_titre">';
443 print_liste_field_titre(
"InvoiceLabel", $_SERVER[
"PHP_SELF"],
"f.libelle",
"", $param,
'', $sortfield, $sortorder);
444 print_liste_field_titre(
"Date", $_SERVER[
"PHP_SELF"],
"f.datef, f.ref, l.rowid",
"", $param,
'', $sortfield, $sortorder,
'center ');
447 print_liste_field_titre(
"ProductDescription", $_SERVER[
"PHP_SELF"],
"l.description",
"", $param,
'', $sortfield, $sortorder);
448 print_liste_field_titre(
"Amount", $_SERVER[
"PHP_SELF"],
"l.total_ht",
"", $param,
'', $sortfield, $sortorder,
'right ');
449 print_liste_field_titre(
"VATRate", $_SERVER[
"PHP_SELF"],
"l.tva_tx",
"", $param,
'', $sortfield, $sortorder,
'right ');
452 print_liste_field_titre(
"VATIntraShort", $_SERVER[
"PHP_SELF"],
"s.tva_intra",
"", $param,
'', $sortfield, $sortorder);
453 print_liste_field_titre(
"AccountAccounting", $_SERVER[
"PHP_SELF"],
"aa.account_number",
"", $param,
'', $sortfield, $sortorder);
454 $checkpicto = $form->showCheckAddButtons();
458 $thirdpartystatic =
new Societe($db);
464 while ($i < min($num_lines, $limit)) {
465 $objp = $db->fetch_object($result);
467 $facturefournisseur_static->ref = $objp->ref;
468 $facturefournisseur_static->id = $objp->facid;
469 $facturefournisseur_static->type = $objp->ftype;
470 $facturefournisseur_static->ref_supplier = $objp->ref_supplier;
471 $facturefournisseur_static->label = $objp->invoice_label;
473 $thirdpartystatic->id = $objp->socid;
474 $thirdpartystatic->name = $objp->name;
475 $thirdpartystatic->client = $objp->client;
476 $thirdpartystatic->fournisseur = $objp->fournisseur;
477 $thirdpartystatic->code_client = $objp->code_client;
478 $thirdpartystatic->code_compta_client = $objp->code_compta_client;
479 $thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
480 $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
481 $thirdpartystatic->email = $objp->email;
482 $thirdpartystatic->country_code = $objp->country_code;
484 $productstatic->ref = $objp->product_ref;
485 $productstatic->id = $objp->product_id;
486 $productstatic->label = $objp->product_label;
487 $productstatic->type = $objp->line_type;
488 $productstatic->status = $objp->tosell;
489 $productstatic->status_buy = $objp->tobuy;
490 $productstatic->accountancy_code_buy = $objp->accountancy_code_buy;
491 $productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra;
492 $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export;
494 $accountingaccountstatic->rowid = $objp->fk_compte;
495 $accountingaccountstatic->label = $objp->label_account;
496 $accountingaccountstatic->labelshort = $objp->labelshort_account;
497 $accountingaccountstatic->account_number = $objp->account_number;
499 print
'<tr class="oddeven">';
502 print
'<td>'.$objp->rowid.
'</td>';
505 print
'<td class="nowraponall">'.$facturefournisseur_static->getNomUrl(1);
506 if ($objp->ref_supplier) {
507 print
'<br><span class="opacitymedium small">'.dol_escape_htmltag($objp->ref_supplier).
'</span>';
519 print
'<td class="tdoverflowonsmartphone small" title="'.dol_escape_htmltag($objp->invoice_label).
'">';
520 print $objp->invoice_label;
524 print
'<td class="center">'.dol_print_date($db->jdate($objp->datef),
'day').
'</td>';
527 print
'<td class="tdoverflowmax100">';
528 if ($productstatic->id > 0) {
529 print $productstatic->getNomUrl(1);
531 if ($productstatic->id > 0 && $objp->product_label) {
534 if ($objp->product_label) {
535 print
'<span class="opacitymedium">'.$objp->product_label.
'</span>';
539 print
'<td class="tdoverflowonsmartphone small">';
542 print $form->textwithtooltip(
dol_trunc($text, $trunclength), $objp->description);
545 print
'<td class="right nowraponall amount">'.price($objp->total_ht).
'</td>';
547 print
'<td class="right">'.vatrate($objp->tva_tx.($objp->vat_src_code ?
' ('.$objp->vat_src_code.
')' :
'')).
'</td>';
550 print
'<td class="tdoverflowmax100">'.$thirdpartystatic->getNomUrl(1,
'supplier').
'</td>';
554 if ($objp->country_code) {
555 print $langs->trans(
"Country".$objp->country_code).
' ('.$objp->country_code.
')';
559 print
'<td class="tdoverflowmax80" title="'.dol_escape_htmltag($objp->tva_intra).
'">'.
dol_escape_htmltag($objp->tva_intra).
'</td>';
562 print $accountingaccountstatic->getNomUrl(0, 1, 1,
'', 1);
563 print
' <a class="editfielda" href="./card.php?id='.$objp->rowid.
'&backtopage='.urlencode($_SERVER[
"PHP_SELF"].($param ?
'?'.$param :
'')).
'">';
566 print
'<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.
'"/></td>';
571 if ($num_lines == 0) {
572 print
'<tr><td colspan="13"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
578 if ($nbtotalofrecords > $limit) {
579 print_barre_liste(
'', $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder,
'', $num_lines, $nbtotalofrecords,
'', 0,
'',
'', $limit, 1);
584 print $db->lasterror();
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage accounting accounts.
Class to manage suppliers invoices.
Class to manage predefined suppliers products.
Class to manage third parties objects (customers, suppliers, prospects...)
getCountriesInEEC()
Return list of countries that are inside the EEC (European Economic Community) Note: Try to keep this...
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.