fixed currency conversion

This commit is contained in:
denisdulici
2020-03-09 18:07:16 +03:00
parent bc421a5887
commit 08f349c42c
10 changed files with 24 additions and 49 deletions

View File

@ -98,7 +98,7 @@ abstract class DocumentModel extends Model
$default_model->currency_code = $item->currency_code;
$default_model->currency_rate = $currencies[$item->currency_code];
$default_amount = (double) $default_model->getDivideConvertedAmount();
$default_amount = (double) $default_model->getAmountConvertedToDefault();
$convert_model = new Transaction();
$convert_model->default_currency_code = $item->currency_code;
@ -106,7 +106,7 @@ abstract class DocumentModel extends Model
$convert_model->currency_code = $this->currency_code;
$convert_model->currency_rate = $currencies[$this->currency_code];
$amount = (double) $convert_model->getAmountConvertedFromCustomDefault();
$amount = (double) $convert_model->getAmountConvertedFromDefault();
}
$paid += $amount;