mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Small bug fixes.
This commit is contained in:
parent
8b901084fe
commit
e86547645c
@ -13,7 +13,7 @@ use Illuminate\Support\MessageBag;
|
||||
/**
|
||||
* Class Account
|
||||
*
|
||||
* @package FireflyIII\Database
|
||||
* @package FireflyIII\Database
|
||||
* @implements FireflyIII\Database\Account\AccountInterface
|
||||
*/
|
||||
class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
||||
@ -260,7 +260,9 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
||||
$journal->delete();
|
||||
}
|
||||
// also delete transactions.
|
||||
\Transaction::whereIn('id', $transactions)->delete();
|
||||
if (count($transactions) > 0) {
|
||||
\Transaction::whereIn('id', $transactions)->delete();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
@ -63,8 +63,7 @@ class Steam
|
||||
{
|
||||
$user = \Auth::user();
|
||||
if ($user) {
|
||||
\BudgetLimit::leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id')->where('budgets.user_id', $user->id)
|
||||
->where('budget_limits.amount', 0)->delete();
|
||||
\BudgetLimit::where('amount', 0)->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ class BudgetLimit extends Eloquent
|
||||
*/
|
||||
public function budget()
|
||||
{
|
||||
return $this->belongsTo('Budget', 'budget_id');
|
||||
return $this->belongsTo('Budget','budget_id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user