diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 8efbbf4cbfa..2b331c0c175 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -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) { diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 818381588c4..9eedc2872c6 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -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); diff --git a/htdocs/install/mysql/tables/llx_c_productbatch_status.key.sql b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql similarity index 90% rename from htdocs/install/mysql/tables/llx_c_productbatch_status.key.sql rename to htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql index fc72f556a97..1c00ac13deb 100644 --- a/htdocs/install/mysql/tables/llx_c_productbatch_status.key.sql +++ b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.key.sql @@ -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); diff --git a/htdocs/install/mysql/tables/llx_c_productbatch_status.sql b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql similarity index 96% rename from htdocs/install/mysql/tables/llx_c_productbatch_status.sql rename to htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql index 2ffad7f5939..35a9581bf8e 100644 --- a/htdocs/install/mysql/tables/llx_c_productbatch_status.sql +++ b/htdocs/install/mysql/tables/llx_c_productbatch_qcstatus.sql @@ -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, diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index aedf85a4fb8..2a19be96cf6 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -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 \ No newline at end of file diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index c3e48ddbeb1..49a249ce0e5 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -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 \ No newline at end of file +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 \ No newline at end of file