dolibarr 21.0.0-beta
ModeleNumRefBarCode Class Reference
Inheritance diagram for ModeleNumRefBarCode:
Collaboration diagram for ModeleNumRefBarCode:

Public Member Functions

 getNextValue ($objcommon=null, $type='')
 Return next value available.
 
 getExample ($langs=null, $object=null)
 Return an example of result returned by getNextValue.
 
 getToolTip ($langs, $soc, $type)
 Return description of module parameters.
 
 verif ($db, &$code, $object, $thirdparty_type, $type)
 Check validity of code according to its rules.
 
- Public Member Functions inherited from CommonNumRefGenerator
 getNom ($langs)
 Return model name.
 
 getName ($langs)
 Return model name.
 
 isEnabled ()
 Return if a module can be used or not.
 
 info ($langs)
 Returns the default description of the numbering template.
 
 canBeActivated ($object)
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.
 
 getVersion ()
 Returns version of numbering module.
 

Detailed Description

Definition at line 93 of file modules_barcode.class.php.

Member Function Documentation

◆ getExample()

ModeleNumRefBarCode::getExample ( $langs = null,
$object = null )
abstract

Return an example of result returned by getNextValue.

Parameters
?Translate$langsObject langs
?CommonObject$objectObject product
Returns
string Return string example

Reimplemented in mod_barcode_product_standard, and mod_barcode_thirdparty_standard.

◆ getNextValue()

ModeleNumRefBarCode::getNextValue ( $objcommon = null,
$type = '' )

Return next value available.

Parameters
?CommonObject$objcommonObject Product, Thirdparty
string$typeType of barcode (EAN, ISBN, ...)
Returns
string Value

Reimplemented in mod_barcode_product_standard, and mod_barcode_thirdparty_standard.

Definition at line 109 of file modules_barcode.class.php.

Referenced by getToolTip().

◆ getToolTip()

ModeleNumRefBarCode::getToolTip ( $langs,
$soc,
$type )

Return description of module parameters.

Parameters
Translate$langsOutput language
?Societe$socThird party object
int$type-1=Nothing, 0=Product, 1=Service
Returns
string HTML translated description

Definition at line 134 of file modules_barcode.class.php.

References getDolGlobalString(), CommonNumRefGenerator\getName(), getNextValue(), CommonNumRefGenerator\getVersion(), name, and yn().

◆ verif()

ModeleNumRefBarCode::verif ( $db,
& $code,
$object,
$thirdparty_type,
$type )
abstract

Check validity of code according to its rules.

Parameters
DoliDB$dbDatabase handler
string$codeCode to check/correct
Product | Societe$objectObject product or ThirdParty
int<0,1>$thirdparty_type 0 = customer/prospect , 1 = supplier
string$typetype of barcode (EAN, ISBN, ...)
Returns
int<-7,0> 0 if OK -1 ErrorBadCustomerCodeSyntax -2 ErrorCustomerCodeRequired -3 ErrorCustomerCodeAlreadyUsed -4 ErrorPrefixRequired -7 ErrorBadClass

Reimplemented in mod_barcode_product_standard, and mod_barcode_thirdparty_standard.


The documentation for this class was generated from the following file: