This commit is contained in:
Laurent Destailleur 2024-09-04 22:10:33 +02:00
parent 107f818cf2
commit 001dc9378f
10 changed files with 55 additions and 4 deletions

View File

@ -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();
}

View File

@ -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));

View File

@ -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 '';
}
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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';

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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();
}