mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -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);
|
$this->createAssetAccount($request, $repository);
|
||||||
|
|
||||||
// create savings account
|
// 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);
|
$this->createSavingsAccount($request, $repository);
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create credit card.
|
// 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);
|
$this->storeCreditCard($request, $repository);
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user