From b698b1963f5c00de0dce1a23b45cc92b0273f224 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Thu, 29 Oct 2026 18:19:07 +0000 Subject: [PATCH] remove some redundant code to clean up code base --- .../Services/TransactionReportingService.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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,