Merge pull request #11676 from ptibogxiv/patch-222
Fix force recalculate price with multicurrency
This commit is contained in:
commit
0cde1b5c93
@ -1913,7 +1913,7 @@ abstract class CommonObject
|
||||
* Change the multicurrency rate
|
||||
*
|
||||
* @param double $rate multicurrency rate
|
||||
* @param int $mode mode 1 : amounts in company currency will be recalculated, mode 2 : amounts in foreign currency
|
||||
* @param int $mode mode 1 : amounts in company currency will be recalculated, mode 2 : amounts in foreign currency will be recalculated
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
public function setMulticurrencyRate($rate, $mode = 1)
|
||||
@ -1936,10 +1936,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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user