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