mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
round down decay amount and balance
This commit is contained in:
parent
15e3aeb7e6
commit
a32e0a9d43
@ -11,7 +11,7 @@ export class Decay {
|
||||
duration: number | null,
|
||||
) {
|
||||
this.balance = balance
|
||||
this.decay = decay
|
||||
this.decay = decay.toDecimalPlaces(2, Decimal.ROUND_FLOOR)
|
||||
this.start = start
|
||||
this.end = end
|
||||
this.duration = duration
|
||||
|
||||
@ -12,8 +12,8 @@ export class Transaction {
|
||||
this.user = user
|
||||
this.previous = transaction.previous
|
||||
this.typeId = transaction.typeId
|
||||
this.amount = transaction.amount
|
||||
this.balance = transaction.balance
|
||||
this.amount = transaction.amount.toDecimalPlaces(2, Decimal.ROUND_DOWN)
|
||||
this.balance = transaction.balance.balance.toDecimalPlaces(2, Decimal.ROUND_DOWN)
|
||||
this.balanceDate = transaction.balanceDate
|
||||
if (!transaction.decayStart) {
|
||||
this.decay = new Decay(transaction.balance, new Decimal(0), null, null, null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user