Update mod_barcode_product_standard.php

This commit is contained in:
Laurent Destailleur 2021-01-11 16:27:37 +01:00 committed by GitHub
parent 50461931b0
commit 5ee97dfd4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,10 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean)
if (empty($type)) {
$type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
} //get barcode type configuration for products if $type not set
// TODO
// Get Mask value
@ -173,7 +177,6 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
$numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now);
//if EAN13 calculate and substitute the last 13th character (* or ?) used in the mask by the EAN13 key
if ($type=='') {$type=$conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;} //get barcode type configuration for products if $type not set
if ($type==2) //2 = EAN13
{
if (strlen($numFinal)==13)