mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
updated check on cost details
changed the check of cdr usage to be less or equal with usage in event cost
This commit is contained in:
committed by
Dan Christian Bogos
parent
1ef9ea768e
commit
a8b8c84dda
@@ -227,7 +227,7 @@ func (cdrS *CDRServer) rateCDR(cdr *CDRWithAPIOpts) ([]*CDR, error) {
|
||||
cdr.CGRID, utils.MetaSessionS, cdr.RunID, cdr.OriginID, cdr.OriginHost))
|
||||
}
|
||||
if cdr.CostDetails != nil {
|
||||
if cdr.Usage == cdr.CostDetails.GetUsage() { // Costs were previously calculated, make sure they cover the full usage
|
||||
if cdr.Usage <= cdr.CostDetails.GetUsage() { // Costs were previously calculated, make sure they cover the full usage
|
||||
cdr.Cost = cdr.CostDetails.GetCost()
|
||||
cdr.CostDetails.Compute()
|
||||
return []*CDR{cdr.CDR}, nil
|
||||
|
||||
Reference in New Issue
Block a user