mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 02:40:43 -06:00
Code to fix #1234
This commit is contained in:
parent
fb5323c283
commit
bae79063e1
@ -317,8 +317,8 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
$amount = '0';
|
||||
$availableBudget = $this->user->availableBudgets()
|
||||
->where('transaction_currency_id', $currency->id)
|
||||
->where('start_date', $start->format('Y-m-d'))
|
||||
->where('end_date', $end->format('Y-m-d'))->first();
|
||||
->where('start_date', $start->format('Y-m-d 00:00:00'))
|
||||
->where('end_date', $end->format('Y-m-d 00:00:00'))->first();
|
||||
if (null !== $availableBudget) {
|
||||
$amount = strval($availableBudget->amount);
|
||||
}
|
||||
@ -492,8 +492,8 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
{
|
||||
$availableBudget = $this->user->availableBudgets()
|
||||
->where('transaction_currency_id', $currency->id)
|
||||
->where('start_date', $start->format('Y-m-d'))
|
||||
->where('end_date', $end->format('Y-m-d'))->first();
|
||||
->where('start_date', $start->format('Y-m-d 00:00:00'))
|
||||
->where('end_date', $end->format('Y-m-d 00:00:00'))->first();
|
||||
if (null === $availableBudget) {
|
||||
$availableBudget = new AvailableBudget;
|
||||
$availableBudget->user()->associate($this->user);
|
||||
|
Loading…
Reference in New Issue
Block a user