diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index e1fe84600d1..4841c97f2bc 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -129,6 +129,9 @@ if ($action == 'other') } } + $value = GETPOST('price_base_type', 'alpha'); + $res = dolibarr_set_const($db, "PRODUCT_PRICE_BASE_TYPE", $value, 'chaine', 0, '', $conf->entity); + $value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity); @@ -598,6 +601,14 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print ''; } +//Default product price base type +print ''; +print ''.$langs->trans("DefaultPriceType").''; +print ''; +print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); +print ''; +print ''; + // sousproduits activation/desactivation print ''; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 87e86e8e0bc..87e42b537e3 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1222,7 +1222,7 @@ else // Price print ''.$langs->trans("SellingPrice").''; print ''; - print $form->selectPriceBaseType($object->price_base_type, "price_base_type"); + print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); print ''; // Min price