Merge pull request #12018 from frederic34/patch-12

backport commit for setmulticurrency
This commit is contained in:
Laurent Destailleur 2019-10-03 15:54:01 +02:00 committed by GitHub
commit 03614536f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1876,10 +1876,16 @@ abstract class CommonObject
{ {
foreach ($this->lines as &$line) foreach ($this->lines as &$line)
{ {
// Amounts in company currency will be recalculated
if($mode == 1) { if($mode == 1) {
$line->subprice = 0; $line->subprice = 0;
} }
// Amounts in foreign currency will be recalculated
if($mode == 2) {
$line->multicurrency_subprice = 0;
}
switch ($this->element) { switch ($this->element) {
case 'propal': case 'propal':
$this->updateline( $this->updateline(