mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-10 07:25:50 -06:00
Make sure ff does not create accounts when balance is said to be 0.
This commit is contained in:
parent
6eeb60db5c
commit
7852b8a785
@ -78,14 +78,16 @@ class NewUserController extends Controller
|
||||
$this->createAssetAccount($request, $repository);
|
||||
|
||||
// create savings account
|
||||
if (strlen($request->get('savings_balance')) > 0) {
|
||||
$savingBalance = strval($request->get('savings_balance')) === '' ? '0' : strval($request->get('savings_balance'));
|
||||
if (bccomp($savingBalance, '0') !== 0) {
|
||||
$this->createSavingsAccount($request, $repository);
|
||||
$count++;
|
||||
}
|
||||
|
||||
|
||||
// create credit card.
|
||||
if (strlen($request->get('credit_card_limit')) > 0) {
|
||||
$limit = strval($request->get('credit_card_limit')) === '' ? '0' : strval($request->get('credit_card_limit'));
|
||||
if (bccomp($limit, '0') !== 0) {
|
||||
$this->storeCreditCard($request, $repository);
|
||||
$count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user