RateS - Apply FixedFee also for the second increment in Rate

This commit is contained in:
DanB
2020-11-24 13:58:50 +01:00
parent 4fcc3245af
commit 0bbcdfa250

View File

@@ -226,7 +226,7 @@ func computeRateSIntervals(rts []*orderedRate, intervalStart, usage time.Duratio
if iRt.Increment == time.Duration(0) {
return nil, fmt.Errorf("zero increment to be charged within rate: <%s>", rt.UID())
}
if j == 0 && rt.IntervalRates[j].FixedFee != 0 { // Add FixedFee
if rt.IntervalRates[j].FixedFee != 0 { // Add FixedFee
rIcmts = append(rIcmts, &engine.RateSIncrement{
UsageStart: iRtUsageSIdx,
Rate: rt.Rate,