invoice: Fix issue with calling invoiceConfig#isUsageZeroAmountDisabled
The RawUsageOptimizer did not specify the tenant and so only the global system property was used.
@@ -107,7 +107,7 @@ public class RawUsageOptimizer {
// because the optimization would prevent pulling enough (old) usage records.
//
final Map<BillingPeriod, LocalDate> perBillingPeriodMostRecentConsumableInArrearItemEndDate;
- if (config.isUsageZeroAmountDisabled()) {
+ if (config.isUsageZeroAmountDisabled(internalCallContext)) {
perBillingPeriodMostRecentConsumableInArrearItemEndDate = getBillingPeriodMinDate2(knownUsageBillingPeriod, targetDate);
} else {
perBillingPeriodMostRecentConsumableInArrearItemEndDate = getBillingPeriodMinDate1(knownUsageBillingPeriod, existingUsageItems, knownUsage);
