Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Admin panel - fix profit on order details

KrzysztofPajak3a502d4fc5d3
diff --git a/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs b/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs
index 6e612f2b4..326625250 100644
--- a/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs
+++ b/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs
@@ -264,9 +264,9 @@ namespace Grand.Business.System.Services.Reports
var query = builderquery
.GroupBy(x => 1).Select(g => new OrderAverageReportLine {
CountOrders = g.Count(),
- SumShippingExclTax = g.Sum(o => o.OrderShippingExclTax * o.CurrencyRate),
- SumTax = g.Sum(o => o.OrderTax * o.CurrencyRate),
- SumOrders = g.Sum(o => o.OrderTotal * o.CurrencyRate)
+ SumShippingExclTax = g.Sum(o => o.OrderShippingExclTax / o.CurrencyRate),
+ SumTax = g.Sum(o => o.OrderTax / o.CurrencyRate),
+ SumOrders = g.Sum(o => o.OrderTotal / o.CurrencyRate)
}).ToList();