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->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
|
||||||
$this->langfiles = array("productbatch");
|
$this->langfiles = array("productbatch");
|
||||||
|
|
||||||
|
// Constants
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$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();
|
$this->tabs = array();
|
||||||
|
|
||||||
|
|||||||
@ -69,9 +69,9 @@ if ($action == 'updateMaskLot') {
|
|||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
} elseif ($action == 'setmodlot') {
|
} 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') {
|
} 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();
|
$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
|
* Lot Numbering models
|
||||||
@ -140,7 +140,7 @@ foreach ($dirmodels as $reldir) {
|
|||||||
print '</td>'."\n";
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td class="center">';
|
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');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodlot&value='.$file.'">';
|
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>'."\n";
|
||||||
|
|
||||||
print '<td class="center">';
|
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');
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
} else {
|
} else {
|
||||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodsn&value='.$file.'">';
|
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();
|
$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';
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user