introduce PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY

This commit is contained in:
Christophe Battarel 2019-04-16 09:00:39 +02:00
parent 278b708e17
commit 30ad0e7e11

View File

@ -86,7 +86,7 @@ if ($idprod > 0)
// Add price for costprice
$price=$producttmp->cost_price;
if (empty($price))
if (empty($price) && ! empty($conf->global->PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY))
{
// get costprice for subproducts if any
$producttmp->get_sousproduits_arbo();