From b2927a68e02181f43db2ef5c87bdcb3879e417dc Mon Sep 17 00:00:00 2001 From: Dolicraft Date: Fri, 19 Jun 2026 09:42:53 +0200 Subject: [PATCH] Fix #37661 require price_base_type on product CSV import The import_fields_array entry for p.price_base_type accepted a missing/empty value because the CSV importer skips the regex check when newval is empty (import_csv.modules.php:682). Marking the field as mandatory with the trailing star forces the user to map a column and provide HT or TTC, so the row no longer ends up with an empty/NULL value that breaks price displays. Signed-off-by: Dolicraft --- htdocs/core/modules/modProduct.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index e344fc54b98..9909b2f4811 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -514,7 +514,7 @@ class modProduct extends DolibarrModules 'p.price_min' => "MinPrice", 'p.price_ttc' => "SellingPriceTTC", //with tax 'p.price_min_ttc' => "SellingMinPriceTTC", - 'p.price_base_type' => "PriceBaseType", //price base: with-tax (TTC) or without (HT) tax. Displays accordingly in Product card + 'p.price_base_type' => "PriceBaseType*", //price base: with-tax (TTC) or without (HT) tax. Displays accordingly in Product card 'p.tva_tx' => 'VATRate', 'p.datec' => 'DateCreation', 'p.cost_price' => "CostPrice"