From 00aded09bb1b84e3d791b071de52a6f95248e3df Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 17:27:08 +0200 Subject: [PATCH] Fix : shipment prices not related to qty shipped --- htdocs/expedition/class/expedition.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 11c0f80340038..6ba325f8e8e17 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -978,13 +978,14 @@ function fetch_lines() $line->volume_units = $obj->volume_units; // For invoicing + $tabprice = calcul_price_total($obj->qty_shipped, $obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $info_bits, $obj->fk_product_type); // We force type to 0 $line->desc = $obj->description; // We need ->desc because some code into CommonObject use desc (property defined for other elements) $line->qty = $obj->qty_shipped; - $line->total_ht = $obj->total_ht; - $line->total_localtax1 = $obj->total_localtax1; - $line->total_localtax2 = $obj->total_localtax2; - $line->total_ttc = $obj->total_ttc; - $line->total_tva = $obj->total_tva; + $line->total_ht = $tabprice[0]; + $line->total_localtax1 = $tabprice[9]; + $line->total_localtax2 = $tabprice[10]; + $line->total_ttc = $tabprice[2]; + $line->total_tva = $tabprice[1]; $line->tva_tx = $obj->tva_tx; $line->localtax1_tx = $obj->localtax1_tx; $line->localtax2_tx = $obj->localtax2_tx; @@ -992,7 +993,6 @@ function fetch_lines() $line->subprice = $obj->subprice; $line->remise_percent = $obj->remise_percent; - $tabprice = calcul_price_total($obj->qty_shipped, $obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $info_bits, $obj->fk_product_type); // We force type to 0 $this->total_ht+= $tabprice[0]; $this->total_tva+= $tabprice[1]; $this->total_ttc+= $tabprice[2];