mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-25 15:56:33 -06:00
This commit is contained in:
parent
dea6e2c83f
commit
328216534b
@ -49,6 +49,8 @@ use Illuminate\Support\Carbon;
|
||||
* @method static Builder|UserGroup whereId($value)
|
||||
* @method static Builder|UserGroup whereTitle($value)
|
||||
* @method static Builder|UserGroup whereUpdatedAt($value)
|
||||
* @property-read Collection<int, \FireflyIII\Models\Account> $accounts
|
||||
* @property-read int|null $accounts_count
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class UserGroup extends Model
|
||||
|
@ -178,7 +178,7 @@ trait ModifiesPiggyBanks
|
||||
return $piggyBank;
|
||||
}
|
||||
$max = $piggyBank->targetamount;
|
||||
if (1 === bccomp($amount, $max)) {
|
||||
if (1 === bccomp($amount, $max) && 0 !== bccomp($piggyBank->targetamount, '0')) {
|
||||
$amount = $max;
|
||||
}
|
||||
$difference = bcsub($amount, $repetition->currentamount);
|
||||
|
Loading…
Reference in New Issue
Block a user