From 28f4ab4c90efac46e4162076ad4c4e4eefacebca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jan 2022 18:52:50 +0100 Subject: [PATCH] Update supplier_proposal.class.php --- .../supplier_proposal/class/supplier_proposal.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index b239b6cc3da..7980e3fc2ba 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -725,7 +725,9 @@ class SupplierProposal extends CommonObject $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; - $pu = $pu_ht = $tabprice[3]; + $pu_ht = $tabprice[3]; + $pu_tva = $tabprice[4]; + $pu_ttc = $tabprice[5]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; @@ -733,6 +735,11 @@ class SupplierProposal extends CommonObject $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; + $pu = $pu_ht; + if ($price_base_type == 'TTC') { + $pu = $pu_ttc; + } + //Fetch current line from the database and then clone the object and set it in $oldline property $line = new SupplierProposalLine($this->db); $line->fetch($rowid);