29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societe.class.php';
35 if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
36 require_once DOL_DOCUMENT_ROOT.
'/product/class/productcustomerprice.class.php';
41 $langs->loadLangs(array(
"products",
"companies",
"bills"));
43 $action =
GETPOST(
'action',
'aZ09');
44 $search_prod =
GETPOST(
'search_prod',
'alpha');
45 $cancel =
GETPOST(
'cancel',
'alpha');
46 $search_label =
GETPOST(
'search_label',
'alpha');
47 $search_price =
GETPOST(
'search_price');
48 $search_price_ttc =
GETPOST(
'search_price_ttc');
53 $socid = $user->socid;
59 $hookmanager->initHooks(array(
'thirdpartycustomerprice',
'globalcard'));
68 $parameters = array(
'id'=>$socid);
69 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
70 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
74 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
76 $search_prod = $search_label = $search_price = $search_price_ttc =
'';
79 if ($action ==
'add_customer_price_confirm' && !$cancel && ($user->rights->produit->creer || $user->rights->service->creer)) {
80 if (!(
GETPOST(
'prodid',
'int') > 0)) {
82 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->trans(
"Product")), null,
'errors');
83 $action =
'add_customer_price';
87 $update_child_soc =
GETPOST(
'updatechildprice');
90 $prodcustprice->fk_soc = $socid;
91 $prodcustprice->fk_product =
GETPOST(
'prodid',
'int');
94 $prodcustprice->price_base_type =
GETPOST(
"price_base_type",
'alpha');
96 $tva_tx_txt =
GETPOST(
'tva_tx',
'alpha');
100 $tva_tx = preg_replace(
'/[^0-9\.].*$/',
'', $tva_tx_txt);
101 $npr = preg_match(
'/\*/', $tva_tx_txt) ? 1 : 0;
102 $localtax1 = 0; $localtax2 = 0; $localtax1_type =
'0'; $localtax2_type =
'0';
104 if (preg_match(
'/\((.*)\)/', $tva_tx_txt, $reg))
107 $vatratecode = $reg[1];
109 $sql =
"SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
110 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_tva as t, ".MAIN_DB_PREFIX.
"c_country as c";
111 $sql .=
" WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($mysoc->country_code).
"'";
112 $sql .=
" AND t.taux = ".((float) $tva_tx).
" AND t.active = 1";
113 $sql .=
" AND t.code ='".$db->escape($vatratecode).
"'";
114 $resql = $db->query($sql);
117 $obj = $db->fetch_object(
$resql);
118 $npr = $obj->recuperableonly;
119 $localtax1 = $obj->localtax1;
120 $localtax2 = $obj->localtax2;
121 $localtax1_type = $obj->localtax1_type;
122 $localtax2_type = $obj->localtax2_type;
126 $prodcustprice->default_vat_code = $vatratecode;
127 $prodcustprice->tva_tx = $tva_tx;
128 $prodcustprice->recuperableonly = $npr;
129 $prodcustprice->localtax1_tx = $localtax1;
130 $prodcustprice->localtax2_tx = $localtax2;
131 $prodcustprice->localtax1_type = $localtax1_type;
132 $prodcustprice->localtax2_type = $localtax2_type;
134 $result = $prodcustprice->create($user, 0, $update_child_soc);
146 if ($action ==
'delete_customer_price' && ($user->rights->produit->creer || $user->rights->service->creer)) {
148 $prodcustprice->id =
GETPOST(
'lineid');
149 $result = $prodcustprice->delete($user);
159 if ($action ==
'update_customer_price_confirm' && !$_POST [
"cancel"] && ($user->rights->produit->creer || $user->rights->service->creer)) {
160 $prodcustprice->fetch(
GETPOST(
'lineid',
'int'));
162 $update_child_soc =
GETPOST(
'updatechildprice');
167 $prodcustprice->price_base_type =
GETPOST(
"price_base_type",
'alpha');
168 $prodcustprice->tva_tx = str_replace(
'*',
'',
GETPOST(
"tva_tx"));
169 $prodcustprice->recuperableonly = (preg_match(
'/\*/',
GETPOST(
"tva_tx")) ? 1 : 0);
171 $result = $prodcustprice->update($user, 0, $update_child_soc);
187 $form =
new Form($db);
191 $result = $object->fetch($socid);
192 llxHeader(
"", $langs->trans(
"ThirdParty").
'-'.$langs->trans(
'PriceByCustomer'));
194 if (!empty($conf->notification->enabled))
195 $langs->load(
"mails");
200 $linkback =
'<a href="'.DOL_URL_ROOT.
'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
202 dol_banner_tab($object,
'socid', $linkback, ($user->socid ? 0 : 1),
'rowid',
'nom');
204 print '<div class="fichecenter">';
206 print '<div class="underbanner clearboth"></div>';
207 print '<table class="border centpercent">';
209 if (!empty($conf->global->SOCIETE_USEPREFIX))
211 print '<tr><td class="titlefield">'.$langs->trans(
'Prefix').
'</td><td colspan="3">'.$object->prefix_comm.
'</td></tr>';
214 if ($object->client) {
215 print '<tr><td class="titlefield">';
216 print $langs->trans(
'CustomerCode').
'</td><td colspan="3">';
217 print $object->code_client;
218 $tmpcheck = $object->check_codeclient();
219 if ($tmpcheck != 0 && $tmpcheck != -5) {
220 print ' <font class="error">('.$langs->trans(
"WrongCustomerCode").
')</font>';
225 if ($object->fournisseur) {
226 print '<tr><td class="titlefield">';
227 print $langs->trans(
'SupplierCode').
'</td><td colspan="3">';
228 print $object->code_fournisseur;
229 $tmpcheck = $object->check_codefournisseur();
230 if ($tmpcheck != 0 && $tmpcheck != -5) {
231 print ' <font class="error">('.$langs->trans(
"WrongSupplierCode").
')</font>';
244 if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
247 $sortfield =
GETPOST(
"sortfield",
'alpha');
248 $sortorder =
GETPOST(
"sortorder",
'alpha');
249 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
251 if (empty($page) || $page == -1) { $page = 0; }
252 $offset = $limit * $page;
253 $pageprev = $page - 1;
254 $pagenext = $page + 1;
258 $sortfield =
"soc.nom";
262 't.fk_soc' => $object->id
265 if (!empty($search_prod)) {
266 $filter [
'prod.ref'] = $search_prod;
269 if (!empty($search_label)) {
270 $filter [
'prod.label'] = $search_label;
273 if (!empty($search_price)) {
274 $filter [
't.price'] = $search_price;
277 if (!empty($search_price_ttc)) {
278 $filter [
't.price_ttc'] = $search_price_ttc;
281 if ($action ==
'add_customer_price') {
285 print '<!-- Price by customer -->'.
"\n";
289 print '<form action="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'" method="POST">';
290 print '<input type="hidden" name="token" value="'.newToken().
'">';
291 print '<input type="hidden" name="action" value="add_customer_price_confirm">';
292 print '<input type="hidden" name="socid" value="'.$object->id.
'">';
293 print '<table class="border centpercent">';
295 print '<td>'.$langs->trans(
'Product').
'</td>';
297 $form->select_produits(
'',
'prodid',
'', 0);
302 print '<tr><td>'.$langs->trans(
"VATRate").
'</td><td>';
303 print $form->load_tva(
"tva_tx", $object->tva_tx, $mysoc,
'', $object->id, $object->tva_npr,
'',
false, 1);
307 print '<tr><td width="15%">';
308 print $langs->trans(
'PriceBase');
311 print $form->selectPriceBaseType($object->price_base_type,
"price_base_type");
316 print '<tr><td width="20%">';
317 $text = $langs->trans(
'SellingPrice');
318 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
320 if ($object->price_base_type ==
'TTC') {
321 print '<input name="price" size="10" value="'.price($object->price_ttc).
'">';
323 print '<input name="price" size="10" value="'.price($object->price).
'">';
329 $text = $langs->trans(
'MinPrice');
330 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
331 if ($object->price_base_type ==
'TTC') {
332 print '<td><input name="price_min" size="10" value="'.price($object->price_min_ttc).
'">';
334 print '<td><input name="price_min" size="10" value="'.price($object->price_min).
'">';
339 print '<tr><td width="15%">';
340 print $langs->trans(
'ForceUpdateChildPriceSoc');
343 print '<input type="checkbox" name="updatechildprice" value="1"/>';
349 print '<br><div class="center">';
350 print '<input type="submit" class="button button-save" value="'.$langs->trans(
"Save").
'">';
351 print ' ';
352 print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
356 } elseif ($action ==
'edit_customer_price') {
361 $result = $prodcustprice->fetch(
GETPOST(
'lineid',
'int'));
367 print '<form action="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'" method="POST">';
368 print '<input type="hidden" name="token" value="'.newToken().
'">';
369 print '<input type="hidden" name="action" value="update_customer_price_confirm">';
370 print '<input type="hidden" name="lineid" value="'.$prodcustprice->id.
'">';
371 print '<table class="border centpercent">';
373 print '<td>'.$langs->trans(
'Product').
'</td>';
374 $staticprod =
new Product($db);
375 $staticprod->fetch($prodcustprice->fk_product);
376 print "<td>".$staticprod->getNomUrl(1).
"</td>";
380 print '<tr><td>'.$langs->trans(
"VATRate").
'</td><td>';
381 print $form->load_tva(
"tva_tx", $prodcustprice->tva_tx, $mysoc,
'', $staticprod->id, $prodcustprice->recuperableonly);
385 print '<tr><td width="15%">';
386 print $langs->trans(
'PriceBase');
389 print $form->selectPriceBaseType($prodcustprice->price_base_type,
"price_base_type");
394 print '<tr><td width="20%">';
395 $text = $langs->trans(
'SellingPrice');
396 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
398 if ($prodcustprice->price_base_type ==
'TTC') {
399 print '<input name="price" size="10" value="'.price($prodcustprice->price_ttc).
'">';
401 print '<input name="price" size="10" value="'.price($prodcustprice->price).
'">';
407 $text = $langs->trans(
'MinPrice');
408 print $form->textwithpicto($text, $langs->trans(
"PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
410 if ($prodcustprice->price_base_type ==
'TTC') {
411 print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min_ttc).
'">';
413 print '<input name="price_min" size="10" value="'.price($prodcustprice->price_min).
'">';
418 print '<tr><td width="15%">';
419 print $langs->trans(
'ForceUpdateChildPriceSoc');
422 print '<input type="checkbox" name="updatechildprice" value="1">';
428 print '<br><div class="center">';
429 print '<input type="submit" class="button button-save" value="'.$langs->trans(
"Save").
'">';
430 print ' ';
431 print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
435 } elseif ($action ==
'showlog_customer_price') {
437 print '<!-- showlog_customer_price -->'.
"\n";
440 't.fk_product' =>
GETPOST(
'prodid',
'int'),
't.fk_soc' => $socid
444 $nbtotalofrecords =
'';
445 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
446 $nbtotalofrecords = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter);
449 $result = $prodcustprice->fetch_all_log($sortorder, $sortfield, $conf->liste_limit, $offset, $filter);
455 $option =
'&socid='.GETPOST(
'socid',
'int').
'&prodid='.
GETPOST(
'prodid',
'int');
457 print_barre_liste($langs->trans(
'PriceByCustomerLog'), $page,
$_SERVER [
'PHP_SELF'], $option, $sortfield, $sortorder,
'', count($prodcustprice->lines), $nbtotalofrecords);
459 if (count($prodcustprice->lines) > 0) {
460 print '<form action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'" method="POST">';
461 print '<input type="hidden" name="token" value="'.newToken().
'">';
462 print '<input type="hidden" name="id" value="'.$object->id.
'">';
464 print '<table class="noborder centpercent">';
466 print '<tr class="liste_titre">';
467 print '<td>'.$langs->trans(
"Product").
'</td>';
468 print '<td>'.$langs->trans(
"AppliedPricesFrom").
'</td>';
469 print '<td class="center">'.$langs->trans(
"PriceBase").
'</td>';
470 print '<td class="right">'.$langs->trans(
"VAT").
'</td>';
471 print '<td class="right">'.$langs->trans(
"HT").
'</td>';
472 print '<td class="right">'.$langs->trans(
"TTC").
'</td>';
473 print '<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"HT").
'</td>';
474 print '<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"TTC").
'</td>';
475 print '<td class="right">'.$langs->trans(
"ChangedBy").
'</td>';
476 print '<td> </td>';
479 foreach ($prodcustprice->lines as $line) {
480 print '<tr class="oddeven">';
481 $staticprod =
new Product($db);
482 $staticprod->fetch($line->fk_product);
484 print "<td>".$staticprod->getNomUrl(1).
"</td>";
485 print "<td>".dol_print_date($line->datec,
"dayhour").
"</td>";
487 print '<td class="center">'.$langs->trans($line->price_base_type).
"</td>";
488 print '<td class="right">'.vatrate($line->tva_tx,
true, $line->recuperableonly).
"</td>";
489 print '<td class="right">'.price($line->price).
"</td>";
490 print '<td class="right">'.price($line->price_ttc).
"</td>";
491 print '<td class="right">'.price($line->price_min).
'</td>';
492 print '<td class="right">'.price($line->price_min_ttc).
'</td>';
495 $userstatic =
new User($db);
496 $userstatic->fetch($line->fk_user);
497 print '<td class="right">';
498 print $userstatic->getLoginUrl(1);
503 print $langs->trans(
'None');
506 print "\n".
'<div class="tabsAction">'.
"\n";
507 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?socid='.$object->id.
'">'.$langs->trans(
"Ok").
'</a></div>';
508 print "\n</div><br>\n";
518 print "\n".
'<div class="tabsAction">'.
"\n";
520 if ($user->rights->produit->creer || $user->rights->service->creer) {
521 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=add_customer_price&socid='.$object->id.
'">'.$langs->trans(
"AddCustomerPrice").
'</a></div>';
527 $nbtotalofrecords =
'';
528 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
530 $nbtotalofrecords = $prodcustprice->fetch_all(
'',
'', 0, 0, $filter);
533 $result = $prodcustprice->fetch_all($sortorder, $sortfield, $conf->liste_limit, $offset, $filter);
539 $option =
'&search_prod='.$search_prod.
'&id='.$object->id.
'&label='.$search_label.
'&price='.$search_price.
'&price_ttc='.$search_price_ttc;
541 print '<!-- view specific price for each product -->'.
"\n";
543 print_barre_liste($langs->trans(
'PriceForEachProduct'), $page, $_SERVER[
'PHP_SELF'], $option, $sortfield, $sortorder,
'', count($prodcustprice->lines), $nbtotalofrecords,
'');
545 print '<form action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'" method="POST">';
546 print '<input type="hidden" name="token" value="'.newToken().
'">';
547 print '<input type="hidden" name="id" value="'.$object->id.
'">';
549 print '<table class="noborder centpercent">';
551 print '<tr class="liste_titre">';
552 print '<td>'.$langs->trans(
"Ref").
'</td>';
553 print '<td>'.$langs->trans(
"Product").
'</td>';
554 print '<td>'.$langs->trans(
"AppliedPricesFrom").
'</td>';
555 print '<td class="center">'.$langs->trans(
"PriceBase").
'</td>';
556 print '<td class="right">'.$langs->trans(
"VAT").
'</td>';
557 print '<td class="right">'.$langs->trans(
"HT").
'</td>';
558 print '<td class="right">'.$langs->trans(
"TTC").
'</td>';
559 print '<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"HT").
'</td>';
560 print '<td class="right">'.$langs->trans(
"MinPrice").
' '.$langs->trans(
"TTC").
'</td>';
561 print '<td class="right">'.$langs->trans(
"ChangedBy").
'</td>';
562 print '<td> </td>';
565 if (count($prodcustprice->lines) > 0 || $search_prod)
567 print '<tr class="liste_titre">';
568 print '<td class="liste_titre"><input type="text" class="flat" name="search_prod" value="'.$search_prod.
'" size="20"></td>';
569 print '<td class="liste_titre" ><input type="text" class="flat" name="search_label" value="'.$search_label.
'" size="20"></td>';
570 print '<td class="liste_titre" colspan="3"> </td>';
571 print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_price" value="'.$search_price.
'" size="10"></td>';
572 print '<td class="liste_titre" align="right"><input type="text" class="flat" name="search_price_ttc" value="'.$search_price_ttc.
'" size="10"></td>';
573 print '<td class="liste_titre" colspan="3"> </td>';
575 print '<td class="liste_titre maxwidthsearch">';
576 $searchpicto = $form->showFilterAndCheckAddButtons(0);
582 if (count($prodcustprice->lines) > 0)
584 foreach ($prodcustprice->lines as $line)
586 print '<tr class="oddeven">';
588 $staticprod =
new Product($db);
589 $staticprod->fetch($line->fk_product);
591 print "<td>".$staticprod->getNomUrl(1).
"</td>";
592 print "<td>".$staticprod->label.
"</td>";
593 print "<td>".dol_print_date($line->datec,
"dayhour").
"</td>";
595 print '<td class="center">'.$langs->trans($line->price_base_type).
"</td>";
596 print '<td class="right">'.vatrate($line->tva_tx.($line->default_vat_code ?
' ('.$line->default_vat_code.
')' :
''),
true, $line->recuperableonly).
"</td>";
597 print '<td class="right">'.price($line->price).
"</td>";
598 print '<td class="right">'.price($line->price_ttc).
"</td>";
599 print '<td class="right">'.price($line->price_min).
'</td>';
600 print '<td class="right">'.price($line->price_min_ttc).
'</td>';
603 $userstatic =
new User($db);
604 $userstatic->fetch($line->fk_user);
605 print '<td class="right">';
606 print $userstatic->getLoginUrl(1);
610 if ($user->rights->produit->creer || $user->rights->service->creer)
612 print '<td class="right nowraponall">';
613 print '<a class="paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=showlog_customer_price&socid='.$object->id.
'&prodid='.$line->fk_product.
'">';
617 print '<a class="editfielda paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit_customer_price&socid='.$object->id.
'&lineid='.$line->id.
'">';
618 print img_edit(
'default', 0,
'style="vertical-align: middle;"');
621 print '<a class="paddingleftonly paddingrightonly" href="'.$_SERVER[
"PHP_SELF"].
'?action=delete_customer_price&token='.
newToken().
'&socid='.$object->id.
'&lineid='.$line->id.
'">';
631 if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan += 1;
632 print '<tr class="oddeven"><td colspan="'.$colspan.
'">'.$langs->trans(
'None').
'</td></tr>';
File of class to manage predefined price products or services by customer.
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
Class to manage products or services.
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...)
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
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.
societe_prepare_head(Societe $object)
Return array of tabs to used on pages for third parties cards.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
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.
img_info($titlealt= 'default')
Show info logo.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
img_delete($titlealt= 'default', $other= 'class="pictodelete"', $morecss= '')
Show delete logo.