26require
'../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/bom/class/bom.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/bom/lib/bom.lib.php';
40$langs->loadLangs(array(
"mrp",
"companies"));
45$action =
GETPOST(
'action',
'aZ09');
46$cancel =
GETPOST(
'cancel',
'alpha');
47$backtopage =
GETPOST(
'backtopage',
'alpha');
53$hookmanager->initHooks(array(
'bomnote',
'globalcard'));
56$diroutputmassaction =
getMultidirOutput($object) .
'/temp/massgeneration/'.$user->id;
59$extrafields->fetch_name_optionals_label(
$object->table_element);
67include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
68if ($id > 0 || !empty($ref)) {
72$permissionnote = $user->hasRight(
'bom',
'write');
77$isdraft = ((
$object->status == $object::STATUS_DRAFT) ? 1 : 0);
86$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
91 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
101$title = $langs->trans(
'BillOfMaterials');
103$help_url =
'EN:Module_BOM';
105llxHeader(
'', $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-bom page-card_notes');
107if ($id > 0 || !empty($ref)) {
116 $linkback =
'<a href="'.DOL_URL_ROOT.
'/bom/bom_list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
118 $morehtmlref =
'<div class="refidno">';
120 $morehtmlref .=
'</div>';
123 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
126 print
'<div class="fichecenter">';
127 print
'<div class="underbanner clearboth"></div>';
130 $cssclass =
"titlefield";
131 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
bomPrepareHead($object)
Prepare array of tabs for BillOfMaterials.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getMultidirOutput($object, $module='', $forobject=0, $mode='output')
Return the full path of the directory where a module (or an object of a module) stores its files.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.