Improved implementation of liability accounts and the option to add or remove accounts from the net-worth calculations.

This commit is contained in:
James Cole
2018-08-26 18:40:38 +02:00
parent 7dc72a2894
commit 8c1d1d1db0
20 changed files with 399 additions and 74 deletions

View File

@@ -99,7 +99,13 @@ class CreateController extends Controller
];
// pre fill some data
$request->session()->flash('preFilled', ['currency_id' => $defaultCurrency->id]);
$hasOldInput = null !== $request->old('_token');
$request->session()->flash(
'preFilled', [
'currency_id' => $defaultCurrency->id,
'include_net_worth' => $hasOldInput ? (bool)$request->old('include_net_worth') : true,
]
);
// put previous url in session if not redirect from store (not "create another").
if (true !== session('accounts.create.fromStore')) {