diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang
index f8f0239e4a7..450d0285819 100644
--- a/htdocs/langs/en_US/productbatch.lang
+++ b/htdocs/langs/en_US/productbatch.lang
@@ -33,6 +33,12 @@ CustomMasks=Adds an option to define mask in the product card
LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask
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
+LifeTime=Life span (in days)
+EndOfLife=End of life
+ManufacturingDate=Manufacturing date
+DestructionDate=Destruction date
+FirstUseDate=First use date
+QCFrequency=Quality control frequency (in days)
#Traceability - qc status
OutOfOrder=Out of order
diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang
index f3a03d7f978..337af188fe1 100644
--- a/htdocs/langs/fr_FR/productbatch.lang
+++ b/htdocs/langs/fr_FR/productbatch.lang
@@ -30,8 +30,14 @@ BatchLotNumberingModules=Options pour la génération automatique de produits en
BatchSerialNumberingModules=Options pour la génération automatique de produits en lots gérés par numéros de série
ManageLotMask=Masque personnalisé
CustomMasks=Ajoute une option pour définir le masque dans la fiche produit
-LotProductTooltip=Ajoute une option dans la fiche produit pour définir un masque de numéro de lot dédié
-SNProductTooltip=Ajoute une option dans la fiche produit pour définir un masque de numéro de série dédié
-QtyToAddAfterBarcodeScan=Quantité à ajouter pour chaque code à barres/lot/série scanné
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
+QtyToAddAfterBarcodeScan=Quantité à ajouter pour chaque code à barres/lot/série scanné
+LifeTime=Durée de vie (en jours)
+EndOfLife=Date de fin de vie
+ManufacturingDate=Date de fabrication
+DestructionDate=Date de mise au rebut
+FirstUseDate=Date de mise en service
+QCFrequency=Periodicité de contrôle (en jours)
+InWorkingOrder=En état de marche
+OutOfOrder=Hors d’usage
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 52107a1b643..4839f26772f 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -332,6 +332,8 @@ if (empty($reshook)) {
$object->customcode = GETPOST('customcode', 'alphanohtml');
$object->country_id = GETPOST('country_id', 'int');
$object->state_id = GETPOST('state_id', 'int');
+ $object->lifetime = GETPOST('lifetime', 'int');
+ $object->qc_frequency = GETPOST('qc_frequency', 'int');
$object->duration_value = $duration_value;
$object->duration_unit = $duration_unit;
$object->fk_default_warehouse = GETPOST('fk_default_warehouse');
@@ -473,6 +475,8 @@ if (empty($reshook)) {
$object->customcode = GETPOST('customcode', 'alpha');
$object->country_id = GETPOST('country_id', 'int');
$object->state_id = GETPOST('state_id', 'int');
+ $object->lifetime = GETPOST('lifetime', 'int');
+ $object->qc_frequency = GETPOST('qc_frequency', 'int');
$object->status = GETPOST('statut', 'int');
$object->status_buy = GETPOST('statut_buy', 'int');
$object->status_batch = GETPOST('status_batch', 'aZ09');
@@ -1294,6 +1298,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '';
}
+ // Traceability
+ if ($conf->global->PRODUCT_LOT_ENABLE_TRACEABILITY) {
+ print '
'.$langs->trans("LifeTime").' ';
+ print ''.$langs->trans("QCFrequency").' ';
+ }
// Other attributes
$parameters = array('colspan' => 3, 'cols' => '3');
@@ -1530,7 +1539,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$object->country = $tmparray['label'];
}
-
$type = $langs->trans('Product');
if ($object->isService()) {
$type = $langs->trans('Service');
@@ -1599,10 +1607,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$tooltip .= $langs->trans("GenericMaskCodes5");
print ''.$langs->trans("ManageLotMask").' ';
if ($object->status_batch == '1' && $conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') {
- $mask = !is_empty($object->batch_mask) ? $object->batch_mask : $conf->global->LOT_ADVANCED_MASK;
+ $mask = ! empty($object->batch_mask) ? $object->batch_mask : $conf->global->LOT_ADVANCED_MASK;
}
if ($object->status_batch == '2' && $conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced') {
- $mask = !is_empty($object->batch_mask) ? $object->batch_mask : $conf->global->SN_ADVANCED_MASK;
+ $mask = ! empty($object->batch_mask) ? $object->batch_mask : $conf->global->SN_ADVANCED_MASK;
}
$inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK;
$inherited_mask_sn = $conf->global->SN_ADVANCED_MASK;
@@ -1793,6 +1801,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '';
}
+ // Traceability
+ if ($conf->global->PRODUCT_LOT_ENABLE_TRACEABILITY) {
+ print ''.$langs->trans("LifeTime").' ';
+ print ''.$langs->trans("QCFrequency").' ';
+ }
+
// Other attributes
$parameters = array('colspan' => ' colspan="3"', 'cols' => 3);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@@ -2270,6 +2284,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '';
}
+ // Traceability
+ if ($conf->global->PRODUCT_LOT_ENABLE_TRACEABILITY) {
+ print ''.$langs->trans("LifeTime").' '.$object->lifetime.' ';
+ print ''.$langs->trans("QCFrequency").' '.$object->qc_frequency.' ';
+ }
+
// Other attributes
$parameters = array('colspan' => ' colspan="'.(2 + (($showphoto || $showbarcode) ? 1 : 0)).'"', 'cols' => (2 + (($showphoto || $showbarcode) ? 1 : 0)));
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 29e97aaf4f9..b359d7629b7 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -1094,6 +1094,8 @@ class Product extends CommonObject
$sql .= ", customcode = '".$this->db->escape($this->customcode)."'";
$sql .= ", fk_country = ".($this->country_id > 0 ? (int) $this->country_id : 'null');
$sql .= ", fk_state = ".($this->state_id > 0 ? (int) $this->state_id : 'null');
+ $sql .= ", lifetime = ".($this->lifetime > 0 ? (int) $this->lifetime : 'null');
+ $sql .= ", qc_frequency = ".($this->qc_frequency > 0 ? (int) $this->qc_frequency : 'null');
$sql .= ", note = ".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : 'null');
$sql .= ", duration = '".$this->db->escape($this->duration_value.$this->duration_unit)."'";
if (empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
@@ -2173,7 +2175,7 @@ class Product extends CommonObject
return -1;
}
- $sql = "SELECT p.rowid, p.ref, p.ref_ext, p.label, p.description, p.url, p.note_public, p.note as note_private, p.customcode, p.fk_country, p.fk_state, p.price, p.price_ttc,";
+ $sql = "SELECT p.rowid, p.ref, p.ref_ext, p.label, p.description, p.url, p.note_public, p.note as note_private, p.customcode, p.fk_country, p.fk_state, p.lifetime, p.qc_frequency, p.price, p.price_ttc,";
$sql .= " p.price_min, p.price_min_ttc, p.price_base_type, p.cost_price, p.default_vat_code, p.tva_tx, p.recuperableonly as tva_npr, p.localtax1_tx, p.localtax2_tx, p.localtax1_type, p.localtax2_type, p.tosell,";
$sql .= " p.tobuy, p.fk_product_type, p.duration, p.fk_default_warehouse, p.seuil_stock_alerte, p.canvas, p.net_measure, p.net_measure_units, p.weight, p.weight_units,";
$sql .= " p.length, p.length_units, p.width, p.width_units, p.height, p.height_units,";
@@ -2266,6 +2268,8 @@ class Product extends CommonObject
$this->country_id = $obj->fk_country;
$this->country_code = getCountry($this->country_id, 2, $this->db);
$this->state_id = $obj->fk_state;
+ $this->lifetime = $obj->lifetime;
+ $this->qc_frequency = $obj->qc_frequency;
$this->price = $obj->price;
$this->price_ttc = $obj->price_ttc;
$this->price_min = $obj->price_min;
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index 5b516ec03d7..f05a4ae3d39 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -91,6 +91,11 @@ class Productlot extends CommonObject
'batch' => array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'comment'=>'Batch', 'searchall'=>1),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
'sellby' => array('type'=>'date', 'label'=>'SellByDate', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_SELLBY)?1:0', 'visible'=>5, 'position'=>60),
+ 'eol_date' => array('type'=>'date', 'label'=>'EndOfLife', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_TRACEABILITY)?1:0', 'visible'=>5, 'position'=>70),
+ 'manufacturing_date' => array('type'=>'date', 'label'=>'ManufacturingDate', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_TRACEABILITY)?1:0', 'visible'=>5, 'position'=>80),
+ 'scrapping_date' => array('type'=>'date', 'label'=>'DestructionDate', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_TRACEABILITY)?1:0', 'visible'=>5, 'position'=>90),
+ 'commissionning_date' => array('type'=>'date', 'label'=>'FirstUseDate', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_TRACEABILITY)?1:0', 'visible'=>5, 'position'=>100),
+ 'qc_frequency' => array('type'=>'varchar(6)', 'label'=>'QCFrequency', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_TRACEABILITY)?1:0', 'visible'=>5, 'position'=>110),
'eatby' => array('type'=>'date', 'label'=>'EatByDate', 'enabled'=>'empty($conf->global->PRODUCT_DISABLE_EATBY)?1:0', 'visible'=>5, 'position'=>62),
'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
@@ -112,6 +117,11 @@ class Productlot extends CommonObject
public $batch;
public $eatby = '';
public $sellby = '';
+ public $eol_date = '';
+ public $manufacturing_date = '';
+ public $scrapping_date = '';
+ public $commissionning_date = '';
+ public $qc_frequency = '';
public $datec = '';
public $tms = '';
@@ -186,6 +196,11 @@ class Productlot extends CommonObject
$sql .= 'batch,';
$sql .= 'eatby,';
$sql .= 'sellby,';
+ $sql .= 'eol_date,';
+ $sql .= 'manufacturing_date,';
+ $sql .= 'scrapping_date,';
+ $sql .= 'commissionning_date,';
+ $sql .= 'qc_frequency,';
$sql .= 'datec,';
$sql .= 'fk_user_creat,';
$sql .= 'fk_user_modif,';
@@ -196,6 +211,12 @@ class Productlot extends CommonObject
$sql .= ' '.(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").',';
$sql .= ' '.(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").',';
$sql .= ' '.(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").',';
+ $sql .= ' '.(!isset($this->eol_date) || dol_strlen($this->eol_date) == 0 ? 'NULL' : "'".$this->db->idate($this->eol_date)."'").',';
+ $sql .= ' '.(!isset($this->manufacturing_date) || dol_strlen($this->manufacturing_date) == 0 ? 'NULL' : "'".$this->db->idate($this->manufacturing_date)."'").',';
+ $sql .= ' '.(!isset($this->scrapping_date) || dol_strlen($this->scrapping_date) == 0 ? 'NULL' : "'".$this->db->idate($this->scrapping_date)."'").',';
+ $sql .= ' '.(!isset($this->commissionning_date) || dol_strlen($this->commissionning_date) == 0 ? 'NULL' : "'".$this->db->idate($this->commissionning_date)."'").',';
+ $sql .= ' '.(!isset($this->qc_frequency) ? 'NULL' : $this->qc_frequency).',';
+
$sql .= ' '."'".$this->db->idate(dol_now())."'".',';
$sql .= ' '.(!isset($this->fk_user_creat) ? 'NULL' : $this->fk_user_creat).',';
$sql .= ' '.(!isset($this->fk_user_modif) ? 'NULL' : $this->fk_user_modif).',';
@@ -268,6 +289,11 @@ class Productlot extends CommonObject
$sql .= " t.batch,";
$sql .= " t.eatby,";
$sql .= " t.sellby,";
+ $sql .= " t.eol_date,";
+ $sql .= " t.manufacturing_date,";
+ $sql .= " t.scrapping_date,";
+ $sql .= " t.commissionning_date,";
+ $sql .= " t.qc_frequency,";
$sql .= " t.datec,";
$sql .= " t.tms,";
$sql .= " t.fk_user_creat,";
@@ -295,6 +321,13 @@ class Productlot extends CommonObject
$this->fk_product = $obj->fk_product;
$this->eatby = $this->db->jdate($obj->eatby);
$this->sellby = $this->db->jdate($obj->sellby);
+ $this->eol_date = $this->db->jdate($obj->eol_date);
+
+ $this->manufacturing_date = $this->db->jdate($obj->manufacturing_date);
+ $this->scrapping_date = $this->db->jdate($obj->scrapping_date);
+ $this->commissionning_date = $this->db->jdate($obj->commissionning_date);
+ $this->qc_frequency = $obj->qc_frequency;
+
$this->datec = $this->db->jdate($obj->datec);
$this->tms = $this->db->jdate($obj->tms);
$this->fk_user_creat = $obj->fk_user_creat;
@@ -371,6 +404,11 @@ class Productlot extends CommonObject
$sql .= ' batch = '.(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").',';
$sql .= ' eatby = '.(!isset($this->eatby) || dol_strlen($this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').',';
$sql .= ' sellby = '.(!isset($this->sellby) || dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null').',';
+ $sql .= ' eol_date = '.(!isset($this->eol_date) || dol_strlen($this->eol_date) != 0 ? "'".$this->db->idate($this->eol_date)."'" : 'null').',';
+ $sql .= ' manufacturing_date = '.(!isset($this->manufacturing_date) || dol_strlen($this->manufacturing_date) != 0 ? "'".$this->db->idate($this->manufacturing_date)."'" : 'null').',';
+ $sql .= ' scrapping_date = '.(!isset($this->destruction_date) || dol_strlen($this->destruction_date) != 0 ? "'".$this->db->idate($this->destruction_date)."'" : 'null').',';
+ $sql .= ' commissionning_date = '.(!isset($this->first_use_date) || dol_strlen($this->first_use_date) != 0 ? "'".$this->db->idate($this->first_use_date)."'" : 'null').',';
+ $sql .= ' qc_frequency = '.(!isset($this->qc_frequency) || dol_strlen($this->qc_frequency) != 0 ? "'".$this->db->escape($this->qc_frequency)."'" : 'null').',';
$sql .= ' datec = '.(!isset($this->datec) || dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').',';
$sql .= ' tms = '.(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'").',';
$sql .= ' fk_user_creat = '.(isset($this->fk_user_creat) ? $this->fk_user_creat : "null").',';
diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php
index 646f3d322d7..909782bdbc5 100644
--- a/htdocs/product/stock/productlot_card.php
+++ b/htdocs/product/stock/productlot_card.php
@@ -1,6 +1,7 @@
* Copyright (C) 2018 All-3kcis
+ * Copyright (C) 2021 Noé Cendrier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -138,7 +139,7 @@ if (empty($reshook)) {
$backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1);
- if ($action == 'seteatby' && $user->rights->stock->creer) {
+ if ($action == 'seteatby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
$newvalue = dol_mktime(12, 0, 0, GETPOST('eatbymonth', 'int'), GETPOST('eatbyday', 'int'), GETPOST('eatbyyear', 'int'));
$result = $object->setValueFrom('eatby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
if ($result < 0) {
@@ -149,7 +150,7 @@ if (empty($reshook)) {
}
}
- if ($action == 'setsellby' && $user->rights->stock->creer) {
+ if ($action == 'setsellby' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
$newvalue = dol_mktime(12, 0, 0, GETPOST('sellbymonth', 'int'), GETPOST('sellbyday', 'int'), GETPOST('sellbyyear', 'int'));
$result = $object->setValueFrom('sellby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
if ($result < 0) {
@@ -160,6 +161,60 @@ if (empty($reshook)) {
}
}
+ if ($action == 'seteol_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
+ $newvalue = dol_mktime(12, 0, 0, GETPOST('eol_datemonth', 'int'), GETPOST('eol_dateday', 'int'), GETPOST('eol_dateyear', 'int'));
+ $result = $object->setValueFrom('eol_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
+ if ($result < 0) {
+ setEventMessages($object->error, null, 'errors');
+ $action == 'editeol_date';
+ } else {
+ $action = 'view';
+ }
+ }
+
+ if ($action == 'setmanufacturing_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
+ $newvalue = dol_mktime(12, 0, 0, GETPOST('manufacturing_datemonth', 'int'), GETPOST('manufacturing_dateday', 'int'), GETPOST('manufacturing_dateyear', 'int'));
+ $result = $object->setValueFrom('manufacturing_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
+ if ($result < 0) {
+ setEventMessages($object->error, null, 'errors');
+ $action == 'editmanufacturing_date';
+ } else {
+ $action = 'view';
+ }
+ }
+
+ if ($action == 'setscrapping_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
+ $newvalue = dol_mktime(12, 0, 0, GETPOST('scrapping_datemonth', 'int'), GETPOST('scrapping_dateday', 'int'), GETPOST('scrapping_dateyear', 'int'));
+ $result = $object->setValueFrom('scrapping_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
+ if ($result < 0) {
+ setEventMessages($object->error, null, 'errors');
+ $action == 'editscrapping_date';
+ } else {
+ $action = 'view';
+ }
+ }
+
+ /* if ($action == 'setcommissionning_date' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
+ $newvalue = dol_mktime(12, 0, 0, GETPOST('commissionning_datemonth', 'int'), GETPOST('commissionning_dateday', 'int'), GETPOST('commissionning_dateyear', 'int'));
+ $result = $object->setValueFrom('commissionning_date', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY');
+ if ($result < 0) {
+ setEventMessages($object->error, null, 'errors');
+ $action == 'editcommissionning_date';
+ } else {
+ $action = 'view';
+ }
+ } */
+
+ if ($action == 'setqc_frequency' && $user->rights->stock->creer && ! GETPOST('cancel', 'alpha')) {
+ $result = $object->setValueFrom('qc_frequency', GETPOST('qc_frequency'), '', null, 'int', '', $user, 'PRODUCT_MODIFY');
+ if ($result < 0) { // Prévoir un test de format de durée
+ setEventMessages($object->error, null, 'errors');
+ $action == 'editqc_frequency';
+ } else {
+ $action = 'view';
+ }
+ }
+
$triggermodname = 'PRODUCT_LOT_MODIFY'; // Name of trigger action code to execute when we modify record
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
@@ -428,6 +483,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
}
+ // Traceability info
+ if ($conf->global->PRODUCT_LOT_ENABLE_TRACEABILITY) {
+ print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).' ';
+ print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').' ';
+ print ' ';
+ print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).' ';
+ print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').' ';
+ print ' ';
+ print ''.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).' ';
+ print ''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').' ';
+ print ' ';
+ // print ''.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).' ';
+ // print ''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').' ';
+ // print ' ';
+ print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).' ';
+ print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').' ';
+ print ' ';
+ }
+
// Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';