Merge pull request #8129 from hregis/6.0_bug

Fix: remove lines with special code when convert to reduc
This commit is contained in:
Laurent Destailleur 2018-02-04 12:18:20 +01:00 committed by GitHub
commit e5cb2be618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -636,7 +636,7 @@ if (empty($reshook))
$i = 0;
foreach ($object->lines as $line)
{
if ($line->total_ht!=0)
if ($line->product_type < 9 && $line->total_ht != 0) // Remove lines with product_type greater than or equal to 9
{ // no need to create discount if amount is null
$amount_ht[$line->tva_tx] += $line->total_ht;
$amount_tva[$line->tva_tx] += $line->total_tva;