35 require
'../main.inc.php';
36 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
38 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
39 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
40 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formpropal.class.php';
41 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
42 require_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
43 if (!empty($conf->projet->enabled))
44 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
47 $langs->loadLangs(array(
'companies',
'propal',
'supplier_proposal',
'compta',
'bills',
'orders',
'products'));
49 $socid =
GETPOST(
'socid',
'int');
51 $action =
GETPOST(
'action',
'aZ09');
52 $massaction =
GETPOST(
'massaction',
'alpha');
53 $show_files =
GETPOST(
'show_files',
'int');
54 $confirm =
GETPOST(
'confirm',
'alpha');
55 $toselect =
GETPOST(
'toselect',
'array');
56 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'supplierproposallist';
58 $search_user =
GETPOST(
'search_user',
'int');
59 $search_sale =
GETPOST(
'search_sale',
'int');
61 $search_societe =
GETPOST(
'search_societe',
'alpha');
62 $search_login =
GETPOST(
'search_login',
'alpha');
63 $search_town =
GETPOST(
'search_town',
'alpha');
64 $search_zip =
GETPOST(
'search_zip',
'alpha');
65 $search_state =
GETPOST(
"search_state");
66 $search_country =
GETPOST(
"search_country",
'int');
67 $search_type_thirdparty =
GETPOST(
"search_type_thirdparty",
'int');
68 $search_montant_ht =
GETPOST(
'search_montant_ht',
'alpha');
69 $search_montant_vat =
GETPOST(
'search_montant_vat',
'alpha');
70 $search_montant_ttc =
GETPOST(
'search_montant_ttc',
'alpha');
71 $search_multicurrency_code =
GETPOST(
'search_multicurrency_code',
'alpha');
72 $search_multicurrency_tx =
GETPOST(
'search_multicurrency_tx',
'alpha');
73 $search_multicurrency_montant_ht =
GETPOST(
'search_multicurrency_montant_ht',
'alpha');
74 $search_multicurrency_montant_vat =
GETPOST(
'search_multicurrency_montant_vat',
'alpha');
75 $search_multicurrency_montant_ttc =
GETPOST(
'search_multicurrency_montant_ttc',
'alpha');
76 $search_status =
GETPOST(
'search_status',
'int');
78 $object_statut = $db->escape(
GETPOST(
'supplier_proposal_statut'));
79 $search_btn =
GETPOST(
'button_search',
'alpha');
80 $search_remove_btn =
GETPOST(
'button_removefilter',
'alpha');
82 $sall = trim((
GETPOST(
'search_all',
'alphanohtml') !=
'') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml'));
88 $yearvalid =
GETPOST(
"yearvalid");
89 $monthvalid =
GETPOST(
"monthvalid");
90 $dayvalid =
GETPOST(
"dayvalid");
92 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
93 $sortfield =
GETPOST(
"sortfield",
'alpha');
94 $sortorder =
GETPOST(
"sortorder",
'alpha');
96 if (empty($page) || $page == -1 || !empty($search_btn) || !empty($search_remove_btn) || (empty($toselect) && $massaction ===
'0')) { $page = 0; }
97 $offset = $limit * $page;
98 $pageprev = $page - 1;
99 $pagenext = $page + 1;
100 if (!$sortfield) $sortfield =
'sp.date_livraison';
101 if (!$sortorder) $sortorder =
'DESC';
103 if ($object_statut !=
'') $search_status = $object_statut;
109 $module =
'supplier_proposal';
112 if (!empty($user->socid)) $socid = $user->socid;
117 $dbtable =
'&societe';
121 $diroutputmassaction = $conf->supplier_proposal->dir_output.
'/temp/massgeneration/'.$user->id;
125 $hookmanager->initHooks(array(
'supplier_proposallist'));
129 $extrafields->fetch_name_optionals_label($object->table_element);
131 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
135 $fieldstosearchall = array(
138 'pd.description'=>
'Description',
139 'sp.note_public'=>
'NotePublic',
141 if (empty($user->socid)) $fieldstosearchall[
"p.note_private"] =
"NotePrivate";
143 $checkedtypetiers = 0;
144 $arrayfields = array(
145 'sp.ref'=>array(
'label'=>$langs->trans(
"Ref"),
'checked'=>1),
146 's.nom'=>array(
'label'=>$langs->trans(
"Supplier"),
'checked'=>1),
147 's.town'=>array(
'label'=>$langs->trans(
"Town"),
'checked'=>1),
148 's.zip'=>array(
'label'=>$langs->trans(
"Zip"),
'checked'=>1),
149 'state.nom'=>array(
'label'=>$langs->trans(
"StateShort"),
'checked'=>0),
150 'country.code_iso'=>array(
'label'=>$langs->trans(
"Country"),
'checked'=>0),
151 'typent.code'=>array(
'label'=>$langs->trans(
"ThirdPartyType"),
'checked'=>$checkedtypetiers),
152 'sp.date_valid'=>array(
'label'=>$langs->trans(
"Date"),
'checked'=>1),
153 'sp.date_livraison'=>array(
'label'=>$langs->trans(
"DateEnd"),
'checked'=>1),
154 'sp.total_ht'=>array(
'label'=>$langs->trans(
"AmountHT"),
'checked'=>1),
155 'sp.total_vat'=>array(
'label'=>$langs->trans(
"AmountVAT"),
'checked'=>0),
156 'sp.total_ttc'=>array(
'label'=>$langs->trans(
"AmountTTC"),
'checked'=>0),
157 'sp.multicurrency_code'=>array(
'label'=>
'Currency',
'checked'=>0,
'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
158 'sp.multicurrency_tx'=>array(
'label'=>
'CurrencyRate',
'checked'=>0,
'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
159 'sp.multicurrency_total_ht'=>array(
'label'=>
'MulticurrencyAmountHT',
'checked'=>0,
'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
160 'sp.multicurrency_total_vat'=>array(
'label'=>
'MulticurrencyAmountVAT',
'checked'=>0,
'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
161 'sp.multicurrency_total_ttc'=>array(
'label'=>
'MulticurrencyAmountTTC',
'checked'=>0,
'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
162 'u.login'=>array(
'label'=>$langs->trans(
"Author"),
'checked'=>1,
'position'=>10),
163 'sp.datec'=>array(
'label'=>$langs->trans(
"DateCreation"),
'checked'=>0,
'position'=>500),
164 'sp.tms'=>array(
'label'=>$langs->trans(
"DateModificationShort"),
'checked'=>0,
'position'=>500),
165 'sp.fk_statut'=>array(
'label'=>$langs->trans(
"Status"),
'checked'=>1,
'position'=>1000),
168 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
179 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
180 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') { $massaction =
''; }
182 $parameters = array(
'socid'=>$socid);
183 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
184 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
186 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
189 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
195 $search_societe =
'';
196 $search_montant_ht =
'';
197 $search_montant_vat =
'';
198 $search_montant_ttc =
'';
199 $search_multicurrency_code =
'';
200 $search_multicurrency_tx =
'';
201 $search_multicurrency_montant_ht =
'';
202 $search_multicurrency_montant_vat =
'';
203 $search_multicurrency_montant_ttc =
'';
205 $search_product_category =
'';
210 $search_country =
'';
211 $search_type_thirdparty =
'';
224 $objectclass =
'SupplierProposal';
225 $objectlabel =
'SupplierProposals';
226 $permissiontoread = $user->rights->supplier_proposal->lire;
227 $permissiontodelete = $user->rights->supplier_proposal->supprimer;
228 $uploaddir = $conf->supplier_proposal->dir_output;
229 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
241 $form =
new Form($db);
245 $companystatic =
new Societe($db);
248 $help_url =
'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur';
252 if ($sall || $search_product_category > 0 || $search_user > 0) $sql =
'SELECT DISTINCT';
253 $sql .=
' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
254 $sql .=
" typent.code as typent_code,";
255 $sql .=
" state.code_departement as state_code, state.nom as state_name,";
256 $sql .=
' sp.rowid, sp.note_private, sp.total_ht, sp.tva as total_vat, sp.total as total_ttc, sp.localtax1, sp.localtax2, sp.ref, sp.fk_statut as status, sp.fk_user_author, sp.date_valid, sp.date_livraison as dp,';
257 $sql .=
' sp.fk_multicurrency, sp.multicurrency_code, sp.multicurrency_tx, sp.multicurrency_total_ht, sp.multicurrency_total_tva as multicurrency_total_vat, sp.multicurrency_total_ttc,';
258 $sql .=
' sp.datec as date_creation, sp.tms as date_update,';
259 $sql .=
" p.rowid as project_id, p.ref as project_ref,";
260 if (!$user->rights->societe->client->voir && !$socid) $sql .=
" sc.fk_soc, sc.fk_user,";
261 $sql .=
" u.firstname, u.lastname, u.photo, u.login";
263 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
264 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
' as options_'.$key :
'');
267 $parameters = array();
268 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters);
269 $sql .= $hookmanager->resPrint;
270 $sql .=
' FROM '.MAIN_DB_PREFIX.
'societe as s';
271 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as country on (country.rowid = s.fk_pays)";
272 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_typent as typent on (typent.id = s.fk_typent)";
273 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as state on (state.rowid = s.fk_departement)";
274 $sql .=
', '.MAIN_DB_PREFIX.
'supplier_proposal as sp';
275 if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (sp.rowid = ef.fk_object)";
276 if ($sall || $search_product_category > 0) $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'supplier_proposaldet as pd ON sp.rowid=pd.fk_supplier_proposal';
277 if ($search_product_category > 0) $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'categorie_product as cp ON cp.fk_product=pd.fk_product';
278 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'user as u ON sp.fk_user_author = u.rowid';
279 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"projet as p ON p.rowid = sp.fk_projet";
281 if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .=
", ".MAIN_DB_PREFIX.
"societe_commerciaux as sc";
282 if ($search_user > 0)
284 $sql .=
", ".MAIN_DB_PREFIX.
"element_contact as c";
285 $sql .=
", ".MAIN_DB_PREFIX.
"c_type_contact as tc";
287 $sql .=
' WHERE sp.fk_soc = s.rowid';
288 $sql .=
' AND sp.entity IN ('.getEntity(
'supplier_proposal').
')';
289 if (!$user->rights->societe->client->voir && !$socid)
291 $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
295 if ($search_state) $sql .=
natural_search(
"state.nom", $search_state);
296 if ($search_country) $sql .=
" AND s.fk_pays IN (".$search_country.
')';
297 if ($search_type_thirdparty) $sql .=
" AND s.fk_typent IN (".$search_type_thirdparty.
')';
299 if ($search_societe) $sql .=
natural_search(
's.nom', $search_societe);
300 if ($search_login) $sql .=
natural_search(
'u.login', $search_login);
301 if ($search_montant_ht) $sql .=
natural_search(
'sp.total_ht=', $search_montant_ht, 1);
302 if ($search_montant_vat !=
'') $sql .=
natural_search(
"sp.tva", $search_montant_vat, 1);
303 if ($search_montant_ttc !=
'') $sql .=
natural_search(
"sp.total", $search_montant_ttc, 1);
304 if ($search_multicurrency_code !=
'') $sql .=
' AND sp.multicurrency_code = "'.$db->escape($search_multicurrency_code).
'"';
305 if ($search_multicurrency_tx !=
'') $sql .=
natural_search(
'sp.multicurrency_tx', $search_multicurrency_tx, 1);
306 if ($search_multicurrency_montant_ht !=
'') $sql .=
natural_search(
'sp.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
307 if ($search_multicurrency_montant_vat !=
'') $sql .=
natural_search(
'sp.multicurrency_total_tva', $search_multicurrency_montant_vat, 1);
308 if ($search_multicurrency_montant_ttc !=
'') $sql .=
natural_search(
'sp.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1);
309 if ($sall) $sql .=
natural_search(array_keys($fieldstosearchall), $sall);
310 if ($socid) $sql .=
' AND s.rowid = '.$socid;
311 if ($search_status >= 0 && $search_status !=
'') $sql .=
' AND sp.fk_statut IN ('.$db->sanitize($db->escape($search_status)).
')';
313 $sql .=
dolSqlDateFilter(
"sp.date_valid", $dayvalid, $monthvalid, $yearvalid);
314 if ($search_sale > 0) $sql .=
" AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;
315 if ($search_user > 0)
317 $sql .=
" AND c.fk_c_type_contact = tc.rowid AND tc.element='supplier_proposal' AND tc.source='internal' AND c.element_id = sp.rowid AND c.fk_socpeople = ".$search_user;
320 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
322 $parameters = array();
323 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters);
324 $sql .= $hookmanager->resPrint;
326 $sql .= $db->order($sortfield, $sortorder);
327 $sql .=
', sp.ref DESC';
330 $nbtotalofrecords =
'';
331 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
333 $resql = $db->query($sql);
334 $nbtotalofrecords = $db->num_rows(
$resql);
335 if (($page * $limit) > $nbtotalofrecords)
342 $sql .= $db->plimit($limit + 1, $offset);
344 $resql = $db->query($sql);
348 $userstatic =
new User($db);
354 $title = $langs->trans(
'ListOfSupplierProposals').
' - '.$soc->name;
356 $title = $langs->trans(
'ListOfSupplierProposals');
359 $num = $db->num_rows(
$resql);
361 $arrayofselected = is_array($toselect) ? $toselect : array();
363 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall)
365 $obj = $db->fetch_object(
$resql);
369 header(
"Location: ".DOL_URL_ROOT.
'/supplier_proposal/card.php?id='.$id);
374 llxHeader(
'', $langs->trans(
'CommRequest'), $help_url);
377 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
378 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
379 if ($sall) $param .=
'&sall='.urlencode($sall);
380 if ($month) $param .=
'&month='.urlencode($month);
381 if ($year) $param .=
'&year='.urlencode($year);
382 if ($search_ref) $param .=
'&search_ref='.urlencode($search_ref);
383 if ($search_societe) $param .=
'&search_societe='.urlencode($search_societe);
384 if ($search_user > 0) $param .=
'&search_user='.urlencode($search_user);
385 if ($search_sale > 0) $param .=
'&search_sale='.urlencode($search_sale);
386 if ($search_montant_ht) $param .=
'&search_montant_ht='.urlencode($search_montant_ht);
387 if ($search_multicurrency_code !=
'') $param .=
'&search_multicurrency_code='.urlencode($search_multicurrency_code);
388 if ($search_multicurrency_tx !=
'') $param .=
'&search_multicurrency_tx='.urlencode($search_multicurrency_tx);
389 if ($search_multicurrency_montant_ht !=
'') $param .=
'&search_multicurrency_montant_ht='.urlencode($search_multicurrency_montant_ht);
390 if ($search_multicurrency_montant_vat !=
'') $param .=
'&search_multicurrency_montant_vat='.urlencode($search_multicurrency_montant_vat);
391 if ($search_multicurrency_montant_ttc !=
'') $param .=
'&search_multicurrency_montant_ttc='.urlencode($search_multicurrency_montant_ttc);
392 if ($search_login) $param .=
'&search_login='.urlencode($search_login);
393 if ($search_town) $param .=
'&search_town='.urlencode($search_town);
394 if ($search_zip) $param .=
'&search_zip='.urlencode($search_zip);
395 if ($socid > 0) $param .=
'&socid='.urlencode($socid);
396 if ($search_status !=
'') $param .=
'&search_status='.urlencode($search_status);
397 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
399 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
402 $arrayofmassactions = array(
403 'generate_doc'=>$langs->trans(
"ReGeneratePDF"),
404 'builddoc'=>$langs->trans(
"PDFMerge"),
407 if ($user->rights->supplier_proposal->supprimer) $arrayofmassactions[
'predelete'] =
'<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans(
"Delete");
408 if (in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
409 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
411 $url = DOL_URL_ROOT.
'/supplier_proposal/card.php?action=create';
412 if (!empty($socid)) $url .=
'&socid='.$socid;
413 $newcardbutton =
dolGetButtonTitle($langs->trans(
'NewAskPrice'),
'',
'fa fa-plus-circle', $url,
'', $user->rights->supplier_proposal->creer);
416 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
417 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
418 print '<input type="hidden" name="token" value="'.newToken().
'">';
419 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
420 print '<input type="hidden" name="action" value="list">';
421 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
422 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
424 print_barre_liste($title, $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'supplier_proposal', 0, $newcardbutton,
'', $limit, 0, 0, 1);
426 $topicmail =
"SendSupplierProposalRef";
427 $modelmail =
"supplier_proposal_send";
429 $trackid =
'spro'.$object->id;
430 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
434 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
435 print '<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $sall).join(
', ', $fieldstosearchall).
'</div>';
443 if ($user->rights->societe->client->voir || $socid)
445 $langs->load(
"commercial");
446 $moreforfilter .=
'<div class="divsearchfield">';
447 $moreforfilter .= $langs->trans(
'ThirdPartiesOfSaleRepresentative').
': ';
448 $moreforfilter .= $formother->select_salesrepresentatives($search_sale,
'search_sale', $user, 0, 1,
'maxwidth300');
449 $moreforfilter .=
'</div>';
452 if ($user->rights->societe->client->voir || $socid)
454 $moreforfilter .=
'<div class="divsearchfield">';
455 $moreforfilter .= $langs->trans(
'LinkedToSpecificUsers').
': ';
456 $moreforfilter .= $form->select_dolusers($search_user,
'search_user', 1,
'', 0,
'',
'', 0, 0, 0,
'', 0,
'',
'maxwidth300');
457 $moreforfilter .=
'</div>';
460 if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire))
462 include_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
463 $moreforfilter .=
'<div class="divsearchfield">';
464 $moreforfilter .= $langs->trans(
'IncludingProductWithTag').
': ';
465 $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null,
'parent', null, null, 1);
466 $moreforfilter .= $form->selectarray(
'search_product_category', $cate_arbo, $search_product_category, 1, 0, 0,
'', 0, 0, 0, 0,
'maxwidth300', 1);
467 $moreforfilter .=
'</div>';
469 $parameters = array();
470 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters);
471 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
472 else $moreforfilter = $hookmanager->resPrint;
474 if (!empty($moreforfilter))
476 print '<div class="liste_titre liste_titre_bydiv centpercent">';
477 print $moreforfilter;
481 $varpage = empty($contextpage) ?
$_SERVER[
"PHP_SELF"] : $contextpage;
482 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
483 if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons(
'checkforselect', 1);
485 print '<div class="div-table-responsive">';
486 print '<table class="tagtable liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
488 print '<tr class="liste_titre_filter">';
489 if (!empty($arrayfields[
'sp.ref'][
'checked']))
491 print
'<td class="liste_titre">';
492 print
'<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).
'">';
495 if (!empty($arrayfields[
's.nom'][
'checked']))
497 print
'<td class="liste_titre left">';
498 print
'<input class="flat" type="text" size="12" name="search_societe" value="'.dol_escape_htmltag($search_societe).
'">';
501 if (!empty($arrayfields[
's.town'][
'checked'])) print
'<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.$search_town.
'"></td>';
502 if (!empty($arrayfields[
's.zip'][
'checked'])) print
'<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.$search_zip.
'"></td>';
504 if (!empty($arrayfields[
'state.nom'][
'checked']))
506 print
'<td class="liste_titre">';
507 print
'<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).
'">';
511 if (!empty($arrayfields[
'country.code_iso'][
'checked']))
513 print
'<td class="liste_titre center">';
514 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
518 if (!empty($arrayfields[
'typent.code'][
'checked']))
520 print
'<td class="liste_titre maxwidthonsmartphone center">';
521 print $form->selectarray(
"search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0,
'', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ?
'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT));
525 if (!empty($arrayfields[
'sp.date_valid'][
'checked']))
527 print
'<td class="liste_titre center">';
529 print
'<input class="flat width25 valignmiddle" type="text" maxlength="2" name="monthvalid" value="'.dol_escape_htmltag($monthvalid).
'">';
531 $syearvalid = $yearvalid;
532 $formother->select_year($syearvalid,
'yearvalid', 1, 20, 5);
536 if (!empty($arrayfields[
'sp.date_livraison'][
'checked']))
538 print
'<td class="liste_titre center">';
540 print
'<input class="flat width25 valignmiddle" type="text" maxlength="2" name="month" value="'.dol_escape_htmltag($month).
'">';
543 $formother->select_year($syear,
'year', 1, 20, 5);
547 if (!empty($arrayfields[
'sp.total_ht'][
'checked']))
550 print
'<td class="liste_titre right">';
551 print
'<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).
'">';
554 if (!empty($arrayfields[
'sp.total_vat'][
'checked']))
557 print
'<td class="liste_titre right">';
558 print
'<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).
'">';
561 if (!empty($arrayfields[
'sp.total_ttc'][
'checked']))
564 print
'<td class="liste_titre right">';
565 print
'<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).
'">';
568 if (!empty($arrayfields[
'sp.multicurrency_code'][
'checked']))
571 print
'<td class="liste_titre">';
572 print $form->selectMultiCurrency($search_multicurrency_code,
'search_multicurrency_code', 1);
575 if (!empty($arrayfields[
'sp.multicurrency_tx'][
'checked']))
578 print
'<td class="liste_titre">';
579 print
'<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).
'">';
582 if (!empty($arrayfields[
'sp.multicurrency_total_ht'][
'checked']))
585 print
'<td class="liste_titre right">';
586 print
'<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).
'">';
589 if (!empty($arrayfields[
'sp.multicurrency_total_vat'][
'checked']))
592 print
'<td class="liste_titre right">';
593 print
'<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).
'">';
596 if (!empty($arrayfields[
'sp.multicurrency_total_ttc'][
'checked']))
599 print
'<td class="liste_titre right">';
600 print
'<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).
'">';
603 if (!empty($arrayfields[
'u.login'][
'checked']))
606 print
'<td class="liste_titre center">';
607 print
'<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).
'">';
611 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
613 $parameters = array(
'arrayfields'=>$arrayfields);
614 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters);
615 print $hookmanager->resPrint;
617 if (!empty($arrayfields[
'sp.datec'][
'checked']))
619 print
'<td class="liste_titre">';
623 if (!empty($arrayfields[
'sp.tms'][
'checked']))
625 print
'<td class="liste_titre">';
629 if (!empty($arrayfields[
'sp.fk_statut'][
'checked']))
631 print
'<td class="liste_titre maxwidthonsmartphone right">';
632 $formpropal->selectProposalStatus($search_status, 1, 0, 1,
'supplier',
'search_status');
636 print
'<td class="liste_titre middle">';
637 $searchpicto = $form->showFilterButtons();
644 print
'<tr class="liste_titre">';
645 if (!empty($arrayfields[
'sp.ref'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.ref'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.ref',
'', $param,
'', $sortfield, $sortorder);
646 if (!empty($arrayfields[
's.nom'][
'checked']))
print_liste_field_titre($arrayfields[
's.nom'][
'label'],
$_SERVER[
"PHP_SELF"],
's.nom',
'', $param,
'', $sortfield, $sortorder);
647 if (!empty($arrayfields[
's.town'][
'checked']))
print_liste_field_titre($arrayfields[
's.town'][
'label'],
$_SERVER[
"PHP_SELF"],
's.town',
'', $param,
'', $sortfield, $sortorder);
648 if (!empty($arrayfields[
's.zip'][
'checked']))
print_liste_field_titre($arrayfields[
's.zip'][
'label'],
$_SERVER[
"PHP_SELF"],
's.zip',
'', $param,
'', $sortfield, $sortorder);
649 if (!empty($arrayfields[
'state.nom'][
'checked']))
print_liste_field_titre($arrayfields[
'state.nom'][
'label'],
$_SERVER[
"PHP_SELF"],
"state.nom",
"", $param,
'', $sortfield, $sortorder);
650 if (!empty($arrayfields[
'country.code_iso'][
'checked']))
print_liste_field_titre($arrayfields[
'country.code_iso'][
'label'],
$_SERVER[
"PHP_SELF"],
"country.code_iso",
"", $param,
'', $sortfield, $sortorder,
'center ');
651 if (!empty($arrayfields[
'typent.code'][
'checked']))
print_liste_field_titre($arrayfields[
'typent.code'][
'label'],
$_SERVER[
"PHP_SELF"],
"typent.code",
"", $param,
'', $sortfield, $sortorder,
'center ');
652 if (!empty($arrayfields[
'sp.date_valid'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.date_valid'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.date_valid',
'', $param,
'', $sortfield, $sortorder,
'center ');
653 if (!empty($arrayfields[
'sp.date_livraison'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.date_livraison'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.date_livraison',
'', $param,
'', $sortfield, $sortorder,
'center ');
654 if (!empty($arrayfields[
'sp.total_ht'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.total_ht'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.total_ht',
'', $param,
'', $sortfield, $sortorder,
'right ');
655 if (!empty($arrayfields[
'sp.total_vat'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.total_vat'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.total_vat',
'', $param,
'', $sortfield, $sortorder,
'right ');
656 if (!empty($arrayfields[
'sp.total_ttc'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.total_ttc'][
'label'],
$_SERVER[
"PHP_SELF"],
'sp.total_ttc',
'', $param,
'', $sortfield, $sortorder,
'right ');
657 if (!empty($arrayfields[
'sp.multicurrency_code'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.multicurrency_code'][
'label'],
$_SERVER[
'PHP_SELF'],
'sp.multicurrency_code',
'', $param,
'', $sortfield, $sortorder);
658 if (!empty($arrayfields[
'sp.multicurrency_tx'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.multicurrency_tx'][
'label'],
$_SERVER[
'PHP_SELF'],
'sp.multicurrency_tx',
'', $param,
'', $sortfield, $sortorder);
659 if (!empty($arrayfields[
'sp.multicurrency_total_ht'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.multicurrency_total_ht'][
'label'],
$_SERVER[
'PHP_SELF'],
'sp.multicurrency_total_ht',
'', $param,
'class="right"', $sortfield, $sortorder);
660 if (!empty($arrayfields[
'sp.multicurrency_total_vat'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.multicurrency_total_vat'][
'label'],
$_SERVER[
'PHP_SELF'],
'sp.multicurrency_total_tva',
'', $param,
'class="right"', $sortfield, $sortorder);
661 if (!empty($arrayfields[
'sp.multicurrency_total_ttc'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.multicurrency_total_ttc'][
'label'],
$_SERVER[
'PHP_SELF'],
'sp.multicurrency_total_ttc',
'', $param,
'class="right"', $sortfield, $sortorder);
662 if (!empty($arrayfields[
'u.login'][
'checked']))
print_liste_field_titre($arrayfields[
'u.login'][
'label'],
$_SERVER[
"PHP_SELF"],
'u.login',
'', $param,
'', $sortfield, $sortorder,
'center ');
664 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
666 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
667 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters);
668 print $hookmanager->resPrint;
669 if (!empty($arrayfields[
'sp.datec'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.datec'][
'label'],
$_SERVER[
"PHP_SELF"],
"sp.datec",
"", $param,
'', $sortfield, $sortorder,
'center nowrap ');
670 if (!empty($arrayfields[
'sp.tms'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.tms'][
'label'],
$_SERVER[
"PHP_SELF"],
"sp.tms",
"", $param,
'', $sortfield, $sortorder,
'center nowrap');
671 if (!empty($arrayfields[
'sp.fk_statut'][
'checked']))
print_liste_field_titre($arrayfields[
'sp.fk_statut'][
'label'],
$_SERVER[
"PHP_SELF"],
"sp.fk_statut",
"", $param,
'', $sortfield, $sortorder,
'right ');
679 $totalarray = array();
680 while ($i < min($num, $limit))
682 $obj = $db->fetch_object(
$resql);
684 $objectstatic->id = $obj->rowid;
685 $objectstatic->ref = $obj->ref;
686 $objectstatic->note_public = $obj->note_public;
687 $objectstatic->note_private = $obj->note_private;
688 $objectstatic->status = $obj->status;
691 $companystatic->id = $obj->socid;
692 $companystatic->name = $obj->name;
693 $companystatic->client = $obj->client;
694 $companystatic->code_client = $obj->code_client;
696 print
'<tr class="oddeven">';
698 if (!empty($arrayfields[
'sp.ref'][
'checked']))
700 print
'<td class="nowrap">';
702 print
'<table class="nobordernopadding"><tr class="nocellnopadd">';
704 print
'<td class="nobordernopadding nowrap">';
705 print $objectstatic->getNomUrl(1,
'',
'', 0, -1, 1);
712 print
'<td style="min-width: 20px" class="nobordernopadding nowrap">';
717 print
'<td width="16" class="right nobordernopadding hideonsmartphone">';
720 $urlsource =
$_SERVER[
'PHP_SELF'].
'?id='.$obj->rowid;
721 print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
722 print
'</td></tr></table>';
725 if (!$i) $totalarray[
'nbfield']++;
729 if (!empty($arrayfields[
's.nom'][
'checked']))
731 print
'<td class="tdoverflowmax200">';
732 print $companystatic->getNomUrl(1,
'customer');
734 if (!$i) $totalarray[
'nbfield']++;
738 if (!empty($arrayfields[
's.town'][
'checked']))
740 print
'<td class="nocellnopadd">';
743 if (!$i) $totalarray[
'nbfield']++;
746 if (!empty($arrayfields[
's.zip'][
'checked']))
748 print
'<td class="nocellnopadd">';
751 if (!$i) $totalarray[
'nbfield']++;
754 if (!empty($arrayfields[
'state.nom'][
'checked']))
756 print
"<td>".$obj->state_name.
"</td>\n";
757 if (!$i) $totalarray[
'nbfield']++;
760 if (!empty($arrayfields[
'country.code_iso'][
'checked']))
762 print
'<td class="center">';
764 print $tmparray[
'label'];
766 if (!$i) $totalarray[
'nbfield']++;
769 if (!empty($arrayfields[
'typent.code'][
'checked']))
771 print
'<td class="center">';
772 if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1);
773 print $typenArray[$obj->typent_code];
775 if (!$i) $totalarray[
'nbfield']++;
779 if (!empty($arrayfields[
'sp.date_valid'][
'checked']))
781 print
'<td class="center">';
784 if (!$i) $totalarray[
'nbfield']++;
788 if (!empty($arrayfields[
'sp.date_livraison'][
'checked']))
790 print
'<td class="center">';
793 if (!$i) $totalarray[
'nbfield']++;
797 if (!empty($arrayfields[
'sp.total_ht'][
'checked']))
799 print
'<td class="right">'.price($obj->total_ht).
"</td>\n";
800 if (!$i) $totalarray[
'nbfield']++;
801 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
'sp.total_ht';
802 $totalarray[
'val'][
'sp.total_ht'] += $obj->total_ht;
805 if (!empty($arrayfields[
'sp.total_vat'][
'checked']))
807 print
'<td class="right">'.price($obj->total_vat).
"</td>\n";
808 if (!$i) $totalarray[
'nbfield']++;
809 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
'sp.total_vat';
810 $totalarray[
'val'][
'sp.total_vat'] += $obj->total_vat;
813 if (!empty($arrayfields[
'sp.total_ttc'][
'checked']))
815 print
'<td class="right">'.price($obj->total_ttc).
"</td>\n";
816 if (!$i) $totalarray[
'nbfield']++;
817 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
'sp.total_ttc';
818 $totalarray[
'val'][
'sp.total_ttc'] += $obj->total_ttc;
822 if (!empty($arrayfields[
'sp.multicurrency_code'][
'checked']))
824 print
'<td class="nowrap">'.$obj->multicurrency_code.
' - '.$langs->trans(
'Currency'.$obj->multicurrency_code).
"</td>\n";
825 if (!$i) $totalarray[
'nbfield']++;
829 if (!empty($arrayfields[
'sp.multicurrency_tx'][
'checked']))
831 print
'<td class="nowrap">';
832 $form->form_multicurrency_rate(
$_SERVER[
'PHP_SELF'].
'?id='.$obj->rowid, $obj->multicurrency_tx,
'none', $obj->multicurrency_code);
834 if (!$i) $totalarray[
'nbfield']++;
837 if (!empty($arrayfields[
'sp.multicurrency_total_ht'][
'checked']))
839 print
'<td class="right nowrap">'.price($obj->multicurrency_total_ht).
"</td>\n";
840 if (!$i) $totalarray[
'nbfield']++;
843 if (!empty($arrayfields[
'sp.multicurrency_total_vat'][
'checked']))
845 print
'<td class="right nowrap">'.price($obj->multicurrency_total_vat).
"</td>\n";
846 if (!$i) $totalarray[
'nbfield']++;
849 if (!empty($arrayfields[
'sp.multicurrency_total_ttc'][
'checked']))
851 print
'<td class="right nowrap">'.price($obj->multicurrency_total_ttc).
"</td>\n";
852 if (!$i) $totalarray[
'nbfield']++;
855 $userstatic->id = $obj->fk_user_author;
856 $userstatic->login = $obj->login;
859 if (!empty($arrayfields[
'u.login'][
'checked']))
861 print
'<td class="center">';
862 if ($userstatic->id) print $userstatic->getLoginUrl(1);
865 if (!$i) $totalarray[
'nbfield']++;
869 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
871 $parameters = array(
'arrayfields'=>$arrayfields,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
872 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters);
873 print $hookmanager->resPrint;
875 if (!empty($arrayfields[
'sp.datec'][
'checked']))
877 print
'<td class="center nowrap">';
878 print
dol_print_date($db->jdate($obj->date_creation),
'dayhour',
'tzuser');
880 if (!$i) $totalarray[
'nbfield']++;
883 if (!empty($arrayfields[
'sp.tms'][
'checked']))
885 print
'<td class="center nowrap">';
886 print
dol_print_date($db->jdate($obj->date_update),
'dayhour',
'tzuser');
888 if (!$i) $totalarray[
'nbfield']++;
891 if (!empty($arrayfields[
'sp.fk_statut'][
'checked']))
893 print
'<td class="right">'.$objectstatic->getLibStatut(5).
"</td>\n";
894 if (!$i) $totalarray[
'nbfield']++;
898 print
'<td class="nowrap center">';
899 if ($massactionbutton || $massaction)
902 if (in_array($obj->rowid, $arrayofselected)) $selected = 1;
903 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
906 if (!$i) $totalarray[
'nbfield']++;
910 $total += $obj->total_ht;
911 $subtotal += $obj->total_ht;
917 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
921 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
922 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters);
923 print $hookmanager->resPrint;
925 print
'</table>'.
"\n";
928 print
'</form>'.
"\n";
930 $hidegeneratedfilelistifempty = 1;
931 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
934 $urlsource =
$_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
935 $urlsource .= str_replace(
'&',
'&', $param);
937 $filedir = $diroutputmassaction;
939 $genallowed = $user->rights->supplier_proposal->lire;
940 $delallowed = $user->rights->supplier_proposal->creer;
942 print $formfile->showdocuments(
'massfilesarea_supplier_proposal',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'', null, $hidegeneratedfilelistifempty);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dolGetButtonTitle($label, $helpText= '', $iconClass= 'fa fa-file', $url= '', $id= '', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_now($mode= 'auto')
Return date for now.
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
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.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage third parties objects (customers, suppliers, prospects...)
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
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...
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $excludefirstand=0)
Generate a SQL string to make a filter into a range (for second of date until last second of date) ...
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_sort_array(&$array, $index, $order= 'asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Class to manage price ask supplier.
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...
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
getCountry($searchkey, $withcode= '', $dbtouse=0, $outputlangs= '', $entconv=1, $searchlabel= '')
Return country label, code or id from an id, code or label.