NEW constant KEEP_DISCOUNT_LINES_FROM_ORIGIN

This commit is contained in:
Christophe Battarel 2019-04-10 10:29:17 +02:00
parent 0327f2d5cd
commit b04296984d

View File

@ -1391,7 +1391,7 @@ if (empty($reshook))
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
if ($object->situation_counter == 1) $lines[$i]->situation_percent = 0;
if ($lines[$i]->subprice < 0)
if ($lines[$i]->subprice < 0 && empty($conf->global->KEEP_DISCOUNT_LINES_FROM_ORIGIN))
{
// Negative line, we create a discount line
$discount = new DiscountAbsolute($db);