llx_c_productbatch_qcstatus as dictionnary name

This commit is contained in:
altairis-noe 2021-04-29 12:49:15 +02:00
parent 9fc67275fd
commit 762f41ea86
6 changed files with 19 additions and 9 deletions

View File

@ -146,7 +146,7 @@ $tabname[39] = MAIN_DB_PREFIX."c_prospectcontactlevel";
$tabname[40] = MAIN_DB_PREFIX."c_stcommcontact";
$tabname[41] = MAIN_DB_PREFIX."c_transport_mode";
$tabname[42] = MAIN_DB_PREFIX."c_product_nature";
$tabname[43] = MAIN_DB_PREFIX."c_productbatch_status";
$tabname[43] = MAIN_DB_PREFIX."c_productbatch_qcstatus";
// Dictionary labels
$tablib = array();
@ -238,7 +238,7 @@ $tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_P
$tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact";
$tabsql[41] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_transport_mode";
$tabsql[42] = "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_product_nature";
$tabsql[43] = "SELECT rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_productbatch_status";
$tabsql[43] = "SELECT rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_productbatch_qcstatus";
// Criteria to sort dictionaries
$tabsqlsort = array();
@ -1979,6 +1979,9 @@ if ($id) {
} elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_product_nature') {
$langs->load("products");
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
} elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_productbatch_qcstatus') {
$langs->load("productbatch");
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
}
$class .= ($class ? ' ' : '').'tddict';
if ($fieldlist[$field] == 'note' && $id == 10) {

View File

@ -141,17 +141,17 @@ CREATE TABLE llx_workstation_workstation_usergroup(
fk_workstation integer
) ENGINE=innodb;
CREATE TABLE llx_c_producbatch_status(
CREATE TABLE llx_c_producbatch_qcstatus(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
code varchar(16) NOT NULL,
label varchar(50) NOT NULL,
active integer DEFAULT 1 NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_c_productbatch_status ADD UNIQUE INDEX uk_c_productbatch_status(code);
ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code);
INSERT INTO llx_c_productbatch_status (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
INSERT INTO llx_c_productbatch_status (code, label, active) VALUES ('KO', 'OutOfOrder', 1);
INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('OK', 'InWorkingOrder', 1);
INSERT INTO llx_c_productbatch_qcstatus (code, label, active) VALUES ('KO', 'OutOfOrder', 1);
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);

View File

@ -16,4 +16,4 @@
--
-- ========================================================================
ALTER TABLE llx_c_productbatch_status ADD UNIQUE INDEX uk_c_productbatch_status(code);
ALTER TABLE llx_c_productbatch_qcstatus ADD UNIQUE INDEX uk_c_productbatch_qcstatus(code);

View File

@ -16,7 +16,7 @@
--
-- ========================================================================
create table llx_c_productbatch_status
create table llx_c_productbatch_qcstatus
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(16) NOT NULL,

View File

@ -33,3 +33,6 @@ LotProductTooltip=Adds an option in the product card to define a dedicated batch
SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask
QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
#Traceability - qc status
OutOfOrder=Out of order
InWorkingOrder=In working order

View File

@ -30,4 +30,8 @@ BatchLotNumberingModules=Modèle de génération et contrôle des numéros de lo
BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série
CustomMasks=Ajoute une option pour définir le masque dans la fiche produit
LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot
SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
#Traceability - qc status
OutOfOrder=Hors d'usage
InWorkingOrder=En état de marche