Work on BOM module

This commit is contained in:
Laurent Destailleur 2019-03-04 13:37:00 +01:00
parent 7b7ff33fdf
commit 925def5390
5 changed files with 7 additions and 35 deletions

View File

@ -47,8 +47,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'updateMask')
{
$maskconstbom=GETPOST('maskconstbom', 'alpha');
$maskbom=GETPOST('maskbom', 'alpha');
$maskconstbom=GETPOST('maskconstBom', 'alpha');
$maskbom=GETPOST('maskBom', 'alpha');
if ($maskconstbom) $res = dolibarr_set_const($db, $maskconstbom, $maskbom, 'chaine', 0, '', $conf->entity);

View File

@ -138,23 +138,8 @@ class mod_bom_advanced extends ModeleNumRefboms
$date = ($object->date_bom ? $object->date_bom : $object->date);
$numFinal=get_next_value($db, $mask, 'bom', 'ref', '', $objsoc, $date);
$numFinal=get_next_value($db, $mask, 'bom_bom', 'ref', '', $objsoc, $date);
return $numFinal;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @return string Next free value
*/
public function bom_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);
}
}

View File

@ -146,19 +146,4 @@ class mod_bom_standard extends ModeleNumRefboms
dol_syslog("mod_bom_standard::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @return string Next free value
*/
public function bom_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);
}
}

View File

@ -175,7 +175,8 @@ ALTER TABLE llx_user ADD COLUMN linkedin varchar(255) after whatsapp;
CREATE TABLE llx_bom_bom(
-- BEGIN MODULEBUILDER FIELDS
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
entity integer DEFAULT 1 NOT NULL,
ref varchar(128) NOT NULL,
label varchar(255),
description text,

View File

@ -16,7 +16,8 @@
CREATE TABLE llx_bom_bom(
-- BEGIN MODULEBUILDER FIELDS
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
entity integer DEFAULT 1 NOT NULL,
ref varchar(128) NOT NULL,
label varchar(255),
description text,