mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 01:34:33 -04:00
Change payment exchange_currency_id from the clients currency to the company currency
This commit is contained in:
parent
f6c9a3a6a3
commit
98aaf3028b
@ -208,7 +208,9 @@ class PaymentMigrationRepository extends BaseRepository
|
|||||||
$exchange_rate = new CurrencyApi();
|
$exchange_rate = new CurrencyApi();
|
||||||
|
|
||||||
$payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date));
|
$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;
|
return $payment;
|
||||||
|
@ -199,7 +199,9 @@ class PaymentRepository extends BaseRepository {
|
|||||||
$exchange_rate = new CurrencyApi();
|
$exchange_rate = new CurrencyApi();
|
||||||
|
|
||||||
$payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date));
|
$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;
|
return $payment;
|
||||||
|
@ -113,7 +113,9 @@ class MarkPaid extends AbstractService
|
|||||||
$exchange_rate = new CurrencyApi();
|
$exchange_rate = new CurrencyApi();
|
||||||
|
|
||||||
$payment->exchange_rate = $exchange_rate->exchangeRate($client_currency, $company_currency, Carbon::parse($payment->date));
|
$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();
|
$payment->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user