diff --git a/app/Repositories/Migration/PaymentMigrationRepository.php b/app/Repositories/Migration/PaymentMigrationRepository.php index 49980b60368f..7564d873c9cf 100644 --- a/app/Repositories/Migration/PaymentMigrationRepository.php +++ b/app/Repositories/Migration/PaymentMigrationRepository.php @@ -208,7 +208,9 @@ class PaymentMigrationRepository extends BaseRepository $exchange_rate = new CurrencyApi(); $payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date)); - $payment->exchange_currency_id = $client_currency; + // $payment->exchange_currency_id = $client_currency; + $payment->exchange_currency_id = $company_currency; + } return $payment; diff --git a/app/Repositories/PaymentRepository.php b/app/Repositories/PaymentRepository.php index e0d881682316..e17cff099658 100644 --- a/app/Repositories/PaymentRepository.php +++ b/app/Repositories/PaymentRepository.php @@ -199,7 +199,9 @@ class PaymentRepository extends BaseRepository { $exchange_rate = new CurrencyApi(); $payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date)); - $payment->exchange_currency_id = $client_currency; + // $payment->exchange_currency_id = $client_currency; + $payment->exchange_currency_id = $company_currency; + } return $payment; diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index ff1e0a4b5c93..68563ee5dfc7 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -113,7 +113,9 @@ class MarkPaid extends AbstractService $exchange_rate = new CurrencyApi(); $payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date)); - $payment->exchange_currency_id = $client_currency; + //$payment->exchange_currency_id = $client_currency; // 23/06/2021 + $payment->exchange_currency_id = $company_currency; + $payment->save(); }