mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-09 03:08:09 +00:00
Create deposits, transfers and withdrawals. Also tests!
This commit is contained in:
@@ -129,6 +129,9 @@ class EloquentAccountRepository implements AccountRepositoryInterface
|
||||
|
||||
public function createOrFindBeneficiary($name)
|
||||
{
|
||||
if (is_null($name) || strlen($name) == 0) {
|
||||
return null;
|
||||
}
|
||||
$type = \AccountType::where('description', 'Beneficiary account')->first();
|
||||
return $this->createOrFind($name, $type);
|
||||
}
|
||||
@@ -151,4 +154,12 @@ class EloquentAccountRepository implements AccountRepositoryInterface
|
||||
return \Auth::user()->accounts()->where('name', 'like', '%' . $name . '%')->first();
|
||||
}
|
||||
|
||||
public function getCashAccount()
|
||||
{
|
||||
$type = \AccountType::where('description','Cash account')->first();
|
||||
$cash = \Auth::user()->accounts()->where('account_type_id',$type->id)->first();
|
||||
return $cash;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user