Account shoe button add income, expense and transfer set default account

This commit is contained in:
Cüneyt Şentürk
2021-08-07 12:45:43 +03:00
parent 77d6618368
commit 98566cfa17
4 changed files with 36 additions and 11 deletions

View File

@ -222,6 +222,27 @@ class Accounts extends Controller
return response()->json($response);
}
public function createRevenue(Account $account)
{
$data['account_id'] = $account->id;
return redirect()->route('revenues.create')->withInput($data);
}
public function createPayment(Account $account)
{
$data['account_id'] = $account->id;
return redirect()->route('payments.create')->withInput($data);
}
public function createTransfer(Account $account)
{
$data['from_account_id'] = $account->id;
return redirect()->route('transfers.create')->withInput($data);
}
public function currency()
{
$account_id = (int) request('account_id');