|
dolibarr 21.0.4
|
Class to manage barcode with standard rule. More...


Public Member Functions | |
| __construct () | |
| Constructor. | |
| info ($langs) | |
| Return description of module. | |
| getExample ($langs=null, $objproduct=null) | |
| Return an example of result returned by getNextValue. | |
| literalBarcodeType ($db, $type=0) | |
| Return literal barcode type code from numerical rowid type of barcode. | |
| getNextValue ($objproduct=null, $type='') | |
| Return next value. | |
| verif ($db, &$code, $product, $thirdparty_type, $type) | |
| Check validity of code according to its rules. | |
| verif_dispo ($db, $code, $product) | |
| Return if a code is used (by other element) | |
| verif_syntax ($codefortest, $typefortest) | |
| Return if a barcode value match syntax. | |
Public Member Functions inherited from ModeleNumRefBarCode | |
| getToolTip ($langs, $soc, $type) | |
| Return description of module parameters. | |
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. | |
| 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. | |
Class to manage barcode with standard rule.
Definition at line 36 of file mod_barcode_product_standard.php.
| mod_barcode_product_standard::getExample | ( | $langs = null, | |
| $objproduct = null ) |
Return an example of result returned by getNextValue.
| ?Translate | $langs | Object langs |
| ?CommonObject | $objproduct | Object |
Reimplemented from ModeleNumRefBarCode.
Definition at line 116 of file mod_barcode_product_standard.php.
References getNextValue().
| mod_barcode_product_standard::getNextValue | ( | $objproduct = null, | |
| $type = '' ) |
Return next value.
| ?CommonObject | $objproduct | Object product (not used) |
| string | $type | Type of barcode (EAN, ISBN, ...) |
Reimplemented from ModeleNumRefBarCode.
Definition at line 171 of file mod_barcode_product_standard.php.
References barcode_gen_ean_sum(), dol_now(), dol_syslog(), get_next_value(), getDolGlobalString(), and literalBarcodeType().
Referenced by getExample().
| mod_barcode_product_standard::info | ( | $langs | ) |
Return description of module.
| Translate | $langs | Object langs |
Reimplemented from CommonNumRefGenerator.
Definition at line 69 of file mod_barcode_product_standard.php.
References $conf, and getDolGlobalString().
| mod_barcode_product_standard::literalBarcodeType | ( | $db, | |
| $type = 0 ) |
Return literal barcode type code from numerical rowid type of barcode.
Definition at line 140 of file mod_barcode_product_standard.php.
References $conf, and dol_print_error().
Referenced by getNextValue().
| mod_barcode_product_standard::verif | ( | $db, | |
| & | $code, | ||
| $product, | |||
| $thirdparty_type, | |||
| $type ) |
Check validity of code according to its rules.
| DoliDB | $db | Database handler |
| string | $code | Code to check/correct |
| Product | Societe | $product | Object product |
| int<0,1> | $thirdparty_type 0 = customer/prospect , 1 = supplier | |
| string | $type | type of barcode (EAN, ISBN, ...) |
Reimplemented from ModeleNumRefBarCode.
Definition at line 241 of file mod_barcode_product_standard.php.
References dol_strlen(), dol_syslog(), getDolGlobalString(), verif_dispo(), and verif_syntax().
| mod_barcode_product_standard::verif_dispo | ( | $db, | |
| $code, | |||
| $product ) |
Return if a code is used (by other element)
Definition at line 290 of file mod_barcode_product_standard.php.
Referenced by verif().
| mod_barcode_product_standard::verif_syntax | ( | $codefortest, | |
| $typefortest ) |
Return if a barcode value match syntax.
| string | $codefortest | Code to check syntax |
| string | $typefortest | Type of barcode (ISBN, EAN, ...) |
Definition at line 321 of file mod_barcode_product_standard.php.
References $conf, check_value(), dol_syslog(), and getDolGlobalString().
Referenced by verif().