From dd2f6997309893659563dca165fcce701cd9f8d0 Mon Sep 17 00:00:00 2001 From: Gauthier Date: Thu, 13 Aug 2015 09:28:25 +0200 Subject: [PATCH] NEW : next ref on clone doesn't need conf, it's used if mask exists --- htdocs/product/admin/product.php | 20 -------------------- htdocs/product/card.php | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index e19f3001883..c8105c8b61a 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -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 ''; print ''; print ''; -// Pouvoir utiliser la numérotation configurée dans le masque produit lors du clonage d'un produit -$var=!$var; -print '
'; -print ''; -print ''; -print ''; -print ''.$langs->trans("UseMaskOnClone", $conf->service->enabled ? '/service' : '').''; -print ''; -print $form->selectyesno("activate_useMaskOnClone",$conf->global->PRODUIT_USE_MASK_ON_CLONE,1); -print ''; -print ''; -print ''; -print ''; -print '
'; - // Activate propal merge produt card /* disabled. PRODUIT_PDF_MERGE_PROPAL can be added manually. Still did not understand how this feature works. $var=!$var; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 36d79dc6d39..5fdba5958f2 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -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(