32require
'../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
39 require_once DOL_DOCUMENT_ROOT.
'/product/class/productcustomerprice.class.php';
46$langs->loadLangs(array(
"products",
"companies",
"bills"));
50$action =
GETPOST(
'action',
'aZ09');
51$search_prod =
GETPOST(
'search_prod',
'alpha');
52$cancel =
GETPOST(
'cancel',
'alpha');
53$search_label =
GETPOST(
'search_label',
'alpha');
54$search_price =
GETPOST(
'search_price');
55$search_price_ttc =
GETPOST(
'search_price_ttc');
60 $socid = $user->socid;
68$hookmanager->initHooks(array(
'thirdpartycustomerprice',
'globalcard'));
77$parameters = array(
'id'=>$socid);
78$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
84 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
85 $search_prod = $search_label = $search_price = $search_price_ttc =
'';
88 if ($action ==
'add_customer_price_confirm' && !$cancel && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
89 if (!(
GETPOST(
'prodid',
'int') > 0)) {
91 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->trans(
"Product")),
null,
'errors');
92 $action =
'add_customer_price';
96 $update_child_soc =
GETPOST(
'updatechildprice');
99 $prodcustprice->fk_soc = $socid;
100 $prodcustprice->ref_customer =
GETPOST(
'ref_customer',
'alpha');
101 $prodcustprice->fk_product =
GETPOST(
'prodid',
'int');
104 $prodcustprice->price_base_type =
GETPOST(
"price_base_type",
'alpha');
106 $tva_tx_txt =
GETPOST(
'tva_tx',
'alpha');
110 $tva_tx = preg_replace(
'/[^0-9\.].*$/',
'', $tva_tx_txt);
111 $npr = preg_match(
'/\*/', $tva_tx_txt) ? 1 : 0;
114 $localtax1_type =
'0';
115 $localtax2_type =
'0';
117 if (preg_match(
'/\((.*)\)/', $tva_tx_txt, $reg)) {
119 $vatratecode = $reg[1];
121 $sql =
"SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
122 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_tva as t, ".MAIN_DB_PREFIX.
"c_country as c";
123 $sql .=
" WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($mysoc->country_code).
"'";
124 $sql .=
" AND t.taux = ".((float) $tva_tx).
" AND t.active = 1";
125 $sql .=
" AND t.code = '".$db->escape($vatratecode).
"'";
126 $sql .=
" AND t.entity IN (".getEntity(
'c_tva').
")";
127 $resql = $db->query($sql);
129 $obj = $db->fetch_object($resql);
130 $npr = $obj->recuperableonly;
131 $localtax1 = $obj->localtax1;
132 $localtax2 = $obj->localtax2;
133 $localtax1_type = $obj->localtax1_type;
134 $localtax2_type = $obj->localtax2_type;
138 $prodcustprice->default_vat_code = $vatratecode;
139 $prodcustprice->tva_tx = $tva_tx;
140 $prodcustprice->recuperableonly = $npr;
141 $prodcustprice->localtax1_tx = $localtax1;
142 $prodcustprice->localtax2_tx = $localtax2;
143 $prodcustprice->localtax1_type = $localtax1_type;
144 $prodcustprice->localtax2_type = $localtax2_type;
146 $result = $prodcustprice->create($user, 0, $update_child_soc);
158 if ($action ==
'delete_customer_price' && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
160 $prodcustprice->id =
GETPOST(
'lineid',
'int');
161 $result = $prodcustprice->delete($user);
171 if ($action ==
'update_customer_price_confirm' && !$cancel && ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer'))) {
172 $prodcustprice->fetch(
GETPOST(
'lineid',
'int'));
174 $update_child_soc =
GETPOST(
'updatechildprice');
177 $prodcustprice->ref_customer =
GETPOST(
'ref_customer',
'alpha');
180 $prodcustprice->price_base_type =
GETPOST(
"price_base_type",
'alpha');
181 $prodcustprice->tva_tx = str_replace(
'*',
'',
GETPOST(
"tva_tx"));
182 $prodcustprice->recuperableonly = (preg_match(
'/\*/',
GETPOST(
"tva_tx")) ? 1 : 0);
184 $result = $prodcustprice->update($user, 0, $update_child_soc);
200$form =
new Form($db);
204$result = $object->fetch($socid);
205llxHeader(
"", $langs->trans(
"ThirdParty").
'-'.$langs->trans(
'PriceByCustomer'));
207if (isModEnabled(
'notification')) {
208 $langs->load(
"mails");
214$linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
216dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
218print
'<div class="fichecenter">';
220print
'<div class="underbanner clearboth"></div>';
221print
'<table class="border centpercent tableforfield">';
224print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
225print $object->getTypeUrl(1);
229 print
'<tr><td class="titlefield">'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
232if ($object->client) {
233 print
'<tr><td class="titlefield">';
234 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
235 print $object->code_client;
236 $tmpcheck = $object->check_codeclient();
237 if ($tmpcheck != 0 && $tmpcheck != -5) {
238 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
243if ($object->fournisseur) {
244 print
'<tr><td class="titlefield">';
245 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
246 print $object->code_fournisseur;
247 $tmpcheck = $object->check_codefournisseur();
248 if ($tmpcheck != 0 && $tmpcheck != -5) {
249 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
265 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
266 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
267 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
268 $page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
269 if (empty($page) || $page == -1) {
272 $offset = $limit * $page;
273 $pageprev = $page - 1;
274 $pagenext = $page + 1;
279 $sortfield =
"soc.nom";
284 't.fk_soc' => $object->id
287 if (!empty($search_prod)) {
288 $filter [
'prod.ref'] = $search_prod;
291 if (!empty($search_label)) {
292 $filter [
'prod.label'] = $search_label;
295 if (!empty($search_price)) {
296 $filter [
't.price'] = $search_price;
299 if (!empty($search_price_ttc)) {
300 $filter [
't.price_ttc'] = $search_price_ttc;
303 if ($action ==
'add_customer_price') {
307 print
'<!-- Price by customer -->'.
"\n";
311 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'" method="POST">';
312 print
'<input type="hidden" name="token" value="'.newToken().
'">';
313 print
'<input type="hidden" name="action" value="add_customer_price_confirm">';
314 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
315 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
316 print
'<input type="hidden" name="socid" value="'.$object->id.
'">';
317 print
'<table class="border centpercent">';
319 print
'<td>'.$langs->trans(
'Product').
'</td>';
321 $form->select_produits(
'',
'prodid',
'', 0);
326 print
'<tr><td>'.$langs->trans(
'RefCustomer').
'</td>';
327 print
'<td><input name="ref_customer" size="12"></td></tr>';
330 print
'<tr><td>'.$langs->trans(
"VATRate").
'</td><td>';
331 print $form->load_tva(
"tva_tx",
GETPOST(
"tva_tx",
"alpha"), $mysoc,
'', $object->id, 0,
'',
false, 1);
335 print
'<tr><td width="15%">';
336 print $langs->trans(
'PriceBase');
339 print $form->selectPriceBaseType(
GETPOST(
"price_base_type",
"aZ09"),
"price_base_type");
344 print
'<tr><td width="20%">';
345 $text = $langs->trans(
'SellingPrice');
346 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
348 print
'<input name="price" size="10" value="'.GETPOST(
'price',
'int').
'">';
353 $text = $langs->trans(
'MinPrice');
354 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
355 print
'<td><input name="price_min" size="10" value="'.GETPOST(
'price_min',
'int').
'">';
359 print
'<tr><td width="15%">';
360 print $langs->trans(
'ForceUpdateChildPriceSoc');
363 print
'<input type="checkbox" name="updatechildprice" value="1"/>';
369 print $form->buttonsSaveCancel();
372 } elseif ($action ==
'edit_customer_price') {
377 $result = $prodcustprice->fetch(
GETPOST(
'lineid',
'int'));
382 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'" method="POST">';
383 print
'<input type="hidden" name="token" value="'.newToken().
'">';
384 print
'<input type="hidden" name="action" value="update_customer_price_confirm">';
385 print
'<input type="hidden" name="lineid" value="'.$prodcustprice->id.
'">';
386 print
'<table class="border centpercent">';
388 print
'<td>'.$langs->trans(
'Product').
'</td>';
389 $staticprod =
new Product($db);
390 $staticprod->fetch($prodcustprice->fk_product);
391 print
"<td>".$staticprod->getNomUrl(1).
"</td>";
395 print
'<tr><td>'.$langs->trans(
'RefCustomer').
'</td>';
396 print
'<td><input name="ref_customer" size="12" value="'.dol_escape_htmltag($prodcustprice->ref_customer).
'"></td></tr>';
399 print
'<tr><td>'.$langs->trans(
"VATRate").
'</td><td>';
400 print $form->load_tva(
"tva_tx", $prodcustprice->tva_tx, $mysoc,
'', $staticprod->id, $prodcustprice->recuperableonly);
404 print
'<tr><td width="15%">';
405 print $langs->trans(
'PriceBase');
408 print $form->selectPriceBaseType($prodcustprice->price_base_type,
"price_base_type");
414 $text = $langs->trans(
'SellingPrice');
415 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
417 if ($prodcustprice->price_base_type ==
'TTC') {
418 print
'<input name="price" size="10" value="'.price($prodcustprice->price_ttc).
'">';
420 print
'<input name="price" size="10" value="'.price($prodcustprice->price).
'">';
426 $text = $langs->trans(
'MinPrice');
427 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
429 if ($prodcustprice->price_base_type ==
'TTC') {
430 print
'<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).
'">';
432 print
'<input name="price_min" size="10" value="'.price($prodcustprice->price_min).
'">';
438 print $langs->trans(
'ForceUpdateChildPriceSoc');
441 print
'<input type="checkbox" name="updatechildprice" value="1">';
447 print $form->buttonsSaveCancel();
451 } elseif ($action ==
'showlog_customer_price') {
453 print
'<!-- showlog_customer_price -->'.
"\n";
456 't.fk_product' =>
GETPOST(
'prodid',
'int'),
461 $nbtotalofrecords =
'';
462 $result = $prodcustprice->fetchAllLog($sortorder, $sortfield, $conf->liste_limit, $offset, $filter);
467 $nbtotalofrecords = $result;
471 $option =
'&socid='.GETPOST(
'socid',
'int').
'&prodid='.
GETPOST(
'prodid',
'int');
473 print_barre_liste($langs->trans(
'PriceByCustomerLog'), $page, $_SERVER [
'PHP_SELF'], $option, $sortfield, $sortorder,
'', count($prodcustprice->lines), $nbtotalofrecords);
475 if (count($prodcustprice->lines) > 0) {
476 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'" method="POST">';
477 print
'<input type="hidden" name="token" value="'.newToken().
'">';
478 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
480 print
'<table class="noborder centpercent">';
482 print
'<tr class="liste_titre">';
483 print
'<td>'.$langs->trans(
"Product").
'</td>';
484 print
'<td>'.$langs->trans(
'RefCustomer').
'</td>';
485 print
'<td>'.$langs->trans(
"AppliedPricesFrom").
'</td>';
486 print
'<td class="center">'.$langs->trans(
"PriceBase").
'</td>';
487 print
'<td class="right">'.$langs->trans(
"VAT").
'</td>';
488 print
'<td class="right">'.$langs->trans(
"HT").
'</td>';
489 print
'<td class="right">'.$langs->trans(
"TTC").
'</td>';
490 print
'<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"HT").
'</td>';
491 print
'<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"TTC").
'</td>';
492 print
'<td class="right">'.$langs->trans(
"ChangedBy").
'</td>';
496 foreach ($prodcustprice->lines as $line) {
497 $staticprod =
new Product($db);
498 $staticprod->fetch($line->fk_product);
500 $userstatic =
new User($db);
501 $userstatic->fetch($line->fk_user);
503 print
'<tr class="oddeven">';
505 print
"<td>".$staticprod->getNomUrl(1).
"</td>";
506 print
'<td>'.$line->ref_customer.
'</td>';
507 print
"<td>".dol_print_date($line->datec,
"dayhour").
"</td>";
509 print
'<td class="center">'.$langs->trans($line->price_base_type).
"</td>";
510 print
'<td class="right">'.vatrate($line->tva_tx,
true, $line->recuperableonly).
"</td>";
511 print
'<td class="right">'.price($line->price).
"</td>";
512 print
'<td class="right">'.price($line->price_ttc).
"</td>";
513 print
'<td class="right">'.price($line->price_min).
'</td>';
514 print
'<td class="right">'.price($line->price_min_ttc).
'</td>';
517 print
'<td class="right">';
518 print $userstatic->getNomUrl(-1);
524 print $langs->trans(
'None');
527 print
"\n".
'<div class="tabsAction">'.
"\n";
528 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'">'.$langs->trans(
"Ok").
'</a></div>';
529 print
"\n</div><br>\n";
536 print
"\n".
'<div class="tabsAction">'.
"\n";
538 if ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer')) {
539 print
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=add_customer_price&token='.newToken().
'&socid='.$object->id.
'">'.$langs->trans(
"AddCustomerPrice").
'</a></div>';
544 $arrayfields = array();
545 foreach ($prodcustprice->fields as $key => $val) {
547 if (!empty($val[
'visible'])) {
548 $visible = (int)
dol_eval($val[
'visible'], 1, 1,
'1');
549 $arrayfields[
't.'.$key] = array(
550 'label'=>$val[
'label'],
551 'checked'=>(($visible < 0) ? 0 : 1),
552 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1, 1,
'1')),
553 'position'=>$val[
'position'],
554 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
561 $nbtotalofrecords =
'';
563 $nbtotalofrecords = $prodcustprice->fetchAll(
'',
'', 0, 0, $filter);
566 $result = $prodcustprice->fetchAll($sortorder, $sortfield, $conf->liste_limit, $offset, $filter);
571 $option =
'&search_prod='.$search_prod.
'&id='.$object->id.
'&label='.$search_label.
'&price='.$search_price.
'&price_ttc='.$search_price_ttc;
573 print
'<!-- view specific price for each product -->'.
"\n";
575 print_barre_liste($langs->trans(
'PriceForEachProduct'), $page, $_SERVER[
'PHP_SELF'], $option, $sortfield, $sortorder,
'', count($prodcustprice->lines), $nbtotalofrecords,
'');
577 print
'<form action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'" method="POST">';
578 print
'<input type="hidden" name="token" value="'.newToken().
'">';
579 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
580 if (!empty($sortfield)) {
581 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'"/>';
583 if (!empty($sortorder)) {
584 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'"/>';
586 print
'<div class="div-table-responsive-no-min">';
587 print
'<table class="noborder centpercent liste">';
589 $param =
'socid='.$object->id.
'&';
591 $param .=
'&search_prod='.urlencode($search_prod);
594 $param .=
'&search_label='.urlencode($search_label);
597 $param .=
'&search_price='.urlencode($search_price);
600 $param .=
'&search_price='.urlencode($search_price);
602 if ($search_price_ttc) {
603 $param .=
'&search_price_ttc='.urlencode($search_price_ttc);
606 print
'<tr class="liste_titre">';
607 foreach ($prodcustprice->fields as $key => $val) {
608 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
609 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'], $key,
'', $param,
'', $sortfield, $sortorder).
"\n";
615 if (count($prodcustprice->lines) > 0 || $search_prod) {
616 print
'<tr class="liste_titre">';
617 print
'<td class="liste_titre"><input type="text" class="flat width75" name="search_prod" value="'.$search_prod.
'"></td>';
618 print
'<td class="liste_titre" ><input type="text" class="flat width75" name="search_label" value="'.$search_label.
'"></td>';
619 print
'<td class="liste_titre"></td>';
620 print
'<td class="liste_titre"></td>';
621 print
'<td class="liste_titre"></td>';
622 print
'<td class="liste_titre"></td>';
623 print
'<td class="liste_titre left"><input type="text" class="flat width75" name="search_price" value="'.$search_price.
'"></td>';
624 print
'<td class="liste_titre left"><input type="text" class="flat width75" name="search_price_ttc" value="'.$search_price_ttc.
'"></td>';
625 print
'<td class="liste_titre"></td>';
626 print
'<td class="liste_titre"></td>';
627 print
'<td class="liste_titre"></td>';
629 print
'<td class="liste_titre maxwidthsearch">';
630 $searchpicto = $form->showFilterAndCheckAddButtons(0);
636 if (count($prodcustprice->lines) > 0) {
637 foreach ($prodcustprice->lines as $line) {
638 $staticprod =
new Product($db);
639 $staticprod->fetch($line->fk_product);
641 $userstatic =
new User($db);
642 $userstatic->fetch($line->fk_user);
644 print
'<tr class="oddeven">';
646 print
'<td class="left">'.$staticprod->getNomUrl(1).
"</td>";
647 print
'<td class="left">'.$staticprod->label.
"</td>";
648 print
'<td class="left">'.$line->ref_customer.
'</td>';
649 print
'<td class="left">'.dol_print_date($line->datec,
"dayhour").
"</td>";
650 print
'<td class="left">'.$langs->trans($line->price_base_type).
"</td>";
651 print
'<td class="left">'.vatrate($line->tva_tx.($line->default_vat_code ?
' ('.$line->default_vat_code.
')' :
''), true, $line->recuperableonly).
"</td>";
652 print
'<td class="left">'.price($line->price).
"</td>";
653 print
'<td class="left">'.price($line->price_ttc).
"</td>";
654 print
'<td class="left">'.price($line->price_min).
'</td>';
655 print
'<td class="left">'.price($line->price_min_ttc).
'</td>';
657 print
'<td class="left">';
658 print $userstatic->getNomUrl(-1);
661 if ($user->hasRight(
'produit',
'creer') || $user->hasRight(
'service',
'creer')) {
662 print
'<td class="right nowraponall">';
663 print
'<a class="paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=showlog_customer_price&token='.newToken().
'&socid='.$object->id.
'&prodid='.$line->fk_product.
'">';
667 print
'<a class="editfielda paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit_customer_price&token='.newToken().
'&socid='.$object->id.
'&lineid='.$line->id.
'">';
668 print
img_edit(
'default', 0,
'style="vertical-align: middle;"');
671 print
'<a class="paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=delete_customer_price&token='.newToken().
'&socid='.$object->id.
'&lineid='.$line->id.
'">';
672 print
img_delete(
'default',
'style="vertical-align: middle;"');
681 if ($user->hasRight(
'produit',
'supprimer') || $user->hasRight(
'service',
'supprimer')) {
684 print
'<tr class="oddeven"><td colspan="'.$colspan.
'">'.$langs->trans(
'None').
'</td></tr>';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
File of class to manage predefined price products or services by customer.
Class to manage products or services.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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...
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo editer/modifier fiche.
img_info($titlealt='default')
Show info logo.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.