Update bom_note.php

This commit is contained in:
UT from dolibit 2022-09-10 20:27:25 +02:00 committed by GitHub
parent cc4bb9b40f
commit 231270d781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,9 +17,9 @@
*/
/**
* \file bom_note.php
* \ingroup bom
* \brief Car with notes on BillOfMaterials
* \file htdocs/bom/bom_note.php
* \ingroup bom
* \brief Card with notes on BillOfMaterials
*/
// Load Dolibarr environment
@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/bom/lib/bom.lib.php';
$langs->loadLangs(array("mrp", "companies"));
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
@ -40,9 +40,13 @@ $backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects
$object = new BOM($db);
$extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id;
// Initialize technical objects for hooks
$hookmanager->initHooks(array('bomnote', 'globalcard')); // Note that conf->hooks_modules contains array
// Massactions
$diroutputmassaction = $conf->bom->dir_output.'/temp/massgeneration/'.$user->id;
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);