27require
'../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/bom/class/bom.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/bom/lib/bom.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/mrp/lib/mrp.lib.php';
36$langs->loadLangs(array(
'mrp',
'other'));
40$lineid =
GETPOST(
'lineid',
'int');
42$action =
GETPOST(
'action',
'aZ09');
43$confirm =
GETPOST(
'confirm',
'alpha');
44$cancel =
GETPOST(
'cancel',
'aZ09');
45$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'bomcard';
46$backtopage =
GETPOST(
'backtopage',
'alpha');
55$object =
new BOM($db);
57$diroutputmassaction = $conf->bom->dir_output.
'/temp/massgeneration/'.$user->id;
58$hookmanager->initHooks(array(
'bomcard',
'globalcard'));
61$extrafields->fetch_name_optionals_label($object->table_element);
62$search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
65$search_all =
GETPOST(
"search_all",
'alpha');
67foreach ($object->fields as $key => $val) {
68 if (
GETPOST(
'search_'.$key,
'alpha')) {
69 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
73if (empty($action) && empty($id) && empty($ref)) {
78include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
80 $object->calculateCosts();
87$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
88$result =
restrictedArea($user,
'bom', $object->id, $object->table_element,
'',
'',
'rowid', $isdraft);
91$permissionnote = $user->hasRight(
'bom',
'write');
92$permissiondellink = $user->hasRight(
'bom',
'write');
93$permissiontoadd = $user->hasRight(
'bom',
'write');
94$permissiontodelete = $user->hasRight(
'bom',
'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
95$upload_dir = $conf->bom->multidir_output[isset($object->entity) ? $object->entity : 1];
102$parameters = array();
103$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
108if (empty($reshook)) {
111 $backurlforlist = DOL_URL_ROOT.
'/bom/bom_list.php';
113 if (empty($backtopage) || ($cancel && empty($id))) {
114 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
115 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
116 $backtopage = $backurlforlist;
118 $backtopage = DOL_URL_ROOT.
'/bom/bom_card.php?id='.($id > 0 ? $id :
'__ID__');
123 $triggermodname =
'BOM_MODIFY';
127 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
129 if ($action ==
'confirm_validate' && $object->id > 0) {
130 $object->calculateCosts();
134 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
137 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
143 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
146 $triggersendname =
'BOM_SENTBYMAIL';
147 $autocopy =
'MAIN_MAIL_AUTOCOPY_BOM_TO';
148 $trackid =
'bom'.$object->id;
149 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
152 if ($action ==
'addline' && $user->hasRight(
'bom',
'write')) {
153 $langs->load(
'errors');
158 $bom_child_id = (int)
GETPOST(
'bom_id',
'int');
159 if ($bom_child_id > 0) {
160 $bom_child =
new BOM($db);
161 $res = $bom_child->fetch($bom_child_id);
163 $idprod = $bom_child->fk_product;
166 $idprod = (!empty(
GETPOST(
'idprodservice',
'int')) ?
GETPOST(
'idprodservice',
'int') : (int)
GETPOST(
'idprod',
'int'));
171 $disable_stock_change =
GETPOST(
'disable_stock_change',
'int');
172 $fk_workstation =
GETPOST(
'idworkstations',
'int');
174 $fk_unit =
GETPOST(
'fk_unit',
'alphanohtml');
176 $fk_default_workstation = 0;
177 if (!empty($idprod) && isModEnabled(
'workstation')) {
179 $res = $product->fetch($idprod);
181 if (!empty($fk_workstation)) $fk_default_workstation = $fk_workstation;
182 else $fk_default_workstation = $product->fk_default_workstation;
184 if (empty($fk_unit)) {
185 $fk_unit = $product->fk_unit;
190 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Qty')),
null,
'errors');
193 if (!($idprod > 0)) {
194 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Product')),
null,
'errors');
198 if ($object->fk_product == $idprod) {
199 setEventMessages($langs->trans(
'TheProductXIsAlreadyTheProductToProduce'),
null,
'errors');
205 $object->getParentBomTreeRecursive($TParentBom);
206 if ($bom_child_id > 0 && !empty($TParentBom) && in_array($bom_child_id, $TParentBom)) {
207 $n_child =
new BOM($db);
208 $n_child->fetch($bom_child_id);
209 setEventMessages($langs->transnoentities(
'BomCantAddChildBom', $n_child->getNomUrl(1), $object->getNomUrl(1)),
null,
'errors');
215 $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
216 $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef);
218 if (is_array($extralabelsline)) {
220 foreach ($extralabelsline as $key => $value) {
221 unset($_POST[
"options_".$key]);
225 $result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id,
null, $fk_unit, $array_options, $fk_default_workstation);
231 unset($_POST[
'idprod']);
232 unset($_POST[
'idprodservice']);
233 unset($_POST[
'qty']);
234 unset($_POST[
'qty_frozen']);
235 unset($_POST[
'disable_stock_change']);
238 $object->fetchLines();
240 $object->calculateCosts();
245 if ($action ==
'updateline' && $user->hasRight(
'bom',
'write')) {
246 $langs->load(
'errors');
252 $disable_stock_change =
GETPOST(
'disable_stock_change',
'int');
254 $fk_unit =
GETPOST(
'fk_unit',
'alphanohtml');
257 setEventMessages($langs->trans(
'ErrorFieldRequired', $langs->transnoentitiesnoconv(
'Qty')),
null,
'errors');
263 $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
264 $array_options = $extrafields->getOptionalsFromPost($object->table_element_line);
266 if (is_array($extralabelsline)) {
268 foreach ($extralabelsline as $key => $value) {
269 unset($_POST[
"options_".$key]);
274 $bomline->fetch($lineid);
276 $fk_default_workstation = $bomline->fk_default_workstation;
277 if (isModEnabled(
'workstation') && GETPOSTISSET(
'idworkstations')) {
278 $fk_default_workstation =
GETPOSTINT(
'idworkstations');
281 $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);
287 unset($_POST[
'idprod']);
288 unset($_POST[
'idprodservice']);
289 unset($_POST[
'qty']);
290 unset($_POST[
'qty_frozen']);
291 unset($_POST[
'disable_stock_change']);
294 $object->fetchLines();
296 $object->calculateCosts();
306$form =
new Form($db);
310$title = $langs->trans(
'BOM');
311$help_url =
'EN:Module_BOM';
315if ($action ==
'create') {
318 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
319 print
'<input type="hidden" name="token" value="'.newToken().
'">';
320 print
'<input type="hidden" name="action" value="add">';
321 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
325 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
328 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
331 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
333 print
'</table>'.
"\n";
337 print $form->buttonsSaveCancel(
"Create");
343if (($id || $ref) && $action ==
'edit') {
346 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
347 print
'<input type="hidden" name="token" value="'.newToken().
'">';
348 print
'<input type="hidden" name="action" value="update">';
349 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
350 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
356 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
359 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
362 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
368 print $form->buttonsSaveCancel(
"Create");
374if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
381 if ($action ==
'delete') {
382 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'DeleteBillOfMaterials'), $langs->trans(
'ConfirmDeleteBillOfMaterials'),
'confirm_delete',
'', 0, 1);
385 if ($action ==
'deleteline') {
386 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
390 if ($action ==
'validate') {
392 $ref = substr($object->ref, 1, 4);
393 if ($ref ==
'PROV') {
394 $object->fetch_product();
395 $numref = $object->getNextNumRef($object->product);
397 $numref = $object->ref;
400 $text = $langs->trans(
'ConfirmValidateBom', $numref);
409 $formquestion = array();
410 if (isModEnabled(
'bom')) {
413 if ($conf->browser->name ==
'ie') {
416 $formquestion = array(
423 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'Validate'), $text,
'confirm_validate', $formquestion, 0, 1, 220);
427 if ($action ==
'close') {
428 $text = $langs->trans(
'ConfirmCloseBom', $object->ref);
437 $formquestion = array();
438 if (isModEnabled(
'bom')) {
441 if ($conf->browser->name ==
'ie') {
444 $formquestion = array(
451 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'Close'), $text,
'confirm_close', $formquestion, 0, 1, 220);
455 if ($action ==
'reopen') {
456 $text = $langs->trans(
'ConfirmReopenBom', $object->ref);
465 $formquestion = array();
466 if (isModEnabled(
'bom')) {
468 require_once DOL_DOCUMENT_ROOT.
'/product/class/html.formproduct.class.php';
470 if ($conf->browser->name ==
'ie') {
473 $formquestion = array(
480 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ReOpen'), $text,
'confirm_reopen', $formquestion, 0, 1, 220);
484 if ($action ==
'clone') {
486 $formquestion = array();
487 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneBillOfMaterials', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
491 if ($action ==
'setdraft') {
492 $text = $langs->trans(
'ConfirmSetToDraft', $object->ref);
494 $formquestion = array();
495 $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'SetToDraft'), $text,
'confirm_setdraft', $formquestion, 0, 1, 220);
499 $parameters = array(
'formConfirm' => $formconfirm,
'lineid' => $lineid);
500 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
501 if (empty($reshook)) {
502 $formconfirm .= $hookmanager->resPrint;
503 } elseif ($reshook > 0) {
504 $formconfirm = $hookmanager->resPrint;
513 $linkback =
'<a href="'.DOL_URL_ROOT.
'/bom/bom_list.php?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
515 $morehtmlref =
'<div class="refidno">';
553 $morehtmlref .=
'</div>';
556 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
559 print
'<div class="fichecenter">';
560 print
'<div class="fichehalfleft">';
561 print
'<div class="underbanner clearboth"></div>';
562 print
'<table class="border centpercent tableforfield">'.
"\n";
565 $keyforbreak =
'duration';
566 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
567 $object->calculateCosts();
568 print
'<tr><td>'.$form->textwithpicto($langs->trans(
"TotalCost"), $langs->trans(
"BOMTotalCost")).
'</td><td><span class="amount">'.
price($object->total_cost).
'</span></td></tr>';
569 print
'<tr><td>'.$langs->trans(
"UnitCost").
'</td><td>'.
price($object->unit_cost).
'</td></tr>';
572 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
578 print
'<div class="clearboth"></div>';
588 if (!empty($object->table_element_line)) {
590 $res = $object->fetchLinesbytypeproduct(0);
591 $object->calculateCosts();
593 print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ?
'' :
load_fiche_titre($langs->trans(
'BOMProductsList'),
'',
'product');
595 print
' <form name="addproduct" id="listbomproducts" action="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id . (($action !=
'editline') ?
'' :
'') .
'" method="POST">
596 <input type="hidden" name="token" value="' . newToken() .
'">
597 <input type="hidden" name="action" value="' . (($action !=
'editline') ?
'addline' :
'updateline') .
'">
598 <input type="hidden" name="mode" value="">
599 <input type="hidden" name="page_y" value="">
600 <input type="hidden" name="id" value="' . $object->id .
'">
603 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
604 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
607 print
'<div class="div-table-responsive-no-min">';
608 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
609 print
'<table id="tablelines" class="noborder noshadow centpercent">';
612 if (!empty($object->lines)) {
613 $object->printObjectLines($action, $mysoc,
null,
GETPOST(
'lineid',
'int'), 1,
'/bom/tpl');
617 if ($object->status == 0 && $permissiontoadd && $action !=
'selectlines') {
618 if ($action !=
'editline') {
622 $parameters = array();
623 $reshook = $hookmanager->executeHooks(
'formAddObjectLine', $parameters, $object, $action);
627 if (empty($reshook)) {
628 $object->formAddObjectLine(1, $mysoc,
null,
'/bom/tpl');
633 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
642 $res = $object->fetchLinesbytypeproduct(1);
643 $object->calculateCosts();
645 print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ?
'' :
load_fiche_titre($langs->trans(
'BOMServicesList'),
'',
'service');
647 print
' <form name="addservice" id="listbomservices" action="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id . (($action !=
'editline') ?
'' :
'') .
'" method="POST">
648 <input type="hidden" name="token" value="' . newToken() .
'">
649 <input type="hidden" name="action" value="' . (($action !=
'editline') ?
'addline' :
'updateline') .
'">
650 <input type="hidden" name="mode" value="">
651 <input type="hidden" name="page_y" value=""> <input type="hidden" name="id" value="' . $object->id .
'">
654 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
655 $tagidfortablednd =
'tablelinesservice';
656 include DOL_DOCUMENT_ROOT .
'/core/tpl/ajaxrow.tpl.php';
659 print
'<div class="div-table-responsive-no-min">';
660 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
661 print
'<table id="tablelinesservice" class="noborder noshadow centpercent">';
664 if (!empty($object->lines)) {
665 $object->printObjectLines($action, $mysoc,
null,
GETPOST(
'lineid',
'int'), 1,
'/bom/tpl');
669 if ($object->status == 0 && $permissiontoadd && $action !=
'selectlines') {
670 if ($action !=
'editline') {
672 $parameters = array();
673 $reshook = $hookmanager->executeHooks(
'formAddObjectServiceLine', $parameters, $object, $action);
677 if (empty($reshook)) {
678 $object->formAddObjectLine(1, $mysoc,
null,
'/bom/tpl');
684 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
695 $res = $object->fetchLines();
699 if ($action !=
'presend' && $action !=
'editline') {
700 print
'<div class="tabsAction">'.
"\n";
701 $parameters = array();
702 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
707 if (empty($reshook)) {
714 if ($object->status == $object::STATUS_VALIDATED) {
715 if ($permissiontoadd) {
716 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=setdraft&token='.newToken().
'">'.$langs->trans(
"SetToDraft").
'</a>'.
"\n";
721 if ($object->status == $object::STATUS_DRAFT) {
722 if ($permissiontoadd) {
723 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=edit&token='.newToken().
'">'.$langs->trans(
"Modify").
'</a>'.
"\n";
725 print
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans(
"NotEnoughPermissions")).
'">'.$langs->trans(
'Modify').
'</a>'.
"\n";
730 if ($object->status == $object::STATUS_DRAFT) {
731 if ($permissiontoadd) {
732 if (is_array($object->lines) && count($object->lines) > 0) {
733 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=validate&token='.newToken().
'">'.$langs->trans(
"Validate").
'</a>'.
"\n";
735 $langs->load(
"errors");
736 print
'<a class="butActionRefused classfortooltip" href="" title="'.$langs->trans(
"ErrorAddAtLeastOneLineFirst").
'">'.$langs->trans(
"Validate").
'</a>'.
"\n";
742 if ($permissiontoadd && $object->status == $object::STATUS_CANCELED) {
743 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=reopen&token='.newToken().
'">'.$langs->trans(
"ReOpen").
'</a>'.
"\n";
747 if (isModEnabled(
'mrp')) {
748 if ($object->status == $object::STATUS_VALIDATED && $user->hasRight(
'mrp',
'write')) {
749 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";
754 if ($permissiontoadd) {
755 print
dolGetButtonAction($langs->trans(
"ToClone"),
'',
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.(!empty($object->socid) ?
'&socid='.$object->socid :
"").
'&action=clone&object=bom',
'clone', $permissiontoadd);
759 if ($permissiontoadd && $object->status == $object::STATUS_VALIDATED) {
760 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=close&token='.newToken().
'">'.$langs->trans(
"Disable").
'</a>'.
"\n";
778 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=delete&token='.newToken(),
'delete', $permissiontodelete);
785 if (
GETPOST(
'modelselected')) {
789 if ($action !=
'presend') {
790 print
'<div class="fichecenter"><div class="fichehalfleft">';
791 print
'<a name="builddoc"></a>';
795 $relativepath = $objref.
'/'.$objref.
'.pdf';
796 $filedir = $conf->bom->dir_output.
'/'.$objref;
797 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
798 $genallowed = $user->hasRight(
'bom',
'read');
799 $delallowed = $user->hasRight(
'bom',
'write');
800 print $formfile->showdocuments(
'bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
803 $linktoelem = $form->showLinkToObjectBlock($object,
null, array(
'bom'));
804 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
807 print
'</div><div class="fichehalfright">';
811 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/bom/bom_agenda.php?id='.$object->id);
814 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
816 $somethingshown =
$formactions->showactions($object, $object->element, 0, 1,
'', $MAXEVENT,
'', $morehtmlcenter);
818 print
'</div></div>';
822 if (
GETPOST(
'modelselected')) {
828 $defaulttopic =
'InformationMessage';
829 $diroutput = $conf->bom->dir_output;
830 $trackid =
'bom'.$object->id;
832 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif( $action=='specimen') elseif($action=='setmodel') elseif( $action=='del') elseif($action=='setdoc') $formactions
View.
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.
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.
GETPOSTINT($paramname, $method=0)
Return value of a param into GET or POST supervariable.
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.
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.