Debug auto numbering of lot/serial.
This commit is contained in:
parent
5ddd98cd39
commit
172b615d6c
@ -76,8 +76,24 @@ class modProductBatch extends DolibarrModules
|
||||
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("productbatch");
|
||||
|
||||
// Constants
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "PRODUCTBATCH_LOT_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_lot_free";
|
||||
$this->const[$r][3] = 'Module to control product codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "PRODUCTBATCH_SN_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_sn_free";
|
||||
$this->const[$r][3] = 'Module to control product codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->tabs = array();
|
||||
|
||||
|
||||
@ -69,9 +69,9 @@ if ($action == 'updateMaskLot') {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == 'setmodlot') {
|
||||
dolibarr_set_const($db, "LOT_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
} elseif ($action == 'setmodsn') {
|
||||
dolibarr_set_const($db, "SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -89,7 +89,7 @@ print load_fiche_titre($langs->trans("ProductLotSetup"), $linkback, 'title_setup
|
||||
|
||||
$head = product_lot_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'settings', $langs->trans("Batch"), -1, 'productbatch');
|
||||
dol_fiche_head($head, 'settings', $langs->trans("Batch"), -1, 'lot');
|
||||
|
||||
/*
|
||||
* Lot Numbering models
|
||||
@ -140,7 +140,7 @@ foreach ($dirmodels as $reldir) {
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td class="center">';
|
||||
if ($conf->global->LOT_ADDON == $file) {
|
||||
if ($conf->global->PRODUCTBATCH_LOT_ADDON == $file) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodlot&value='.$file.'">';
|
||||
@ -232,7 +232,7 @@ foreach ($dirmodels as $reldir) {
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td class="center">';
|
||||
if ($conf->global->SN_ADDON == $file) {
|
||||
if ($conf->global->PRODUCTBATCH_SN_ADDON == $file) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodsn&value='.$file.'">';
|
||||
|
||||
@ -77,7 +77,7 @@ print load_fiche_titre($title, $linkback, 'title_setup');
|
||||
|
||||
$head = product_lot_admin_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'attributes', $textobject, -1, 'stock');
|
||||
print dol_get_fiche_head($head, 'attributes', $textobject, -1, 'lot');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user