diff --git a/EstateReportingAPI.BusinessLogic/Services/TransactionReportingService.cs b/EstateReportingAPI.BusinessLogic/Services/TransactionReportingService.cs index e9b7f66..7ec1bb3 100644 --- a/EstateReportingAPI.BusinessLogic/Services/TransactionReportingService.cs +++ b/EstateReportingAPI.BusinessLogic/Services/TransactionReportingService.cs @@ -106,13 +106,6 @@ public async Task> GetTodaysSales(TransactionQueries.TodaysS return Result.Success(response); } - private Int32 SafeDivide(Int32 number, - Int32 divisor) { - if (divisor == 0) return number; - - return number / divisor; - } - private Decimal SafeDivide(Decimal number, Int32 divisor) { if (divisor == 0) return number; @@ -1177,10 +1170,7 @@ private static List BuildMerchantDailyPerformanceMetrics(List x.SalesCount) .ThenBy(x => x.ProductName) .FirstOrDefault(); - - if (topProduct == null) - return null; - + return new MetricItem { Title = "Top Product Sales Count", Value = topProduct.SalesCount,