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 - Order list - change order total

KrzysztofPajakf47000c76084
diff --git a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
index fbe687f88..406a0414b 100644
--- a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs
@@ -332,17 +332,8 @@ namespace Grand.Web.Admin.Services
var items = new List<OrderModel>();
foreach (var x in orders)
{
- var currency = await _currencyService.GetCurrencyByCode(x.CustomerCurrencyCode);
var store = await _storeService.GetStoreById(x.StoreId);
- var orderTotal = _priceFormatter.FormatPrice(x.OrderTotal, currency);
- if (x.CustomerCurrencyCode != x.PrimaryCurrencyCode)
- {
- var primaryCurrency = await _currencyService.GetCurrencyByCode(x.PrimaryCurrencyCode);
- if (primaryCurrency == null)
- primaryCurrency = await _currencyService.GetPrimaryStoreCurrency();
- orderTotal = $"{_priceFormatter.FormatPrice(x.OrderTotal / x.CurrencyRate, primaryCurrency)} ({orderTotal})";
- }
-
+ var orderTotal = await _priceFormatter.FormatPrice(x.OrderTotal, x.CustomerCurrencyCode, false, _workContext.WorkingLanguage);
items.Add(new OrderModel
{
Id = x.Id,