masks options are boolean
This commit is contained in:
parent
fc76e06058
commit
4ffc6531fe
@ -74,10 +74,10 @@ if ($action == 'updateMaskLot') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if ($action == 'setmaskslot') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
|
||||
}
|
||||
if ($action == 'setmaskssn') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -195,12 +195,12 @@ foreach ($dirmodels as $reldir) {
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td class="center">';
|
||||
if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS == 'true') {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=false">';
|
||||
if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=true">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
@ -319,12 +319,12 @@ foreach ($dirmodels as $reldir) {
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td class="center">';
|
||||
if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS == 'true') {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=false">';
|
||||
if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=true">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user