From a8b8c84dda955e62bb6a1391d667442c575bd446 Mon Sep 17 00:00:00 2001 From: gezimbll Date: Thu, 16 May 2024 11:15:19 -0400 Subject: [PATCH] updated check on cost details changed the check of cdr usage to be less or equal with usage in event cost --- engine/cdrs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/cdrs.go b/engine/cdrs.go index 1566aa068..896baf85a 100644 --- a/engine/cdrs.go +++ b/engine/cdrs.go @@ -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