From ad3cbd17c2a2918cb1bb6c6fc10011258151e2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 2 Oct 2019 11:12:30 +0200 Subject: [PATCH] backport commit for setmulticurrency https://github.com/Dolibarr/dolibarr/commit/a4892071227156be6a0c8729c91b46eb6474aca2#diff-48f18024fb928ce21b76ef02fc967c67 --- htdocs/core/class/commonobject.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 251ca43694d..61a94438841 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1876,10 +1876,16 @@ abstract class CommonObject { foreach ($this->lines as &$line) { + // Amounts in company currency will be recalculated if($mode == 1) { $line->subprice = 0; } + // Amounts in foreign currency will be recalculated + if($mode == 2) { + $line->multicurrency_subprice = 0; + } + switch ($this->element) { case 'propal': $this->updateline(