Merge pull request #7853 from atm-ph/fix_5.0_invoice_updateline_calcul_price_total

Fix product type is ignored and can generate a diffrent result with s…
This commit is contained in:
Laurent Destailleur 2017-12-02 14:06:25 +01:00 committed by GitHub
commit 9cafb08759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2878,7 +2878,7 @@ class Facture extends CommonInvoice
// Cap percentages to 100
if ($percent > 100) $percent = 100;
$line->situation_percent = $percent;
$tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->product_type, 'HT', 0, 0, $mysoc, '', $percent);
$tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 0, 'HT', 0, $line->product_type, $mysoc, '', $percent);
$line->total_ht = $tabprice[0];
$line->total_tva = $tabprice[1];
$line->total_ttc = $tabprice[2];