Update bom_card.php
This commit is contained in:
parent
cc4bb9b40f
commit
8c9159ae04
@ -17,9 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/bom/bom_card.php
|
* \file htdocs/bom/bom_card.php
|
||||||
* \ingroup bom
|
* \ingroup bom
|
||||||
* \brief Page to create/edit/view bom
|
* \brief Page to create/edit/view BillOfMaterial
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load Dolibarr environment
|
// Load Dolibarr environment
|
||||||
@ -32,17 +32,18 @@ require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("mrp", "other"));
|
$langs->loadLangs(array('mrp', 'other'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomcard'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomcard'; // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
|
||||||
|
|
||||||
// PDF
|
// PDF
|
||||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||||
@ -54,6 +55,7 @@ $object = new BOM($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('bomcard', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('bomcard', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||||
@ -84,6 +86,7 @@ if ($object->id > 0) {
|
|||||||
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
$result = restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
// Permissions
|
||||||
$permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->bom->write; // Used by the include of actions_setnotes.inc.php
|
||||||
$permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->rights->bom->write; // Used by the include of actions_dellink.inc.php
|
||||||
$permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->rights->bom->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user