1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Set payment exchange rate

This commit is contained in:
David Bomba 2021-06-21 06:55:48 +10:00
parent 2aad520733
commit 8b9b30ff63

View File

@ -90,6 +90,7 @@ class PaymentRepository extends BaseRepository {
$client->service()->updatePaidToDate($_credit_totals)->save();
}
}
}
/*Fill the payment*/
@ -184,6 +185,10 @@ class PaymentRepository extends BaseRepository {
*/
private function processExchangeRates($data, $payment)
{
if(array_key_exists('exchange_rate', $data) && isset($data['exchange_rate']))
return $payment;
$client = Client::find($data['client_id']);
$client_currency = $client->getSetting('currency_id');