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 <contact@dolicraft.com>
This commit is contained in:
Dolicraft 2026-06-19 09:42:53 +02:00
parent 594129161d
commit b2927a68e0

View file

@ -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"