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>';
|
$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 .= '</tr>';
|
||||||
|
|
||||||
$texte .= '</table>';
|
$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>';
|
$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 .= '</tr>';
|
||||||
|
|
||||||
$texte .= '</table>';
|
$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
|
TooManyQtyForSerialNumber=You can only have one product %s for serial number %s
|
||||||
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
BatchLotNumberingModules=Options for automatic generation of batch products managed by lots
|
||||||
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers
|
||||||
|
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
|
QtyToAddAfterBarcodeScan=Qty to add for each barcode/lot/serial scanned
|
||||||
|
|
||||||
|
|||||||
@ -28,3 +28,6 @@ SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le pro
|
|||||||
TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un produit %s avec le numéro de série %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
|
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);
|
dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||||
} elseif ($action == 'setmodsn') {
|
} elseif ($action == 'setmodsn') {
|
||||||
dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
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