mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 04:21:20 +00:00
Fix bar, also multi currency #2977
This commit is contained in:
@@ -290,4 +290,16 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
|
||||
{
|
||||
$this->user->availableBudgets()->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getByCurrencyDate(Carbon $start, Carbon $end, TransactionCurrency $currency): ?AvailableBudget
|
||||
{
|
||||
return $this->user
|
||||
->availableBudgets()
|
||||
->where('transaction_currency_id', $currency->id)
|
||||
->where('start_date', $start->format('Y-m-d 00:00:00'))
|
||||
->where('end_date', $end->format('Y-m-d 00:00:00'))->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user