diff --git a/htdocs/core/modules/asset/modules_asset.php b/htdocs/core/modules/asset/modules_asset.php index 324ad6a32b1..7cd2f17931b 100644 --- a/htdocs/core/modules/asset/modules_asset.php +++ b/htdocs/core/modules/asset/modules_asset.php @@ -89,4 +89,11 @@ abstract class ModeleNumRefAsset extends CommonNumRefGenerator * @return string|int<-1,0> Next value if OK, <=0 if KO */ abstract public function getNextValue($object); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 81eba6df26c..cc954cace22 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -110,8 +110,6 @@ class mod_codeproduct_leopard extends ModeleProductCode */ public function verif($db, &$code, $product, $type) { - global $conf; - $result = 0; $code = strtoupper(trim($code)); diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index bb9c206ee8a..554d83f3aff 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -72,6 +72,7 @@ abstract class ModelePDFProduct extends CommonDocGenerator abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0); } + /** * Class template for classes of numbering product */ @@ -208,5 +209,8 @@ abstract class ModeleProductCode extends CommonNumRefGenerator * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - //abstract public function getExample($langs = null, $objproduct = '', $type = -1); + public function getExample($langs = null, $objproduct = '', $type = -1) + { + return ''; + } } diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index e787ee19e39..417245a968f 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -89,4 +89,11 @@ abstract class ModeleNumRefBatch extends CommonNumRefGenerator * @return string|int<-1,0> String if OK, <0 if KO */ abstract public function getNextValue($objsoc, $object); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index d9b1d9a1758..08cb393dced 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -92,4 +92,11 @@ abstract class ModeleNumRefProjects extends CommonNumRefGenerator * @return string|int<-1,0> Value if OK, 0 if KO */ abstract public function getNextValue($objsoc, $project); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php index beeecc06509..a11976bb280 100644 --- a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php +++ b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php @@ -90,4 +90,11 @@ abstract class ModeleNumRefStockTransfer extends CommonNumRefGenerator * @return string|int<-1,0> Value if OK, 0 if KO */ abstract public function getNextValue($object); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index ee33640a412..2affafe14ba 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -103,7 +103,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos */ public function getExample() { - global $conf, $langs, $mysoc; + global $langs, $mysoc; $old_code_client = $mysoc->code_client; $mysoc->code_client = 'CCCCCCCCCC'; diff --git a/htdocs/core/modules/takepos/modules_takepos.php b/htdocs/core/modules/takepos/modules_takepos.php index 6307bd42e0a..23d587df564 100644 --- a/htdocs/core/modules/takepos/modules_takepos.php +++ b/htdocs/core/modules/takepos/modules_takepos.php @@ -44,4 +44,11 @@ abstract class ModeleNumRefTakepos extends CommonNumRefGenerator * @return string|int<-1,0> Next ref value or last ref if $mode is 'last' */ abstract public function getNextValue($objsoc = null, $invoice = null, $mode = 'next'); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php index 5ad0338ad72..7d7bfadd13d 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php @@ -74,4 +74,11 @@ abstract class ModeleNumRefRecruitmentCandidature extends CommonNumRefGenerator * @return string|int<-1,0> Next value if OK, <=0 if KO */ abstract public function getNextValue($object); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php index a9427b7e068..f5c131cd5e3 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php @@ -89,4 +89,11 @@ abstract class ModeleNumRefRecruitmentJobPosition extends CommonNumRefGenerator * @return string|int<-1,0> Next value if OK, 0 if KO */ abstract public function getNextValue($object); + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); }