NEW : next ref on clone doesn't need conf, it's used if mask exists
This commit is contained in:
parent
900c287de4
commit
dd2f699730
@ -169,11 +169,6 @@ else if ($action == 'usesearchtoselectproduct')
|
||||
$usesearch = GETPOST('activate_usesearchtoselectproduct','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_USE_SEARCH_TO_SELECT", $usesearch,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'useMaskOnClone')
|
||||
{
|
||||
$usemask = GETPOST('activate_useMaskOnClone','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_USE_MASK_ON_CLONE", $usemask,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'set')
|
||||
{
|
||||
$const = "PRODUCT_SPECIAL_".strtoupper(GETPOST('spe','alpha'));
|
||||
@ -444,21 +439,6 @@ print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Pouvoir utiliser la numérotation configurée dans le masque produit lors du clonage d'un produit
|
||||
$var=!$var;
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="useMaskOnClone">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("UseMaskOnClone", $conf->service->enabled ? '/service' : '').'</td>';
|
||||
print '<td width="60" align="right">';
|
||||
print $form->selectyesno("activate_useMaskOnClone",$conf->global->PRODUIT_USE_MASK_ON_CLONE,1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Activate propal merge produt card
|
||||
/* disabled. PRODUIT_PDF_MERGE_PROPAL can be added manually. Still did not understand how this feature works.
|
||||
$var=!$var;
|
||||
|
||||
@ -1614,7 +1614,7 @@ if ($result > 0)
|
||||
}
|
||||
|
||||
$tmpcode='';
|
||||
if (! empty($modCodeProduct->code_auto) && $conf->global->PRODUIT_USE_MASK_ON_CLONE) $tmpcode=$modCodeProduct->getNextValue($object,$object->type);
|
||||
if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$object->type);
|
||||
|
||||
// Define confirmation messages
|
||||
$formquestionclone=array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user