mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix for level 2
This commit is contained in:
@@ -26,6 +26,7 @@ namespace FireflyIII\Repositories\UserGroups\Currency;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
@@ -33,6 +34,8 @@ interface CurrencyRepositoryInterface
|
||||
{
|
||||
public function currencyInUse(TransactionCurrency $currency): bool;
|
||||
|
||||
public function getUserGroup(): UserGroup;
|
||||
|
||||
/**
|
||||
* Currency is in use where exactly.
|
||||
*/
|
||||
|
@@ -103,4 +103,12 @@ class ExchangeRateRepository implements ExchangeRateRepositoryInterface
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
#[\Override] public function getAll(): Collection
|
||||
{
|
||||
return $this->userGroup->currencyExchangeRates()->get();
|
||||
}
|
||||
}
|
||||
|
@@ -33,6 +33,8 @@ interface ExchangeRateRepositoryInterface
|
||||
{
|
||||
public function getRates(TransactionCurrency $from, TransactionCurrency $to): Collection;
|
||||
|
||||
public function getAll(): Collection;
|
||||
|
||||
public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate;
|
||||
|
||||
public function deleteRate(CurrencyExchangeRate $rate): void;
|
||||
|
Reference in New Issue
Block a user