commit
033a243372
@ -84,6 +84,16 @@ class mod_lot_advanced extends ModeleNumRefBatch
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
// Option to enable custom masks per product
|
||||
$texte .= '<td class="right">';
|
||||
if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) {
|
||||
$texte .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=0">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
$texte .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskslot&value=1">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
$texte .= ' '.$langs->trans('CustomMasks')."\n";
|
||||
$texte .= '</td>';
|
||||
|
||||
$texte .= '</tr>';
|
||||
|
||||
$texte .= '</table>';
|
||||
|
||||
@ -84,6 +84,16 @@ class mod_sn_advanced extends ModeleNumRefBatch
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
// Option to enable custom masks per product
|
||||
$texte .= '<td class="right">';
|
||||
if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) {
|
||||
$texte .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=0">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
$texte .= '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmaskssn&value=1">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
$texte .= ' '.$langs->trans('CustomMasks')."\n";
|
||||
$texte .= '</td>';
|
||||
|
||||
$texte .= '</tr>';
|
||||
|
||||
$texte .= '</table>';
|
||||
|
||||
@ -28,4 +28,8 @@ SerialNumberAlreadyInUse=Serial number %s is already used for product %s
|
||||
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
|
||||
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
||||
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
||||
QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
|
||||
CustomMasks=Adds an option to define mask in the product card
|
||||
LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask
|
||||
SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask
|
||||
QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
|
||||
|
||||
|
||||
@ -27,4 +27,7 @@ StockDetailPerBatch=Stock détaillé par lot
|
||||
SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le produit %s
|
||||
TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un produit %s avec le numéro de série %s
|
||||
BatchLotNumberingModules=Modèle de génération et contrôle des numéros de lot
|
||||
BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série
|
||||
BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série
|
||||
CustomMasks=Ajoute une option pour définir le masque dans la fiche produit
|
||||
LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot
|
||||
SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série
|
||||
@ -72,6 +72,16 @@ if ($action == 'updateMaskLot') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
} elseif ($action == 'setmodsn') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
} elseif ($action == 'setmaskslot') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
|
||||
if ($value == '1' && $conf->global->PRODUCTBATCH_LOT_ADDONS !== 'mod_lot_advanced') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", 'mod_lot_advanced', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
} elseif ($action == 'setmaskssn') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity);
|
||||
if ($value == '1' && $conf->global->PRODUCTBATCH_SN_ADDONS !== 'mod_sn_advanced') {
|
||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", 'mod_sn_advanced', 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user