28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/bom/class/bom.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/bom/lib/bom.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/mrp/lib/mrp.lib.php';
37$langs->loadLangs(array(
'mrp',
'other'));
43$action =
GETPOST(
'action',
'aZ09');
44$confirm =
GETPOST(
'confirm',
'alpha');
45$cancel =
GETPOST(
'cancel',
'aZ09');
46$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'bomcard';
47$backtopage =
GETPOST(
'backtopage',
'alpha');
58$diroutputmassaction = $conf->bom->dir_output.
'/temp/massgeneration/'.$user->id;
59$hookmanager->initHooks(array(
'bomcard',
'globalcard'));
62$extrafields->fetch_name_optionals_label(
$object->table_element);
63$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
66$search_all =
GETPOST(
"search_all",
'alpha');
68foreach (
$object->fields as $key => $val) {
69 if (
GETPOST(
'search_'.$key,
'alpha')) {
70 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
74if (empty($action) && empty($id) && empty($ref)) {
79include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
88$isdraft = ((
$object->status == $object::STATUS_DRAFT) ? 1 : 0);
92$permissionnote = $user->hasRight(
'bom',
'write');
93$permissiondellink = $user->hasRight(
'bom',
'write');
94$permissiontoadd = $user->hasRight(
'bom',
'write');
95$permissiontodelete = $user->hasRight(
'bom',
'delete') || ($permissiontoadd && isset(
$object->status) &&
$object->status == $object::STATUS_DRAFT);
96$upload_dir = $conf->bom->multidir_output[isset(
$object->entity) ?
$object->entity : 1];
103$parameters = array();
104$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
109if (empty($reshook)) {
112 $backurlforlist = DOL_URL_ROOT.
'/bom/bom_list.php';
114 if (empty($backtopage) || ($cancel && empty($id))) {
115 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
116 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
117 $backtopage = $backurlforlist;
119 $backtopage = DOL_URL_ROOT.
'/bom/bom_card.php?id='.($id > 0 ? $id :
'__ID__');
124 $triggermodname =
'BOM_MODIFY';
128 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
130 if ($action ==
'confirm_validate' &&
$object->id > 0) {
135 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
138 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
144 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
147 $triggersendname =
'BOM_SENTBYMAIL';
148 $autocopy =
'MAIN_MAIL_AUTOCOPY_BOM_TO';
149 $trackid =
'bom'.$object->id;
150 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
153 if ($action ==
'addline' && $user->hasRight(
'bom',
'write')) {
154 $langs->load(
'errors');
160 if ($bom_child_id > 0) {
161 $bom_child =
new BOM($db);
162 $res = $bom_child->fetch($bom_child_id);
164 $idprod = $bom_child->fk_product;
172 $disable_stock_change =
GETPOSTINT(
'disable_stock_change');
173 $fk_workstation =
GETPOSTINT(
'idworkstations');
175 $fk_unit =
GETPOST(
'fk_unit',
'alphanohtml');
177 $fk_default_workstation = 0;
178 if (!empty($idprod) && isModEnabled(
'workstation')) {
180 $res = $product->fetch($idprod);
182 if ($fk_workstation > 0) {
183 $fk_default_workstation = $fk_workstation;
185 $fk_default_workstation = $product->fk_default_workstation;
188 if (empty($fk_unit)) {
189 $fk_unit = $product->fk_unit;
194 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Qty')),
null,
'errors');
197 if (!($idprod > 0)) {
198 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Product')),
null,
'errors');
202 if (
$object->fk_product == $idprod) {
203 setEventMessages($langs->trans(
'TheProductXIsAlreadyTheProductToProduce'),
null,
'errors');
208 $TParentBom = array();
209 $object->getParentBomTreeRecursive($TParentBom);
210 if ($bom_child_id > 0 && !empty($TParentBom) && in_array($bom_child_id, $TParentBom)) {
211 $n_child =
new BOM($db);
212 $n_child->fetch($bom_child_id);
213 setEventMessages($langs->transnoentities(
'BomCantAddChildBom', $n_child->getNomUrl(1),
$object->getNomUrl(1)),
null,
'errors');
219 $extralabelsline = $extrafields->fetch_name_optionals_label(
$object->table_element_line);
220 $array_options = $extrafields->getOptionalsFromPost(
$object->table_element_line, $predef);
222 if (is_array($extralabelsline)) {
224 foreach ($extralabelsline as $key => $value) {
225 unset($_POST[
"options_".$key]);
229 $result =
$object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id,
null, $fk_unit, $array_options, $fk_default_workstation);
235 unset($_POST[
'idprod']);
236 unset($_POST[
'idprodservice']);
237 unset($_POST[
'qty']);
238 unset($_POST[
'qty_frozen']);
239 unset($_POST[
'disable_stock_change']);
249 if ($action ==
'updateline' && $user->hasRight(
'bom',
'write')) {
250 $langs->load(
'errors');
256 $disable_stock_change =
GETPOSTINT(
'disable_stock_change');
258 $fk_unit =
GETPOST(
'fk_unit',
'alphanohtml');
261 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Qty')),
null,
'errors');
267 $extralabelsline = $extrafields->fetch_name_optionals_label(
$object->table_element_line);
268 $array_options = $extrafields->getOptionalsFromPost(
$object->table_element_line);
270 if (is_array($extralabelsline)) {
272 foreach ($extralabelsline as $key => $value) {
273 unset($_POST[
"options_".$key]);
278 $bomline->fetch($lineid);
280 $fk_default_workstation = $bomline->fk_default_workstation;
281 if (isModEnabled(
'workstation') && GETPOSTISSET(
'idworkstations')) {
282 $fk_default_workstation =
GETPOSTINT(
'idworkstations');
285 $result =
$object->updateLine($lineid, $qty, (
int) $qty_frozen, (
int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit, $array_options, $fk_default_workstation);
291 unset($_POST[
'idprod']);
292 unset($_POST[
'idprodservice']);
293 unset($_POST[
'qty']);
294 unset($_POST[
'qty_frozen']);
295 unset($_POST[
'disable_stock_change']);
310$form =
new Form($db);
314$title = $langs->trans(
'BOM');
315$help_url =
'EN:Module_BOM';
316llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-bom page-card');
319if ($action ==
'create') {
322 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
323 print
'<input type="hidden" name="token" value="'.newToken().
'">';
324 print
'<input type="hidden" name="action" value="add">';
325 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
329 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
332 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
335 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
337 print
'</table>'.
"\n";
341 print $form->buttonsSaveCancel(
"Create");
347if (($id || $ref) && $action ==
'edit') {
350 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
351 print
'<input type="hidden" name="token" value="'.newToken().
'">';
352 print
'<input type="hidden" name="action" value="update">';
353 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
354 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
360 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
363 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
366 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
372 print $form->buttonsSaveCancel(
"Create");
378if (
$object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
385 if ($action ==
'delete') {
386 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteBillOfMaterials'), $langs->trans(
'ConfirmDeleteBillOfMaterials'),
'confirm_delete',
'', 0, 1);
389 if ($action ==
'deleteline') {
390 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
394 if ($action ==
'validate') {
396 $ref = substr(
$object->ref, 1, 4);
397 if ($ref ==
'PROV') {
404 $text = $langs->trans(
'ConfirmValidateBom', $numref);
413 $formquestion = array();
414 if (isModEnabled(
'bom')) {
417 if ($conf->browser->name ==
'ie') {
420 $formquestion = array(
427 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'Validate'), $text,
'confirm_validate', $formquestion, 0, 1, 220);
431 if ($action ==
'close') {
432 $text = $langs->trans(
'ConfirmCloseBom',
$object->ref);
441 $formquestion = array();
442 if (isModEnabled(
'bom')) {
445 if ($conf->browser->name ==
'ie') {
448 $formquestion = array(
455 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'Close'), $text,
'confirm_close', $formquestion, 0, 1, 220);
459 if ($action ==
'reopen') {
460 $text = $langs->trans(
'ConfirmReopenBom',
$object->ref);
469 $formquestion = array();
470 if (isModEnabled(
'bom')) {
472 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
474 if ($conf->browser->name ==
'ie') {
477 $formquestion = array(
484 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ReOpen'), $text,
'confirm_reopen', $formquestion, 0, 1, 220);
488 if ($action ==
'clone') {
490 $formquestion = array();
491 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneBillOfMaterials',
$object->ref),
'confirm_clone', $formquestion,
'yes', 1);
495 if ($action ==
'setdraft') {
496 $text = $langs->trans(
'ConfirmSetToDraft',
$object->ref);
498 $formquestion = array();
499 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'SetToDraft'), $text,
'confirm_setdraft', $formquestion, 0, 1, 220);
503 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
504 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
505 if (empty($reshook)) {
506 $formconfirm .= $hookmanager->resPrint;
507 } elseif ($reshook > 0) {
508 $formconfirm = $hookmanager->resPrint;
517 $linkback =
'<a href="'.DOL_URL_ROOT.
'/bom/bom_list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
519 $morehtmlref =
'<div class="refidno">';
557 $morehtmlref .=
'</div>';
560 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
563 print
'<div class="fichecenter">';
564 print
'<div class="fichehalfleft">';
565 print
'<div class="underbanner clearboth"></div>';
566 print
'<table class="border centpercent tableforfield">'.
"\n";
569 $keyforbreak =
'duration';
570 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
572 print
'<tr><td>'.$form->textwithpicto($langs->trans(
"TotalCost"), $langs->trans(
"BOMTotalCost")).
'</td><td><span class="amount">'.
price(
$object->total_cost).
'</span></td></tr>';
573 print
'<tr><td>'.$langs->trans(
"UnitCost").
'</td><td>'.
price(
$object->unit_cost).
'</td></tr>';
576 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
582 print
'<div class="clearboth"></div>';
592 if (!empty(
$object->table_element_line)) {
595 $res =
$object->fetchLinesbytypeproduct(0);
598 print ($res == 0 &&
$object->status >= $object::STATUS_VALIDATED) ?
'' :
load_fiche_titre($langs->trans(
'BOMProductsList'),
'',
'product');
600 print
' <form name="addproduct" id="listbomproducts" action="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'" method="POST">
601 <input type="hidden" name="token" value="' .
newToken() .
'">
602 <input type="hidden" name="action" value="' . (($action !=
'editline') ?
'addline' :
'updateline') .
'">
603 <input type="hidden" name="mode" value="">
604 <input type="hidden" name="page_y" value="">
605 <input type="hidden" name="id" value="' .
$object->id .
'">
608 if (!empty($conf->use_javascript_ajax) &&
$object->status == 0) {
609 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
612 print
'<div class="div-table-responsive-no-min">';
613 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
614 print
'<table id="tablelines" class="noborder noshadow centpercent">';
618 $object->printObjectLines($action, $mysoc,
null,
GETPOSTINT(
'lineid'), 1,
'/bom/tpl');
622 if (
$object->status == 0 && $permissiontoadd && $action !=
'selectlines') {
623 if ($action !=
'editline') {
627 $parameters = array();
628 $reshook = $hookmanager->executeHooks(
'formAddObjectLine', $parameters, $object, $action);
632 if (empty($reshook)) {
633 $object->formAddObjectLine(1, $mysoc,
null,
'/bom/tpl');
638 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
649 $res =
$object->fetchLinesbytypeproduct(1);
652 print ($res == 0 &&
$object->status >= $object::STATUS_VALIDATED) ?
'' :
load_fiche_titre($langs->trans(
'BOMServicesList'),
'',
'service');
654 print
' <form name="addservice" id="listbomservices" action="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'" method="POST">
655 <input type="hidden" name="token" value="' .
newToken() .
'">
656 <input type="hidden" name="action" value="' . (($action !=
'editline') ?
'addline' :
'updateline') .
'">
657 <input type="hidden" name="mode" value="">
658 <input type="hidden" name="page_y" value=""> <input type="hidden" name="id" value="' .
$object->id .
'">
661 if (!empty($conf->use_javascript_ajax) &&
$object->status == 0) {
662 $tagidfortablednd =
'tablelinesservice';
663 include DOL_DOCUMENT_ROOT .
'/core/tpl/ajaxrow.tpl.php';
666 print
'<div class="div-table-responsive-no-min">';
667 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
668 print
'<table id="tablelinesservice" class="noborder noshadow centpercent">';
672 $object->printObjectLines($action, $mysoc,
null,
GETPOSTINT(
'lineid'), 1,
'/bom/tpl');
676 if (
$object->status == 0 && $permissiontoadd && $action !=
'selectlines') {
677 if ($action !=
'editline') {
679 $parameters = array();
680 $reshook = $hookmanager->executeHooks(
'formAddObjectServiceLine', $parameters, $object, $action);
684 if (empty($reshook)) {
685 $object->formAddObjectLine(1, $mysoc,
null,
'/bom/tpl');
691 if (!empty(
$object->lines) || (
$object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
706 if ($action !=
'presend' && $action !=
'editline') {
707 print
'<div class="tabsAction">'.
"\n";
708 $parameters = array();
709 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
714 if (empty($reshook)) {
721 if (
$object->status == $object::STATUS_VALIDATED) {
722 if ($permissiontoadd) {
723 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=setdraft&token='.
newToken().
'">'.$langs->trans(
"SetToDraft").
'</a>'.
"\n";
728 if (
$object->status == $object::STATUS_DRAFT) {
729 if ($permissiontoadd) {
730 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>'.
"\n";
732 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans(
"NotEnoughPermissions")).
'">'.$langs->trans(
'Modify').
'</a>'.
"\n";
737 if (
$object->status == $object::STATUS_DRAFT) {
738 if ($permissiontoadd) {
740 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=validate&token='.
newToken().
'">'.$langs->trans(
"Validate").
'</a>'.
"\n";
742 $langs->load(
"errors");
743 print
'<a class="butActionRefused classfortooltip" href="" title="'.$langs->trans(
"ErrorAddAtLeastOneLineFirst").
'">'.$langs->trans(
"Validate").
'</a>'.
"\n";
749 if ($permissiontoadd &&
$object->status == $object::STATUS_CANCELED) {
750 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=reopen&token='.
newToken().
'">'.$langs->trans(
"ReOpen").
'</a>'.
"\n";
754 if (isModEnabled(
'mrp')) {
755 if (
$object->status == $object::STATUS_VALIDATED && $user->hasRight(
'mrp',
'write')) {
756 print
'<a class="butAction" href="'.DOL_URL_ROOT.
'/mrp/mo_card.php?action=create&fk_bom='.
$object->id.
'&token='.
newToken().
'&backtopageforcancel='.urlencode($_SERVER[
"PHP_SELF"].
'?id='.
$object->id).
'">'.$langs->trans(
"CreateMO").
'</a>'.
"\n";
761 if ($permissiontoadd) {
762 print
dolGetButtonAction($langs->trans(
"ToClone"),
'',
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.(!empty(
$object->socid) ?
'&socid='.$object->socid :
"").
'&action=clone&object=bom',
'clone', $permissiontoadd);
766 if ($permissiontoadd &&
$object->status == $object::STATUS_VALIDATED) {
767 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=close&token='.
newToken().
'">'.$langs->trans(
"Disable").
'</a>'.
"\n";
781 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken(),
'delete', $permissiontodelete);
788 if (
GETPOST(
'modelselected')) {
792 if ($action !=
'presend') {
793 print
'<div class="fichecenter"><div class="fichehalfleft">';
794 print
'<a name="builddoc"></a>';
798 $relativepath = $objref.
'/'.$objref.
'.pdf';
799 $filedir = $conf->bom->dir_output.
'/'.$objref;
800 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
801 $genallowed = $user->hasRight(
'bom',
'read');
802 $delallowed = $user->hasRight(
'bom',
'write');
803 print $formfile->showdocuments(
'bom', $objref, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
806 $linktoelem = $form->showLinkToObjectBlock($object,
null, array(
'bom'));
807 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
810 print
'</div><div class="fichehalfright">';
814 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/bom/bom_agenda.php?id='.
$object->id);
817 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
819 $somethingshown = $formactions->showactions($object,
$object->element, 0, 1,
'', $MAXEVENT,
'', $morehtmlcenter);
821 print
'</div></div>';
825 if (
GETPOST(
'modelselected')) {
831 $defaulttopic =
'InformationMessage';
832 $diroutput = $conf->bom->dir_output;
833 $trackid =
'bom'.$object->id;
835 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
mrpCollapseBomManagement()
Manage collapse bom display.
bomPrepareHead($object)
Prepare array of tabs for BillOfMaterials.
Class to manage products or services.
const TYPE_SERVICE
Service.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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 '.
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_get_fiche_end($notab=0)
Return tab footer of a card.
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
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.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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.