|
dolibarr
13.0.2
|
Class to manage barcode with standard rule. More...
Inheritance diagram for mod_barcode_product_standard:
Collaboration diagram for mod_barcode_product_standard:Public Member Functions | |
| __construct () | |
| Constructor. | |
| info ($langs) | |
| Return description of module. More... | |
| getExample ($langs, $objproduct=0) | |
| Return an example of result returned by getNextValue. More... | |
| getNextValue ($objproduct=null, $type= '') | |
| Return next value. More... | |
| verif ($db, &$code, $product, $thirdparty_type, $type) | |
| Check validity of code according to its rules. More... | |
| verif_dispo ($db, $code, $product) | |
| Return if a code is used (by other element) More... | |
| verif_syntax ($codefortest, $typefortest) | |
| Return if a barcode value match syntax. More... | |
Public Member Functions inherited from ModeleNumRefBarCode | |
| info ($langs) | |
| Return default description of numbering model. More... | |
| getNom ($langs) | |
| Return model name. More... | |
| getExample ($langs) | |
| Return a numbering example. More... | |
| getNextValue ($objproduct, $type= '') | |
| Return next value available. More... | |
| getVersion () | |
| Return version of module. More... | |
| getToolTip ($langs, $soc, $type) | |
| Return description of module parameters. More... | |
Class to manage barcode with standard rule.
Definition at line 34 of file mod_barcode_product_standard.php.
| mod_barcode_product_standard::getExample | ( | $langs, | |
$objproduct = 0 |
|||
| ) |
Return an example of result returned by getNextValue.
Definition at line 128 of file mod_barcode_product_standard.php.
References getNextValue().
| mod_barcode_product_standard::getNextValue | ( | $objproduct = null, |
|
$type = '' |
|||
| ) |
Return next value.
| Product | $objproduct | Object product |
| string | $type | Type of barcode (EAN, ISBN, ...) |
Definition at line 151 of file mod_barcode_product_standard.php.
References dol_now(), and get_next_value().
Referenced by getExample().
| mod_barcode_product_standard::info | ( | $langs | ) |
Return description of module.
| Translate | $langs | Object langs |
Definition at line 83 of file mod_barcode_product_standard.php.
| 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 | $product | Object product |
| int | $thirdparty_type | 0 = customer/prospect , 1 = supplier |
| string | $type | type of barcode (EAN, ISBN, ...) |
Definition at line 193 of file mod_barcode_product_standard.php.
References dol_strlen(), dol_syslog(), verif_dispo(), and verif_syntax().
| mod_barcode_product_standard::verif_dispo | ( | $db, | |
| $code, | |||
| $product | |||
| ) |
| 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 273 of file mod_barcode_product_standard.php.
References check_value(), and dol_syslog().
Referenced by verif().