mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
fix for balance value post substract
This commit is contained in:
@@ -467,12 +467,12 @@ func (b *Balance) debitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala
|
||||
}
|
||||
inc.BalanceInfo.AccountID = ub.ID
|
||||
if cost != 0 {
|
||||
moneyBal.SubstractValue(cost)
|
||||
inc.BalanceInfo.Monetary = &MonetaryInfo{
|
||||
UUID: moneyBal.Uuid,
|
||||
ID: moneyBal.ID,
|
||||
Value: moneyBal.Value,
|
||||
}
|
||||
moneyBal.SubstractValue(cost)
|
||||
cd.MaxCostSoFar += cost
|
||||
}
|
||||
inc.paid = true
|
||||
|
||||
Reference in New Issue
Block a user