From 485ef522d26aee2c0f36984315d4f0a1aa4535d3 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Sun, 3 May 2020 19:47:10 +0200 Subject: [PATCH] =?UTF-8?q?Add=20option=20HT=20TTC=20cr=C3=A9ate=20product?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/admin/product.php | 11 +++++++++++ htdocs/product/card.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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