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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Change decimal type to double type
KrzysztofPajakbcc304fb9186
diff --git a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeCombinationDto.cs b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeCombinationDto.csindex f650a7e00..720c2d390 100644--- a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeCombinationDto.cs+++ b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeCombinationDto.cs@@ -10,7 +10,7 @@ namespace Grand.Api.DTOs.Catalogpublic string Sku { get; set; }public string CollectionPartNumber { get; set; }public string Gtin { get; set; }- public decimal? OverriddenPrice { get; set; }+ public double? OverriddenPrice { get; set; }public int NotifyAdminForQuantityBelow { get; set; }public string PictureId { get; set; }}diff --git a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeDto.cs b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeDto.csindex 68fe5e8d8..ca9c7ab2d 100644--- a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeDto.cs+++ b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeDto.cs@@ -17,9 +17,9 @@ namespace Grand.Api.DTOs.Catalogpublic partial class PredefinedProductAttributeValueDto : BaseApiEntityModel{public string Name { get; set; }- public decimal PriceAdjustment { get; set; }- public decimal WeightAdjustment { get; set; }- public decimal Cost { get; set; }+ public double PriceAdjustment { get; set; }+ public double WeightAdjustment { get; set; }+ public double Cost { get; set; }public bool IsPreSelected { get; set; }public int DisplayOrder { get; set; }}diff --git a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeMappingDto.cs b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeMappingDto.csindex 3f6d38579..80131c1d9 100644--- a/src/API/Grand.Api/DTOs/Catalog/ProductAttributeMappingDto.cs+++ b/src/API/Grand.Api/DTOs/Catalog/ProductAttributeMappingDto.cs@@ -32,9 +32,9 @@ namespace Grand.Api.DTOs.Catalogpublic string Name { get; set; }public string ColorSquaresRgb { get; set; }public string ImageSquaresPictureId { get; set; }- public decimal PriceAdjustment { get; set; }- public decimal WeightAdjustment { get; set; }- public decimal Cost { get; set; }+ public double PriceAdjustment { get; set; }+ public double WeightAdjustment { get; set; }+ public double Cost { get; set; }public int Quantity { get; set; }public bool IsPreSelected { get; set; }public int DisplayOrder { get; set; }diff --git a/src/API/Grand.Api/DTOs/Catalog/ProductDto.cs b/src/API/Grand.Api/DTOs/Catalog/ProductDto.csindex 790b6aa70..3a10eb4ee 100644--- a/src/API/Grand.Api/DTOs/Catalog/ProductDto.cs+++ b/src/API/Grand.Api/DTOs/Catalog/ProductDto.cs@@ -46,7 +46,7 @@ namespace Grand.Api.DTOs.Catalogpublic string Gtin { get; set; }public bool IsGiftVoucher { get; set; }public GiftVoucherType GiftVoucherTypeId { get; set; }- public decimal? OverGiftAmount { get; set; }+ public double? OverGiftAmount { get; set; }public bool RequireOtherProducts { get; set; }public string RequiredProductIds { get; set; }public bool AutoAddRequiredProducts { get; set; }@@ -70,7 +70,7 @@ namespace Grand.Api.DTOs.Catalogpublic bool IsShipEnabled { get; set; }public bool IsFreeShipping { get; set; }public bool ShipSeparately { get; set; }- public decimal AdditionalShippingCharge { get; set; }+ public double AdditionalShippingCharge { get; set; }public string DeliveryDateId { get; set; }public bool IsTaxExempt { get; set; }public string TaxCategoryId { get; set; }@@ -97,29 +97,29 @@ namespace Grand.Api.DTOs.Catalogpublic bool AvailableForPreOrder { get; set; }public DateTime? PreOrderDateTimeUtc { get; set; }public bool CallForPrice { get; set; }- public decimal Price { get; set; }- public decimal OldPrice { get; set; }- public decimal CatalogPrice { get; set; }- public decimal ProductCost { get; set; }+ public double Price { get; set; }+ public double OldPrice { get; set; }+ public double CatalogPrice { get; set; }+ public double ProductCost { get; set; }public bool EnteredPrice { get; set; }- public decimal MinEnteredPrice { get; set; }- public decimal MaxEnteredPrice { get; set; }+ public double MinEnteredPrice { get; set; }+ public double MaxEnteredPrice { get; set; }public bool BasepriceEnabled { get; set; }- public decimal BasepriceAmount { get; set; }+ public double BasepriceAmount { get; set; }public string BasepriceUnitId { get; set; }- public decimal BasepriceBaseAmount { get; set; }+ public double BasepriceBaseAmount { get; set; }public string BasepriceBaseUnitId { get; set; }public string UnitId { get; set; }public bool MarkAsNew { get; set; }public DateTime? MarkAsNewStartDateTimeUtc { get; set; }public DateTime? MarkAsNewEndDateTimeUtc { get; set; }- public decimal Weight { get; set; }- public decimal Length { get; set; }- public decimal Width { get; set; }- public decimal Height { get; set; }+ public double Weight { get; set; }+ public double Length { get; set; }+ public double Width { get; set; }+ public double Height { get; set; }public DateTime? AvailableStartDateTimeUtc { get; set; }public DateTime? AvailableEndDateTimeUtc { get; set; }- public decimal StartPrice { get; set; }+ public double StartPrice { get; set; }public bool AuctionEnded { get; set; }public int DisplayOrder { get; set; }public int DisplayOrderCategory { get; set; }diff --git a/src/API/Grand.Api/DTOs/Catalog/ProductTierPriceDto.cs b/src/API/Grand.Api/DTOs/Catalog/ProductTierPriceDto.csindex 3998d144d..245c0bd6c 100644--- a/src/API/Grand.Api/DTOs/Catalog/ProductTierPriceDto.cs+++ b/src/API/Grand.Api/DTOs/Catalog/ProductTierPriceDto.cs@@ -8,7 +8,7 @@ namespace Grand.Api.DTOs.Catalogpublic string StoreId { get; set; }public string CustomerGroupId { get; set; }public int Quantity { get; set; }- public decimal Price { get; set; }+ public double Price { get; set; }public DateTime? StartDateTimeUtc { get; set; }public DateTime? EndDateTimeUtc { get; set; }}diff --git a/src/API/Grand.Api/DTOs/Common/CurrencyDto.cs b/src/API/Grand.Api/DTOs/Common/CurrencyDto.csindex 48c0099f5..dc10b8a96 100644--- a/src/API/Grand.Api/DTOs/Common/CurrencyDto.cs+++ b/src/API/Grand.Api/DTOs/Common/CurrencyDto.cs@@ -7,7 +7,7 @@ namespace Grand.Api.DTOs.Common{public string Name { get; set; }public string CurrencyCode { get; set; }- public decimal Rate { get; set; }+ public double Rate { get; set; }public string DisplayLocale { get; set; }public string CustomFormatting { get; set; }public bool Published { get; set; }diff --git a/src/API/Grand.Api/DTOs/Shipping/PickupPointDto.cs b/src/API/Grand.Api/DTOs/Shipping/PickupPointDto.csindex ea03f70df..37c994529 100644--- a/src/API/Grand.Api/DTOs/Shipping/PickupPointDto.cs+++ b/src/API/Grand.Api/DTOs/Shipping/PickupPointDto.cs@@ -9,7 +9,7 @@ namespace Grand.Api.DTOs.Shippingpublic string AdminComment { get; set; }public string WarehouseId { get; set; }public string StoreId { get; set; }- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }public int DisplayOrder { get; set; }}}diff --git a/src/API/Grand.Api/Infrastructure/DependencyEdmModel.cs b/src/API/Grand.Api/Infrastructure/DependencyEdmModel.csindex 4c0bf7b3c..b4527e138 100644--- a/src/API/Grand.Api/Infrastructure/DependencyEdmModel.cs+++ b/src/API/Grand.Api/Infrastructure/DependencyEdmModel.cs@@ -217,7 +217,7 @@ namespace Grand.Api.InfrastructureActionConfiguration createTierPrice = product.Action("CreateProductTierPrice");createTierPrice.Parameter<int>(nameof(ProductTierPriceDto.Quantity));- createTierPrice.Parameter<decimal>(nameof(ProductTierPriceDto.Price));+ createTierPrice.Parameter<double>(nameof(ProductTierPriceDto.Price));createTierPrice.Parameter<string>(nameof(ProductTierPriceDto.StoreId));createTierPrice.Parameter<string>(nameof(ProductTierPriceDto.CustomerGroupId));createTierPrice.Parameter<DateTime?>(nameof(ProductTierPriceDto.StartDateTimeUtc));@@ -227,7 +227,7 @@ namespace Grand.Api.InfrastructureActionConfiguration updateTierPrice = product.Action("UpdateProductTierPrice");updateTierPrice.Parameter<string>(nameof(ProductTierPriceDto.Id)).Required();updateTierPrice.Parameter<int>(nameof(ProductTierPriceDto.Quantity));- updateTierPrice.Parameter<decimal>(nameof(ProductTierPriceDto.Price));+ updateTierPrice.Parameter<double>(nameof(ProductTierPriceDto.Price));updateTierPrice.Parameter<string>(nameof(ProductTierPriceDto.StoreId));updateTierPrice.Parameter<string>(nameof(ProductTierPriceDto.CustomerGroupId));updateTierPrice.Parameter<DateTime?>(nameof(ProductTierPriceDto.StartDateTimeUtc));diff --git a/src/Business/Grand.Business.Catalog/Extensions/RoundingHelper.cs b/src/Business/Grand.Business.Catalog/Extensions/RoundingHelper.csindex 654a14d42..8cd87062b 100644--- a/src/Business/Grand.Business.Catalog/Extensions/RoundingHelper.cs+++ b/src/Business/Grand.Business.Catalog/Extensions/RoundingHelper.cs@@ -12,7 +12,7 @@ namespace Grand.Business.Catalog.Extensions/// <param name="value">Value to round</param>/// <param name="currency">Currency</param>/// <returns>Rounded value</returns>- public static decimal RoundPrice(decimal value, Currency currency)+ public static double RoundPrice(double value, Currency currency){if (currency != null)return value.Round(currency.NumberDecimal, currency.RoundingTypeId, currency.MidpointRoundId);@@ -26,11 +26,11 @@ namespace Grand.Business.Catalog.Extensions/// <param name="value">Value to round</param>/// <param name="roundingType">The rounding type</param>/// <returns>Rounded value</returns>- public static decimal Round(this decimal value, int decimals, RoundingType roundingType, MidpointRounding midpointRounding)+ public static double Round(this double value, int doubles, RoundingType roundingType, MidpointRounding midpointRounding){//default round (Rounding001)- var rez = Math.Round(value, decimals, midpointRounding);+ var rez = Math.Round(value, doubles, midpointRounding);var fractionPart = (rez - Math.Truncate(rez)) * 10;//cash rounding not neededdiff --git a/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountAmountProvider.cs b/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountAmountProvider.csindex f3a129363..290b0bf2f 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountAmountProvider.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountAmountProvider.cs@@ -8,6 +8,6 @@ namespace Grand.Business.Catalog.Interfaces.Discounts{public partial interface IDiscountAmountProvider : IProvider{- Task<decimal> DiscountAmount(Discount discount, Customer customer, Product product, decimal amount);+ Task<double> DiscountAmount(Discount discount, Customer customer, Product product, double amount);}}diff --git a/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountService.csindex dfab3c588..2d339aa8e 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Discounts/IDiscountService.cs@@ -209,7 +209,7 @@ namespace Grand.Business.Catalog.Interfaces.Discounts/// <param name="customer">Customer</param>/// <param name="product">Product</param>/// <returns></returns>- Task<decimal> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product, decimal amount);+ Task<double> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product, double amount);/// <summary>/// Gets preferred discount@@ -220,8 +220,8 @@ namespace Grand.Business.Catalog.Interfaces.Discounts/// <param name="currency"></param>/// <param name="amount"></param>/// <returns></returns>- Task<(List<ApplyDiscount> appliedDiscount, decimal discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,- Customer customer, Currency currency, Product product, decimal amount);+ Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,+ Customer customer, Currency currency, Product product, double amount);/// <summary>/// Get preferred discount@@ -231,8 +231,8 @@ namespace Grand.Business.Catalog.Interfaces.Discounts/// <param name="customer"></param>/// <param name="currency"></param>/// <returns>appliedDiscount and discountAmount</returns>- Task<(List<ApplyDiscount> appliedDiscount, decimal discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,- Customer customer, Currency currency, decimal amount);+ Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,+ Customer customer, Currency currency, double amount);/// <summary>/// GetDiscountAmountProvider@@ -242,7 +242,7 @@ namespace Grand.Business.Catalog.Interfaces.Discounts/// <param name="product"></param>/// <param name="amount"></param>/// <returns></returns>- Task<decimal> GetDiscountAmountProvider(Discount discount, Customer customer, Product product, decimal amount);+ Task<double> GetDiscountAmountProvider(Discount discount, Customer customer, Product product, double amount);/// <summary>/// Load discount amount provider by systemNamediff --git a/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPriceFormatter.cs b/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPriceFormatter.csindex 873533331..47626913a 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPriceFormatter.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPriceFormatter.cs@@ -12,7 +12,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- string FormatPrice(decimal price);+ string FormatPrice(double price);/// <summary>/// Formats price@@ -20,7 +20,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="price">Price</param>/// <param name="targetCurrency">Target currency</param>/// <returns>Price</returns>- string FormatPrice(decimal price, Currency targetCurrency);+ string FormatPrice(double price, Currency targetCurrency);/// <summary>/// Formats price@@ -28,7 +28,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="price">Price</param>/// <param name="showTax">A value that indicates if it should shows tax suffix</param>/// <returns>Price</returns>- string FormatPrice(decimal price, bool showTax);+ string FormatPrice(double price, bool showTax);/// <summary>/// Formats price@@ -38,7 +38,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="showTax">A value that indicates if it should shows a tax suffix</param>/// <param name="language">Language</param>/// <returns>Price</returns>- Task<string> FormatPrice(decimal price, string currencyCode, bool showTax, Language language);+ Task<string> FormatPrice(double price, string currencyCode, bool showTax, Language language);/// <summary>/// Formats the price@@ -48,7 +48,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- Task<string> FormatPrice(decimal price, string currencyCode, Language language, bool priceIncludesTax);+ Task<string> FormatPrice(double price, string currencyCode, Language language, bool priceIncludesTax);/// <summary>/// Formats the price@@ -58,7 +58,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- string FormatPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax);+ string FormatPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax);/// <summary>/// Formats the price@@ -69,7 +69,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <param name="showTax">A value indicating whether to show tax suffix</param>/// <returns>Price</returns>- string FormatPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);+ string FormatPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);/// <summary>/// Formats the price of rental product (with rental period)@@ -84,7 +84,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- string FormatShippingPrice(decimal price);+ string FormatShippingPrice(double price);/// <summary>/// Formats the shipping price@@ -94,7 +94,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- string FormatShippingPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax);+ string FormatShippingPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax);/// <summary>/// Formats the shipping price@@ -105,7 +105,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <param name="showTax">A value indicating whether to show tax suffix</param>/// <returns>Price</returns>- string FormatShippingPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);+ string FormatShippingPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);/// <summary>/// Formats the shipping price@@ -115,14 +115,14 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- Task<string> FormatShippingPrice(decimal price, string currencyCode, Language language, bool priceIncludesTax);+ Task<string> FormatShippingPrice(double price, string currencyCode, Language language, bool priceIncludesTax);/// <summary>/// Formats the payment method additional fee/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- string FormatPaymentMethodAdditionalFee(decimal price);+ string FormatPaymentMethodAdditionalFee(double price);/// <summary>/// Formats the payment method additional fee@@ -132,7 +132,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- string FormatPaymentMethodAdditionalFee(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax);+ string FormatPaymentMethodAdditionalFee(double price, Currency targetCurrency, Language language, bool priceIncludesTax);/// <summary>/// Formats the payment method additional fee@@ -143,7 +143,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <param name="showTax">A value indicating whether to show tax suffix</param>/// <returns>Price</returns>- string FormatPaymentMethodAdditionalFee(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);+ string FormatPaymentMethodAdditionalFee(double price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax);/// <summary>/// Formats the payment method additional fee@@ -153,13 +153,13 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- Task<string> FormatPaymentMethodAdditionalFee(decimal price, string currencyCode, Language language, bool priceIncludesTax);+ Task<string> FormatPaymentMethodAdditionalFee(double price, string currencyCode, Language language, bool priceIncludesTax);/// <summary>/// Formats a tax rate/// </summary>/// <param name="taxRate">Tax rate</param>/// <returns>Formatted tax rate</returns>- string FormatTaxRate(decimal taxRate);+ string FormatTaxRate(double taxRate);}}diff --git a/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPricingService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPricingService.csindex 4defd23c3..d004f8e3e 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPricingService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Prices/IPricingService.cs@@ -25,11 +25,11 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>/// <param name="quantity">Shopping cart item quantity</param>/// <returns>Final price</returns>- Task<(decimal finalPrice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(+ Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,Customer customer,Currency currency,- decimal additionalCharge = decimal.Zero,+ double additionalCharge = 0,bool includeDiscounts = true,int quantity = 1);@@ -45,10 +45,10 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="rentalStartDate">Rental period start date (for rental products)</param>/// <param name="rentalEndDate">Rental period end date (for rental products)</param>/// <returns>Final price</returns>- Task<(decimal finalPrice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,+ Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,Customer customer,Currency currency,- decimal additionalCharge,+ double additionalCharge,bool includeDiscounts,int quantity,DateTime? rentalStartDate,@@ -63,7 +63,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="product">Product</param>/// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>/// <returns>Shopping cart unit price (one item)</returns>- Task<(decimal unitprice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(ShoppingCartItem shoppingCartItem,+ Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(ShoppingCartItem shoppingCartItem,Product product, bool includeDiscounts = true);@@ -81,13 +81,13 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="rentalEndDate">Rental end date (null for not rental products)</param>/// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>/// <returns>Shopping cart unit price (one item)</returns>- Task<(decimal unitprice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(Product product,+ Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(Product product,Customer customer,Currency currency,ShoppingCartType shoppingCartType,int quantity,IList<CustomAttribute> attributes,- decimal? customerEnteredPrice,+ double? customerEnteredPrice,DateTime? rentalStartDate, DateTime? rentalEndDate,bool includeDiscounts);@@ -98,7 +98,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="product">Product</param>/// <param name="includeDiscounts">A value indicating whether include discounts or not for price computation</param>/// <returns>Shopping cart item sub total</returns>- Task<(decimal subTotal, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(ShoppingCartItem shoppingCartItem, Product product,+ Task<(double subTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(ShoppingCartItem shoppingCartItem, Product product,bool includeDiscounts = true);/// <summary>@@ -107,7 +107,7 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// <param name="product">Product</param>/// <param name="attributes">Shopping cart item attributes</param>/// <returns>Product cost (one item)</returns>- Task<decimal> GetProductCost(Product product, IList<CustomAttribute> attributes);+ Task<double> GetProductCost(Product product, IList<CustomAttribute> attributes);/// <summary>@@ -115,6 +115,6 @@ namespace Grand.Business.Catalog.Interfaces.Prices/// </summary>/// <param name="value">Product attribute value</param>/// <returns>Price adjustment</returns>- Task<decimal> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value);+ Task<double> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value);}}diff --git a/src/Business/Grand.Business.Catalog/Interfaces/Products/IAuctionService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Products/IAuctionService.csindex 2d6ad5f09..5bbe84920 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Products/IAuctionService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Products/IAuctionService.cs@@ -66,7 +66,7 @@ namespace Grand.Business.Catalog.Interfaces.Products/// <param name="product"></param>/// <param name="bid"></param>/// <param name="bidder"></param>- Task UpdateHighestBid(Product product, decimal bid, string bidder);+ Task UpdateHighestBid(Product product, double bid, string bidder);/// <summary>/// Updates auction ended@@ -90,7 +90,7 @@ namespace Grand.Business.Catalog.Interfaces.Products/// <param name="warehouseId"></param>/// <param name="language"></param>/// <param name="amount"></param>- Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, decimal amount);+ Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, double amount);/// <summary>/// Cancel bid for productdiff --git a/src/Business/Grand.Business.Catalog/Interfaces/Products/IProductService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Products/IProductService.csindex 48e047408..64e72aeb9 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Products/IProductService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Products/IProductService.cs@@ -151,8 +151,8 @@ namespace Grand.Business.Catalog.Interfaces.Productsbool visibleIndividuallyOnly = false,bool markedAsNewOnly = false,bool? featuredProducts = null,- decimal? priceMin = null,- decimal? priceMax = null,+ double? priceMin = null,+ double? priceMax = null,string productTag = "",string keywords = null,bool searchDescriptions = false,diff --git a/src/Business/Grand.Business.Catalog/Interfaces/Tax/ITaxService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Tax/ITaxService.csindex 98ce9cf77..1ed240527 100644--- a/src/Business/Grand.Business.Catalog/Interfaces/Tax/ITaxService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Tax/ITaxService.cs@@ -42,7 +42,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="price">Price</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price);+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price);/// <summary>/// Gets price@@ -51,7 +51,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="price">Price</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price, Customer customer);+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, Customer customer);/// <summary>/// Gets price@@ -61,7 +61,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="includingTax">A value indicating whether calculated price should include tax</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price, bool includingTax, Customer customer);+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price, bool includingTax, Customer customer);/// <summary>/// Gets price@@ -73,7 +73,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="customer">Customer</param>/// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>/// <returns>Price</returns>- Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, string taxCategoryId, decimal price, bool includingTax, Customer customer, bool priceIncludesTax);+ Task<(double productprice, double taxRate)> GetProductPrice(Product product, string taxCategoryId, double price, bool includingTax, Customer customer, bool priceIncludesTax);/// <summary>@@ -91,11 +91,11 @@ namespace Grand.Business.Catalog.Interfaces.TaxTask<TaxProductPrice> GetTaxProductPrice(Product product,Customer customer,- decimal unitPrice,- decimal unitPricewithoutDisc,+ double unitPrice,+ double unitPricewithoutDisc,int quantity,- decimal subTotal,- decimal discountAmount,+ double subTotal,+ double discountAmount,bool priceIncludesTax);@@ -105,7 +105,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="price">Price</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal shippingPrice, decimal taxRate)> GetShippingPrice(decimal price, Customer customer);+ Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, Customer customer);/// <summary>/// Gets shipping price@@ -114,7 +114,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="includingTax">A value indicating whether calculated price should include tax</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal shippingPrice, decimal taxRate)> GetShippingPrice(decimal price, bool includingTax, Customer customer);+ Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, bool includingTax, Customer customer);/// <summary>/// Gets payment method additional handling fee@@ -122,7 +122,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="price">Price</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal paymentPrice, decimal taxRate)> GetPaymentMethodAdditionalFee(decimal price, Customer customer);+ Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, Customer customer);/// <summary>/// Gets payment method additional handling fee@@ -131,7 +131,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="includingTax">A value indicating whether calculated price should include tax</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal paymentPrice, decimal taxRate)> GetPaymentMethodAdditionalFee(decimal price, bool includingTax, Customer customer);+ Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, bool includingTax, Customer customer);/// <summary>/// Gets checkout attribute value price@@ -139,7 +139,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="ca">Checkout attribute</param>/// <param name="cav">Checkout attribute value</param>/// <returns>Price</returns>- Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav);+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav);/// <summary>/// Gets checkout attribute value price@@ -148,7 +148,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="cav">Checkout attribute value</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, Customer customer);+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, Customer customer);/// <summary>/// Gets checkout attribute value price@@ -158,7 +158,7 @@ namespace Grand.Business.Catalog.Interfaces.Tax/// <param name="includingTax">A value indicating whether calculated price should include tax</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, bool includingTax, Customer customer);+ Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, bool includingTax, Customer customer);/// <summary>/// Gets a value indicating whether a product is tax exemptdiff --git a/src/Business/Grand.Business.Catalog/Queries/Handlers/GetPriceByCustomerProductQueryHandler.cs b/src/Business/Grand.Business.Catalog/Queries/Handlers/GetPriceByCustomerProductQueryHandler.csindex 17e6cca6a..3c69a7253 100644--- a/src/Business/Grand.Business.Catalog/Queries/Handlers/GetPriceByCustomerProductQueryHandler.cs+++ b/src/Business/Grand.Business.Catalog/Queries/Handlers/GetPriceByCustomerProductQueryHandler.cs@@ -10,7 +10,7 @@ using System.Threading.Tasks;namespace Grand.Business.Catalog.Queries.Handlers{- public class GetPriceByCustomerProductQueryHandler : IRequestHandler<GetPriceByCustomerProductQuery, decimal?>+ public class GetPriceByCustomerProductQueryHandler : IRequestHandler<GetPriceByCustomerProductQuery, double?>{private readonly ICacheBase _cacheBase;private readonly IRepository<CustomerProductPrice> _customerProductPriceRepository;@@ -21,7 +21,7 @@ namespace Grand.Business.Catalog.Queries.Handlers_customerProductPriceRepository = customerProductPriceRepository;}- public async Task<decimal?> Handle(GetPriceByCustomerProductQuery request, CancellationToken cancellationToken)+ public async Task<double?> Handle(GetPriceByCustomerProductQuery request, CancellationToken cancellationToken){var key = string.Format(CacheKey.CUSTOMER_PRODUCT_PRICE_KEY_ID, request.CustomerId, request.ProductId);var productprice = _cacheBase.Get(key, () =>@@ -36,7 +36,7 @@ namespace Grand.Business.Catalog.Queries.Handlers});if (!productprice.Item2)- return await Task.FromResult(default(decimal?));+ return await Task.FromResult(default(double?));elsereturn await Task.FromResult(productprice.pp.Price);}diff --git a/src/Business/Grand.Business.Catalog/Queries/Models/GetPriceByCustomerProductQuery.cs b/src/Business/Grand.Business.Catalog/Queries/Models/GetPriceByCustomerProductQuery.csindex 7bf50e290..d649b23be 100644--- a/src/Business/Grand.Business.Catalog/Queries/Models/GetPriceByCustomerProductQuery.cs+++ b/src/Business/Grand.Business.Catalog/Queries/Models/GetPriceByCustomerProductQuery.cs@@ -2,7 +2,7 @@namespace Grand.Business.Catalog.Queries.Models{- public class GetPriceByCustomerProductQuery : IRequest<decimal?>+ public class GetPriceByCustomerProductQuery : IRequest<double?>{public string CustomerId { get; set; }public string ProductId { get; set; }diff --git a/src/Business/Grand.Business.Catalog/Queries/Models/GetSearchProductsQuery.cs b/src/Business/Grand.Business.Catalog/Queries/Models/GetSearchProductsQuery.csindex 3a19e52a5..7745b354e 100644--- a/src/Business/Grand.Business.Catalog/Queries/Models/GetSearchProductsQuery.cs+++ b/src/Business/Grand.Business.Catalog/Queries/Models/GetSearchProductsQuery.cs@@ -23,8 +23,8 @@ namespace Grand.Business.Catalog.Queries.Handlerspublic bool VisibleIndividuallyOnly { get; set; } = false;public bool MarkedAsNewOnly { get; set; } = false;public bool? FeaturedProducts { get; set; } = null;- public decimal? PriceMin { get; set; } = null;- public decimal? PriceMax { get; set; } = null;+ public double? PriceMin { get; set; } = null;+ public double? PriceMax { get; set; } = null;public string ProductTag { get; set; } = "";public string Keywords { get; set; } = null;public bool SearchDescriptions { get; set; } = false;diff --git a/src/Business/Grand.Business.Catalog/Services/Discounts/DiscountService.cs b/src/Business/Grand.Business.Catalog/Services/Discounts/DiscountService.csindex 87168e1da..9563a1d59 100644--- a/src/Business/Grand.Business.Catalog/Services/Discounts/DiscountService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Discounts/DiscountService.cs@@ -688,17 +688,17 @@ namespace Grand.Business.Catalog.Services.Discounts/// <param name="currency">currency</param>/// <param name="customer">Customer</param>/// <param name="product">Product</param>- public async Task<decimal> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product, decimal amount)+ public async Task<double> GetDiscountAmount(Discount discount, Customer customer, Currency currency, Product product, double amount){if (discount == null)throw new ArgumentNullException(nameof(discount));//calculate discount amount- decimal result = decimal.Zero;+ double result = 0;if (!discount.CalculateByPlugin){if (discount.UsePercentage)- result = (decimal)((((float)amount) * ((float)discount.DiscountPercentage)) / 100f);+ result = (double)((((float)amount) * ((float)discount.DiscountPercentage)) / 100f);else{result = discount.DiscountAmount;@@ -715,8 +715,8 @@ namespace Grand.Business.Catalog.Services.Discountsresult > discount.MaximumDiscountAmount.Value)result = discount.MaximumDiscountAmount.Value;- if (result < decimal.Zero)- result = decimal.Zero;+ if (result < 0)+ result = 0;return result;}@@ -731,15 +731,15 @@ namespace Grand.Business.Catalog.Services.Discounts/// <param name="amount">Amount</param>/// <param name="discountAmount"></param>/// <returns>Preferred discount</returns>- public virtual async Task<(List<ApplyDiscount> appliedDiscount, decimal discountAmount)> GetPreferredDiscount(+ public virtual async Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts, Customer customer, Currency currency, Product product,- decimal amount)+ double amount){if (discounts == null)throw new ArgumentNullException(nameof(discounts));var appliedDiscount = new List<ApplyDiscount>();- var discountAmount = decimal.Zero;+ double discountAmount = 0;if (!discounts.Any())return (appliedDiscount, discountAmount);@@ -747,7 +747,7 @@ namespace Grand.Business.Catalog.Services.Discountsforeach (var applieddiscount in discounts){var discount = await GetDiscountById(applieddiscount.DiscountId);- decimal currentDiscountValue = await GetDiscountAmount(discount, customer, currency, product, amount);+ double currentDiscountValue = await GetDiscountAmount(discount, customer, currency, product, amount);if (currentDiscountValue > discountAmount){discountAmount = currentDiscountValue;@@ -759,7 +759,7 @@ namespace Grand.Business.Catalog.Services.Discountsvar cumulativeDiscounts = discounts.Where(x => x.IsCumulative).ToList();if (cumulativeDiscounts.Count > 1){- var cumulativeDiscountAmount = decimal.Zero;+ double cumulativeDiscountAmount = 0;foreach (var item in cumulativeDiscounts){var discount = await GetDiscountById(item.DiscountId);@@ -785,11 +785,11 @@ namespace Grand.Business.Catalog.Services.Discounts/// <param name="amount">Amount</param>/// <param name="discountAmount"></param>/// <returns>Preferred discount</returns>- public virtual async Task<(List<ApplyDiscount> appliedDiscount, decimal discountAmount)> GetPreferredDiscount(+ public virtual async Task<(List<ApplyDiscount> appliedDiscount, double discountAmount)> GetPreferredDiscount(IList<ApplyDiscount> discounts,Customer customer,Currency currency,- decimal amount)+ double amount){return await GetPreferredDiscount(discounts, customer, currency, null, amount);}@@ -800,7 +800,7 @@ namespace Grand.Business.Catalog.Services.Discounts/// <param name="discount"></param>/// <param name="amount"></param>/// <returns></returns>- public virtual async Task<decimal> GetDiscountAmountProvider(Discount discount, Customer customer, Product product, decimal amount)+ public virtual async Task<double> GetDiscountAmountProvider(Discount discount, Customer customer, Product product, double amount){var discountAmountProvider = LoadDiscountAmountProviderBySystemName(discount.DiscountPluginName);if (discountAmountProvider == null)diff --git a/src/Business/Grand.Business.Catalog/Services/Prices/PriceFormatter.cs b/src/Business/Grand.Business.Catalog/Services/Prices/PriceFormatter.csindex 2b757ef14..ed084fec4 100644--- a/src/Business/Grand.Business.Catalog/Services/Prices/PriceFormatter.cs+++ b/src/Business/Grand.Business.Catalog/Services/Prices/PriceFormatter.cs@@ -50,7 +50,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="amount">Amount</param>/// <param name="targetCurrency">Target currency</param>/// <returns>Currency string without exchange rate</returns>- protected virtual string GetCurrencyString(decimal amount, Currency targetCurrency)+ protected virtual string GetCurrencyString(double amount, Currency targetCurrency){if (targetCurrency == null)return amount.ToString("C");@@ -85,7 +85,7 @@ namespace Grand.Business.Catalog.Services.Prices/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- public virtual string FormatPrice(decimal price)+ public virtual string FormatPrice(double price){return FormatPrice(price, _workContext.WorkingCurrency);}@@ -96,7 +96,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="price">Price</param>/// <param name="targetCurrency">Target currency</param>/// <returns>Price</returns>- public virtual string FormatPrice(decimal price, Currency targetCurrency)+ public virtual string FormatPrice(double price, Currency targetCurrency){bool priceIncludesTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return FormatPrice(price, targetCurrency, _workContext.WorkingLanguage, priceIncludesTax);@@ -108,7 +108,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="price">Price</param>/// <param name="showTax">Indicates if it should show tax suffix</param>/// <returns>Price</returns>- public virtual string FormatPrice(decimal price, bool showTax)+ public virtual string FormatPrice(double price, bool showTax){bool priceIncludesTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return FormatPrice(price, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax, showTax);@@ -122,7 +122,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="showTax">A value indicating whether to show tax suffix</param>/// <param name="language">Language</param>/// <returns>Price</returns>- public virtual async Task<string> FormatPrice(decimal price, string currencyCode, bool showTax, Language language)+ public virtual async Task<string> FormatPrice(double price, string currencyCode, bool showTax, Language language){var currency = string.IsNullOrEmpty(currencyCode) ? await _currencyService.GetCurrencyByCode(currencyCode) : null;bool priceIncludesTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;@@ -137,7 +137,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- public virtual async Task<string> FormatPrice(decimal price, string currencyCode, Language language, bool priceIncludesTax)+ public virtual async Task<string> FormatPrice(double price, string currencyCode, Language language, bool priceIncludesTax){var currency = string.IsNullOrEmpty(currencyCode) ? await _currencyService.GetCurrencyByCode(currencyCode) : null;return FormatPrice(price, currency, language, priceIncludesTax);@@ -151,7 +151,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">A value indicating whether price includes tax</param>/// <returns>Price</returns>- public virtual string FormatPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax)+ public virtual string FormatPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax){return FormatPrice(price, targetCurrency, language, priceIncludesTax, _taxSettings.DisplayTaxSuffix);}@@ -165,7 +165,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <param name="showTax">Indicates if it should show tax suffix</param>/// <returns>Price</returns>- public string FormatPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax)+ public string FormatPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax){string currencyString = GetCurrencyString(price, targetCurrency);if (showTax)@@ -197,7 +197,7 @@ namespace Grand.Business.Catalog.Services.Prices/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- public virtual string FormatShippingPrice(decimal price)+ public virtual string FormatShippingPrice(double price){bool priceIncludesTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return FormatShippingPrice(price, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);@@ -211,7 +211,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <returns>Price</returns>- public virtual string FormatShippingPrice(decimal price, Currency targetCurrency, Language language, bool priceIncludesTax)+ public virtual string FormatShippingPrice(double price, Currency targetCurrency, Language language, bool priceIncludesTax){bool showTax = _taxSettings.ShippingIsTaxable && _taxSettings.DisplayTaxSuffix;return FormatShippingPrice(price, targetCurrency, language, priceIncludesTax, showTax);@@ -226,7 +226,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <param name="showTax">Indicates if it should show a tax suffix</param>/// <returns>Price</returns>- public virtual string FormatShippingPrice(decimal price,+ public virtual string FormatShippingPrice(double price,Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax){return FormatPrice(price, targetCurrency, language, priceIncludesTax, showTax);@@ -240,7 +240,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <returns>Price</returns>- public virtual async Task<string> FormatShippingPrice(decimal price, string currencyCode, Language language, bool priceIncludesTax)+ public virtual async Task<string> FormatShippingPrice(double price, string currencyCode, Language language, bool priceIncludesTax){var currency = string.IsNullOrEmpty(currencyCode) ? await _currencyService.GetCurrencyByCode(currencyCode) : null;return FormatShippingPrice(price, currency, language, priceIncludesTax);@@ -288,7 +288,7 @@ namespace Grand.Business.Catalog.Services.Prices/// </summary>/// <param name="price">Price</param>/// <returns>Price</returns>- public virtual string FormatPaymentMethodAdditionalFee(decimal price)+ public virtual string FormatPaymentMethodAdditionalFee(double price){bool priceIncludesTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return FormatPaymentMethodAdditionalFee(price, _workContext.WorkingCurrency,@@ -303,7 +303,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <returns>Price</returns>- public virtual string FormatPaymentMethodAdditionalFee(decimal price,+ public virtual string FormatPaymentMethodAdditionalFee(double price,Currency targetCurrency, Language language, bool priceIncludesTax){bool showTax = _taxSettings.PaymentMethodAdditionalFeeIsTaxable && _taxSettings.DisplayTaxSuffix;@@ -319,7 +319,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <param name="showTax">Indicates if it should show a tax suffix</param>/// <returns>Price</returns>- public virtual string FormatPaymentMethodAdditionalFee(decimal price,+ public virtual string FormatPaymentMethodAdditionalFee(double price,Currency targetCurrency, Language language, bool priceIncludesTax, bool showTax){return FormatPrice(price, targetCurrency, language, priceIncludesTax, showTax);@@ -333,7 +333,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="language">Language</param>/// <param name="priceIncludesTax">Indicates if price includes tax</param>/// <returns>Price</returns>- public virtual async Task<string> FormatPaymentMethodAdditionalFee(decimal price,+ public virtual async Task<string> FormatPaymentMethodAdditionalFee(double price,string currencyCode, Language language, bool priceIncludesTax){var currency = string.IsNullOrEmpty(currencyCode) ? await _currencyService.GetCurrencyByCode(currencyCode) : null;@@ -346,7 +346,7 @@ namespace Grand.Business.Catalog.Services.Prices/// </summary>/// <param name="taxRate">Tax rate</param>/// <returns>Formatted tax rate</returns>- public virtual string FormatTaxRate(decimal taxRate)+ public virtual string FormatTaxRate(double taxRate){return taxRate.ToString("G29");}diff --git a/src/Business/Grand.Business.Catalog/Services/Prices/PricingService.cs b/src/Business/Grand.Business.Catalog/Services/Prices/PricingService.csindex f44dd479c..1027fd173 100644--- a/src/Business/Grand.Business.Catalog/Services/Prices/PricingService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Prices/PricingService.cs@@ -82,8 +82,8 @@ namespace Grand.Business.Catalog.Services.Prices{AppliedDiscounts = new List<ApplyDiscount>();}- public decimal Price { get; set; }- public decimal AppliedDiscountAmount { get; set; }+ public double Price { get; set; }+ public double AppliedDiscountAmount { get; set; }public IList<ApplyDiscount> AppliedDiscounts { get; set; }public TierPrice PreferredTierPrice { get; set; }@@ -363,14 +363,14 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="currency">Currency</param>/// <param name="productPriceWithoutDiscount">Already calculated product price without discount</param>/// <returns>Discount amount</returns>- protected virtual async Task<(decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetDiscountAmount(Product product,- Customer customer, Currency currency, decimal productPriceWithoutDiscount)+ protected virtual async Task<(double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetDiscountAmount(Product product,+ Customer customer, Currency currency, double productPriceWithoutDiscount){if (product == null)throw new ArgumentNullException(nameof(product));List<ApplyDiscount> appliedDiscounts = null;- decimal appliedDiscountAmount = decimal.Zero;+ double appliedDiscountAmount = 0;//we don't apply discounts to products with price entered by a customerif (product.EnteredPrice)@@ -407,11 +407,11 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="includeDiscounts">A value indicating whether include discounts or not for final price computation</param>/// <param name="quantity">Shopping cart item quantity</param>/// <returns>Final price</returns>- public virtual async Task<(decimal finalPrice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(+ public virtual async Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,Customer customer,Currency currency,- decimal additionalCharge = decimal.Zero,+ double additionalCharge = 0,bool includeDiscounts = true,int quantity = 1){@@ -430,11 +430,11 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="rentalStartDate">Rental period start date (for rental products)</param>/// <param name="rentalEndDate">Rental period end date (for rental products)</param>/// <returns>Final price</returns>- public virtual async Task<(decimal finalPrice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(+ public virtual async Task<(double finalPrice, double discountAmount, List<ApplyDiscount> appliedDiscounts, TierPrice preferredTierPrice)> GetFinalPrice(Product product,Customer customer,Currency currency,- decimal additionalCharge,+ double additionalCharge,bool includeDiscounts,int quantity,DateTime? rentalStartDate,@@ -443,7 +443,7 @@ namespace Grand.Business.Catalog.Services.Pricesif (product == null)throw new ArgumentNullException(nameof(product));- var discountAmount = decimal.Zero;+ double discountAmount = 0;var appliedDiscounts = new List<ApplyDiscount>();async Task<ProductPrice> PrepareModel()@@ -451,7 +451,7 @@ namespace Grand.Business.Catalog.Services.Pricesvar result = new ProductPrice();//initial price- decimal price =+ double price =product.ProductPrices.FirstOrDefault(x => x.CurrencyCode == currency.CurrencyCode)?.Price ??await _currencyService.ConvertFromPrimaryStoreCurrency(product.Price, currency);@@ -478,14 +478,14 @@ namespace Grand.Business.Catalog.Services.Pricesif (product.ProductTypeId == ProductType.Reservation)if (rentalStartDate.HasValue && rentalEndDate.HasValue){- decimal d = 0;+ double d = 0;if (product.IncBothDate){- _ = decimal.TryParse(((rentalEndDate - rentalStartDate).Value.TotalDays + 1).ToString(), out d);+ _ = double.TryParse(((rentalEndDate - rentalStartDate).Value.TotalDays + 1).ToString(), out d);}else{- _ = decimal.TryParse((rentalEndDate - rentalStartDate).Value.TotalDays.ToString(), out d);+ _ = double.TryParse((rentalEndDate - rentalStartDate).Value.TotalDays.ToString(), out d);}price *= d;}@@ -494,7 +494,7 @@ namespace Grand.Business.Catalog.Services.Prices{//discountvar discountamount = await GetDiscountAmount(product, customer, currency, price);- decimal tmpDiscountAmount = discountamount.discountAmount;+ double tmpDiscountAmount = discountamount.discountAmount;List<ApplyDiscount> tmpAppliedDiscounts = discountamount.appliedDiscounts;price -= tmpDiscountAmount;@@ -505,8 +505,8 @@ namespace Grand.Business.Catalog.Services.Prices}}- if (price < decimal.Zero)- price = decimal.Zero;+ if (price < 0)+ price = 0;//roundingif (_shoppingCartSettings.RoundPrices)@@ -541,7 +541,7 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="product">Product</param>/// <param name="includeDiscounts">Include discounts or not for price</param>/// <returns>Shopping cart unit price (one item)</returns>- public virtual async Task<(decimal unitprice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(ShoppingCartItem shoppingCartItem,+ public virtual async Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(ShoppingCartItem shoppingCartItem,Product product, bool includeDiscounts = true){if (shoppingCartItem == null)@@ -572,14 +572,14 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="rentalEndDate">Rental end date</param>/// <param name="includeDiscounts">Include discounts or not for price</param>/// <returns>Shopping cart unit price</returns>- public virtual async Task<(decimal unitprice, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(+ public virtual async Task<(double unitprice, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetUnitPrice(Product product,Customer customer,Currency currency,ShoppingCartType shoppingCartType,int quantity,IList<CustomAttribute> attributes,- decimal? customerEnteredPrice,+ double? customerEnteredPrice,DateTime? rentalStartDate,DateTime? rentalEndDate,bool includeDiscounts)@@ -590,10 +590,10 @@ namespace Grand.Business.Catalog.Services.Pricesif (customer == null)throw new ArgumentNullException(nameof(customer));- var discountAmount = decimal.Zero;+ double discountAmount = 0;var appliedDiscounts = new List<ApplyDiscount>();- decimal? finalPrice = null;+ double? finalPrice = null;if (customerEnteredPrice.HasValue)finalPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(customerEnteredPrice.Value, currency);@@ -620,7 +620,7 @@ namespace Grand.Business.Catalog.Services.Pricesif (!finalPrice.HasValue){//summarize price of all attributes- decimal attributesTotalPrice = decimal.Zero;+ double attributesTotalPrice = 0;if (attributes != null && attributes.Any()){if (product.ProductTypeId != ProductType.BundledProduct)@@ -704,17 +704,17 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="product">Product</param>/// <param name="includeDiscounts">Include discounts or not for price</param>/// <returns>Shopping cart item sub total</returns>- public virtual async Task<(decimal subTotal, decimal discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(ShoppingCartItem shoppingCartItem, Product product,+ public virtual async Task<(double subTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts)> GetSubTotal(ShoppingCartItem shoppingCartItem, Product product,bool includeDiscounts = true){if (shoppingCartItem == null)throw new ArgumentNullException(nameof(shoppingCartItem));- decimal subTotal;+ double subTotal;//unit pricevar getunitPrice = await GetUnitPrice(shoppingCartItem, product, includeDiscounts);var unitPrice = getunitPrice.unitprice;- decimal discountAmount = getunitPrice.discountAmount;+ double discountAmount = getunitPrice.discountAmount;List<ApplyDiscount> appliedDiscounts = getunitPrice.appliedDiscounts;//discount@@ -762,12 +762,12 @@ namespace Grand.Business.Catalog.Services.Prices/// <param name="product">Product</param>/// <param name="attributes">Shopping cart item attributes</param>/// <returns>Product cost (one item)</returns>- public virtual async Task<decimal> GetProductCost(Product product, IList<CustomAttribute> attributes)+ public virtual async Task<double> GetProductCost(Product product, IList<CustomAttribute> attributes){if (product == null)throw new ArgumentNullException(nameof(product));- decimal cost = product.ProductCost;+ double cost = product.ProductCost;var attributeValues = _productAttributeParser.ParseProductAttributeValues(product, attributes);foreach (var attributeValue in attributeValues){@@ -802,12 +802,12 @@ namespace Grand.Business.Catalog.Services.Prices/// </summary>/// <param name="value">Product attribute value</param>/// <returns>Price adjustment</returns>- public virtual async Task<decimal> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value)+ public virtual async Task<double> GetProductAttributeValuePriceAdjustment(ProductAttributeValue value){if (value == null)throw new ArgumentNullException(nameof(value));- var adjustment = decimal.Zero;+ double adjustment = 0;switch (value.AttributeValueTypeId){case AttributeValueType.Simple:diff --git a/src/Business/Grand.Business.Catalog/Services/Products/AuctionService.cs b/src/Business/Grand.Business.Catalog/Services/Products/AuctionService.csindex 549f43e4d..64dd4a6a7 100644--- a/src/Business/Grand.Business.Catalog/Services/Products/AuctionService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Products/AuctionService.cs@@ -98,7 +98,7 @@ namespace Grand.Business.Catalog.Services.Productsawait UpdateHighestBid(productToUpdate, highestBid != null ? highestBid.Amount : 0, highestBid != null ? highestBid.CustomerId : "");}}- public virtual async Task UpdateHighestBid(Product product, decimal bid, string highestBidder)+ public virtual async Task UpdateHighestBid(Product product, double bid, string highestBidder){product.HighestBid = bid;product.HighestBidder = highestBidder;@@ -142,7 +142,7 @@ namespace Grand.Business.Catalog.Services.Products/// <param name="warehouseId"></param>/// <param name="language"></param>/// <param name="amount"></param>- public virtual async Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, decimal amount)+ public virtual async Task NewBid(Customer customer, Product product, Store store, Language language, string warehouseId, double amount){var latestbid = await GetLatestBid(product.Id);await InsertBid(new Biddiff --git a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.csindex 16e77953c..0589e3ee2 100644--- a/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs+++ b/src/Business/Grand.Business.Catalog/Services/Products/ProductAttributeFormatter.cs@@ -261,16 +261,16 @@ namespace Grand.Business.Catalog.Services.Productsif (renderPrices){- decimal attributeValuePriceAdjustment = await _pricingService.GetProductAttributeValuePriceAdjustment(attributeValue);+ double attributeValuePriceAdjustment = await _pricingService.GetProductAttributeValuePriceAdjustment(attributeValue);var prices = await _taxService.GetProductPrice(product, attributeValuePriceAdjustment, _workContext.CurrentCustomer);- decimal priceAdjustmentBase = prices.productprice;- decimal taxRate = prices.taxRate;+ double priceAdjustmentBase = prices.productprice;+ double taxRate = prices.taxRate;if (priceAdjustmentBase > 0){string priceAdjustmentStr = _priceFormatter.FormatPrice(priceAdjustmentBase, false);formattedAttribute += string.Format(" [+{0}]", priceAdjustmentStr);}- else if (priceAdjustmentBase < decimal.Zero)+ else if (priceAdjustmentBase < 0){string priceAdjustmentStr = _priceFormatter.FormatPrice(-priceAdjustmentBase, false);formattedAttribute += string.Format(" [-{0}]", priceAdjustmentStr);diff --git a/src/Business/Grand.Business.Catalog/Services/Products/ProductService.cs b/src/Business/Grand.Business.Catalog/Services/Products/ProductService.csindex b0fd79d3e..dd4259f79 100644--- a/src/Business/Grand.Business.Catalog/Services/Products/ProductService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Products/ProductService.cs@@ -474,8 +474,8 @@ namespace Grand.Business.Catalog.Services.Productsbool visibleIndividuallyOnly = false,bool markedAsNewOnly = false,bool? featuredProducts = null,- decimal? priceMin = null,- decimal? priceMax = null,+ double? priceMin = null,+ double? priceMax = null,string productTag = "",string keywords = null,bool searchDescriptions = false,diff --git a/src/Business/Grand.Business.Catalog/Services/Tax/TaxProductPrice.cs b/src/Business/Grand.Business.Catalog/Services/Tax/TaxProductPrice.csindex dfb6ee61e..47f7a7f5a 100644--- a/src/Business/Grand.Business.Catalog/Services/Tax/TaxProductPrice.cs+++ b/src/Business/Grand.Business.Catalog/Services/Tax/TaxProductPrice.cs@@ -2,15 +2,15 @@{public class TaxProductPrice{- public decimal UnitPriceWihoutDiscInclTax { get; set; }- public decimal UnitPriceWihoutDiscExclTax { get; set; }- public decimal UnitPriceInclTax { get; set; }- public decimal UnitPriceExclTax { get; set; }+ public double UnitPriceWihoutDiscInclTax { get; set; }+ public double UnitPriceWihoutDiscExclTax { get; set; }+ public double UnitPriceInclTax { get; set; }+ public double UnitPriceExclTax { get; set; }public int Quantity { get; set; }- public decimal SubTotalInclTax { get; set; }- public decimal SubTotalExclTax { get; set; }- public decimal discountAmountInclTax { get; set; }- public decimal discountAmountExclTax { get; set; }- public decimal taxRate { get; set; }+ public double SubTotalInclTax { get; set; }+ public double SubTotalExclTax { get; set; }+ public double discountAmountInclTax { get; set; }+ public double discountAmountExclTax { get; set; }+ public double taxRate { get; set; }}}diff --git a/src/Business/Grand.Business.Catalog/Services/Tax/TaxService.cs b/src/Business/Grand.Business.Catalog/Services/Tax/TaxService.csindex 99c379762..e299a82f3 100644--- a/src/Business/Grand.Business.Catalog/Services/Tax/TaxService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Tax/TaxService.cs@@ -126,7 +126,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <returns>Package for tax calculation</returns>protected virtual async Task<TaxRequest> CreateCalculateTaxRequest(Product product,- string taxCategoryId, Customer customer, decimal price)+ string taxCategoryId, Customer customer, double price){if (customer == null)throw new ArgumentNullException(nameof(customer));@@ -197,14 +197,14 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="percent">Percent</param>/// <param name="increase">Increase</param>/// <returns>New price</returns>- protected virtual decimal CalculatePrice(decimal price, decimal percent, bool increase)+ protected virtual double CalculatePrice(double price, double percent, bool increase){- if (percent == decimal.Zero)+ if (percent == 0)return price;var result = increase ? price * (1 + percent / 100) : price / (1 + percent / 100);- if (result == decimal.Zero)+ if (result == 0)return 0;return Math.Round(result, _taxSettings.CalculateRoundPrice, _taxSettings.MidpointRounding);@@ -219,10 +219,10 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="price">Price (taxable value)</param>/// <param name="taxRate">Calculated tax rate</param>/// <param name="isTaxable">A value indicating whether a request is taxable</param>- protected virtual async Task<(decimal taxRate, bool isTaxable)> GetTaxRate(Product product, string taxCategoryId,- Customer customer, decimal price)+ protected virtual async Task<(double taxRate, bool isTaxable)> GetTaxRate(Product product, string taxCategoryId,+ Customer customer, double price){- decimal taxRate = decimal.Zero;+ double taxRate = 0;bool isTaxable = true;//active tax provider@@ -252,8 +252,8 @@ namespace Grand.Business.Catalog.Services.Taxif (calculateTaxResult.Success){//ensure that tax is equal or greater than zero- if (calculateTaxResult.TaxRate < decimal.Zero)- calculateTaxResult.TaxRate = decimal.Zero;+ if (calculateTaxResult.TaxRate < 0)+ calculateTaxResult.TaxRate = 0;taxRate = calculateTaxResult.TaxRate;}@@ -318,7 +318,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="price">Price</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price)+ public virtual async Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price){var customer = _workContext.CurrentCustomer;return await GetProductPrice(product, price, customer);@@ -332,7 +332,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price,+ public virtual async Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price,Customer customer){bool includingTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;@@ -348,7 +348,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, decimal price,+ public virtual async Task<(double productprice, double taxRate)> GetProductPrice(Product product, double price,bool includingTax, Customer customer){bool priceIncludesTax = _taxSettings.PricesIncludeTax;@@ -368,13 +368,13 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="priceIncludesTax">A value indicating whether price already includes tax</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal productprice, decimal taxRate)> GetProductPrice(Product product, string taxCategoryId,- decimal price, bool includingTax, Customer customer,+ public virtual async Task<(double productprice, double taxRate)> GetProductPrice(Product product, string taxCategoryId,+ double price, bool includingTax, Customer customer,bool priceIncludesTax){//no need to calculate tax rate if passed "price" is 0- if (price == decimal.Zero)+ if (price == 0){return (0, 0);}@@ -417,12 +417,12 @@ namespace Grand.Business.Catalog.Services.Taxif (!taxrates.isTaxable){//we return 0% tax rate in case a request is not taxable- taxrates.taxRate = decimal.Zero;+ taxrates.taxRate = 0;}//allowed to support negative price adjustments- //if (price < decimal.Zero)- // price = decimal.Zero;+ //if (price < 0)+ // price = 0;return (price, taxrates.taxRate);}@@ -430,11 +430,11 @@ namespace Grand.Business.Catalog.Services.Taxpublic virtual async Task<TaxProductPrice> GetTaxProductPrice(Product product,Customer customer,- decimal unitPrice,- decimal unitPricewithoutDisc,+ double unitPrice,+ double unitPricewithoutDisc,int quantity,- decimal subTotal,- decimal discountAmount,+ double subTotal,+ double discountAmount,bool priceIncludesTax){@@ -512,7 +512,7 @@ namespace Grand.Business.Catalog.Services.Taxif (!taxrates.isTaxable){//we return 0% tax rate in case a request is not taxable- taxrates.taxRate = decimal.Zero;+ taxrates.taxRate = 0;}return productPrice;}@@ -523,7 +523,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="price">Price</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- public virtual async Task<(decimal shippingPrice, decimal taxRate)> GetShippingPrice(decimal price, Customer customer)+ public virtual async Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, Customer customer){bool includingTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return await GetShippingPrice(price, includingTax, customer);@@ -537,7 +537,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal shippingPrice, decimal taxRate)> GetShippingPrice(decimal price, bool includingTax, Customer customer)+ public virtual async Task<(double shippingPrice, double taxRate)> GetShippingPrice(double price, bool includingTax, Customer customer){if (!_taxSettings.ShippingIsTaxable){@@ -557,7 +557,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="price">Price</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- public virtual async Task<(decimal paymentPrice, decimal taxRate)> GetPaymentMethodAdditionalFee(decimal price, Customer customer)+ public virtual async Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, Customer customer){bool includingTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return await GetPaymentMethodAdditionalFee(price, includingTax, customer);@@ -571,7 +571,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal paymentPrice, decimal taxRate)> GetPaymentMethodAdditionalFee(decimal price, bool includingTax, Customer customer)+ public virtual async Task<(double paymentPrice, double taxRate)> GetPaymentMethodAdditionalFee(double price, bool includingTax, Customer customer){if (!_taxSettings.PaymentMethodAdditionalFeeIsTaxable){@@ -590,7 +590,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="ca">Checkout attribute</param>/// <param name="cav">Checkout attribute value</param>/// <returns>Price</returns>- public virtual async Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav)+ public virtual async Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav){var customer = _workContext.CurrentCustomer;return await GetCheckoutAttributePrice(ca, cav, customer);@@ -603,7 +603,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="cav">Checkout attribute value</param>/// <param name="customer">Customer</param>/// <returns>Price</returns>- public virtual async Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, Customer customer)+ public virtual async Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, Customer customer){bool includingTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return await GetCheckoutAttributePrice(ca, cav, includingTax, customer);@@ -618,7 +618,7 @@ namespace Grand.Business.Catalog.Services.Tax/// <param name="customer">Customer</param>/// <param name="taxRate">Tax rate</param>/// <returns>Price</returns>- public virtual async Task<(decimal checkoutPrice, decimal taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, bool includingTax, Customer customer)+ public virtual async Task<(double checkoutPrice, double taxRate)> GetCheckoutAttributePrice(CheckoutAttribute ca, CheckoutAttributeValue cav, bool includingTax, Customer customer){if (ca == null)throw new ArgumentNullException(nameof(ca));@@ -626,7 +626,7 @@ namespace Grand.Business.Catalog.Services.Taxif (cav == null)throw new ArgumentNullException(nameof(cav));- decimal price = cav.PriceAdjustment;+ double price = cav.PriceAdjustment;if (ca.IsTaxExempt){return (price, 0);diff --git a/src/Business/Grand.Business.Catalog/Utilities/TaxRequest.cs b/src/Business/Grand.Business.Catalog/Utilities/TaxRequest.csindex f64ec9438..7bc4eaf8f 100644--- a/src/Business/Grand.Business.Catalog/Utilities/TaxRequest.cs+++ b/src/Business/Grand.Business.Catalog/Utilities/TaxRequest.cs@@ -32,6 +32,6 @@ namespace Grand.Business.Catalog.Utilities/// <summary>/// Gets or sets a price/// </summary>- public decimal Price { get; set; }+ public double Price { get; set; }}}diff --git a/src/Business/Grand.Business.Catalog/Utilities/TaxResult.cs b/src/Business/Grand.Business.Catalog/Utilities/TaxResult.csindex 8fee2c41d..78c3f8d0f 100644--- a/src/Business/Grand.Business.Catalog/Utilities/TaxResult.cs+++ b/src/Business/Grand.Business.Catalog/Utilities/TaxResult.cs@@ -18,7 +18,7 @@ namespace Grand.Business.Catalog.Utilities/// <summary>/// Gets or sets a tax rate/// </summary>- public decimal TaxRate { get; set; }+ public double TaxRate { get; set; }/// <summary>/// Gets or sets an addressdiff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/CalculateLoyaltyPointsCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/CalculateLoyaltyPointsCommandHandler.csindex 53ff7545f..7ac7b10ae 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/CalculateLoyaltyPointsCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/CalculateLoyaltyPointsCommandHandler.cs@@ -22,7 +22,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersif (!_loyaltyPointsSettings.Enabled)return 0;- if (_loyaltyPointsSettings.PointsForPurchases_Amount <= decimal.Zero)+ if (_loyaltyPointsSettings.PointsForPurchases_Amount <= 0)return 0;if (request.Customer == null)diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundCommandHandler.csindex 4c67a7c83..5ae559756 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundCommandHandler.cs@@ -82,7 +82,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders//total amount refundedif (paymentTransaction.TransactionStatus == Domain.Payments.TransactionStatus.Refunded){- decimal totalAmountRefunded = order.RefundedAmount + amountToRefund;+ double totalAmountRefunded = order.RefundedAmount + amountToRefund;order.RefundedAmount = totalAmountRefunded;order.PaymentStatusId = order.RefundedAmount == order.OrderTotal ? Domain.Payments.PaymentStatus.Refunded : Domain.Payments.PaymentStatus.PartiallyRefunded;diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundOfflineCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundOfflineCommandHandler.csindex 8d1a0b8d6..9644e68e0 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundOfflineCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PartiallyRefundOfflineCommandHandler.cs@@ -58,7 +58,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersthrow new ArgumentNullException(nameof(order));//total amount refunded- decimal totalAmountRefunded = order.RefundedAmount + amountToRefund;+ double totalAmountRefunded = order.RefundedAmount + amountToRefund;//update order infoorder.RefundedAmount = totalAmountRefunded;diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PlaceOrderCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PlaceOrderCommandHandler.csindex 7577103ef..240f1b663 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PlaceOrderCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/PlaceOrderCommandHandler.cs@@ -258,7 +258,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders//process paymentProcessPaymentResult processPaymentResult = null;//skip payment workflow if order total equals zero- var skipPaymentWorkflow = details.OrderTotal == decimal.Zero;+ var skipPaymentWorkflow = details.OrderTotal == 0;if (!skipPaymentWorkflow){var paymentMethod = _paymentService.LoadPaymentMethodBySystemName(details.PaymentMethodSystemName);@@ -331,9 +331,9 @@ namespace Grand.Business.Checkout.Commands.Handlers.OrderspaymentTransaction.Errors.Clear();await _paymentTransactionService.UpdatePaymentTransaction(paymentTransaction);}- private async Task<decimal?> PrepareCommissionRate(Product product, PlaceOrderContainter details)+ private async Task<double?> PrepareCommissionRate(Product product, PlaceOrderContainter details){- var commissionRate = default(decimal?);+ var commissionRate = default(double?);if (!string.IsNullOrEmpty(product.VendorId)){var vendor = await _vendorService.GetVendorById(product.VendorId);@@ -359,16 +359,16 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders/// </summary>/// <param name="shoppingCartItem">Shopping cart item</param>/// <returns>Shopping cart item weight</returns>- private async Task<decimal> GetShoppingCartItemWeight(ShoppingCartItem shoppingCartItem)+ private async Task<double> GetShoppingCartItemWeight(ShoppingCartItem shoppingCartItem){if (shoppingCartItem == null)throw new ArgumentNullException(nameof(shoppingCartItem));var product = await _productService.GetProductById(shoppingCartItem.ProductId);if (product == null)- return decimal.Zero;+ return 0;//attribute weight- decimal attributesTotalWeight = decimal.Zero;+ double attributesTotalWeight = 0;if (shoppingCartItem.Attributes != null && shoppingCartItem.Attributes.Any()){var attributeValues = _productAttributeParser.ParseProductAttributeValues(product, shoppingCartItem.Attributes);@@ -498,7 +498,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersbool minOrderSubtotalAmountOk = await _mediator.Send(new ValidateMinShoppingCartSubtotalAmountCommand() { Customer = _workContext.CurrentCustomer, Cart = details.Cart });if (!minOrderSubtotalAmountOk){- decimal minOrderSubtotalAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(_orderSettings.MinOrderSubtotalAmount, _workContext.WorkingCurrency);+ double minOrderSubtotalAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(_orderSettings.MinOrderSubtotalAmount, _workContext.WorkingCurrency);throw new GrandException(string.Format(_translationService.GetResource("Checkout.MinOrderSubtotalAmount"), _priceFormatter.FormatPrice(minOrderSubtotalAmount, false)));}@@ -517,10 +517,10 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders//sub total//sub total (incl tax)var shoppingCartSubTotal = await _orderTotalCalculationService.GetShoppingCartSubTotal(details.Cart, true);- decimal orderSubTotalDiscountAmount = shoppingCartSubTotal.discountAmount;+ double orderSubTotalDiscountAmount = shoppingCartSubTotal.discountAmount;List<ApplyDiscount> orderSubTotalAppliedDiscounts = shoppingCartSubTotal.appliedDiscounts;- decimal subTotalWithoutDiscountBase = shoppingCartSubTotal.subTotalWithoutDiscount;- decimal subTotalWithDiscountBase = shoppingCartSubTotal.subTotalWithDiscount;+ double subTotalWithoutDiscountBase = shoppingCartSubTotal.subTotalWithoutDiscount;+ double subTotalWithDiscountBase = shoppingCartSubTotal.subTotalWithDiscount;details.OrderSubTotalInclTax = subTotalWithoutDiscountBase;details.OrderSubTotalDiscountInclTax = orderSubTotalDiscountAmount;@@ -582,7 +582,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders//shipping totalvar shoppingCartShippingTotal = await _orderTotalCalculationService.GetShoppingCartShippingTotal(details.Cart, true);- decimal tax = shoppingCartShippingTotal.taxRate;+ double tax = shoppingCartShippingTotal.taxRate;List<ApplyDiscount> shippingTotalDiscounts = shoppingCartShippingTotal.appliedDiscounts;var orderShippingTotalInclTax = shoppingCartShippingTotal.shoppingCartShippingTotal;var orderShippingTotalExclTax = (await _orderTotalCalculationService.GetShoppingCartShippingTotal(details.Cart, false)).shoppingCartShippingTotal;@@ -602,7 +602,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders//paymentvar paymentMethodSystemName = _workContext.CurrentCustomer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.SelectedPaymentMethod, _workContext.CurrentStore.Id);details.PaymentMethodSystemName = paymentMethodSystemName;- decimal paymentAdditionalFee = await _paymentService.GetAdditionalHandlingFee(details.Cart, _workContext.CurrentStore.Id);+ double paymentAdditionalFee = await _paymentService.GetAdditionalHandlingFee(details.Cart, _workContext.CurrentStore.Id);details.PaymentAdditionalFeeInclTax = (await _taxService.GetPaymentMethodAdditionalFee(paymentAdditionalFee, true, details.Customer)).paymentPrice;details.PaymentAdditionalFeeExclTax = (await _taxService.GetPaymentMethodAdditionalFee(paymentAdditionalFee, false, details.Customer)).paymentPrice;@@ -625,7 +625,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersvar shoppingCartTotal = await _orderTotalCalculationService.GetShoppingCartTotal(details.Cart);List<AppliedGiftVoucher> appliedGiftVouchers = shoppingCartTotal.appliedGiftVouchers;List<ApplyDiscount> orderAppliedDiscounts = shoppingCartTotal.appliedDiscounts;- decimal orderDiscountAmount = shoppingCartTotal.discountAmount;+ double orderDiscountAmount = shoppingCartTotal.discountAmount;int redeemedLoyaltyPoints = shoppingCartTotal.redeemedLoyaltyPoints;var orderTotal = shoppingCartTotal.shoppingCartTotal;if (!orderTotal.HasValue)@@ -650,24 +650,24 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersprotected virtual async Task<OrderItem> PrepareOrderItem(ShoppingCartItem sc, Product product, PlaceOrderContainter details){List<ApplyDiscount> scDiscounts;- decimal discountAmount;- decimal scUnitPrice = (await _pricingService.GetUnitPrice(sc, product)).unitprice;- decimal scUnitPriceWithoutDisc = (await _pricingService.GetUnitPrice(sc, product, false)).unitprice;+ double discountAmount;+ double scUnitPrice = (await _pricingService.GetUnitPrice(sc, product)).unitprice;+ double scUnitPriceWithoutDisc = (await _pricingService.GetUnitPrice(sc, product, false)).unitprice;var subtotal = await _pricingService.GetSubTotal(sc, product, true);- decimal scSubTotal = subtotal.subTotal;+ double scSubTotal = subtotal.subTotal;discountAmount = subtotal.discountAmount;scDiscounts = subtotal.appliedDiscounts;var prices = await _taxService.GetTaxProductPrice(product, details.Customer, scUnitPrice, scUnitPriceWithoutDisc, sc.Quantity, scSubTotal, discountAmount, _taxSettings.PricesIncludeTax);- decimal scUnitPriceWithoutDiscInclTax = prices.UnitPriceWihoutDiscInclTax;- decimal scUnitPriceWithoutDiscExclTax = prices.UnitPriceWihoutDiscExclTax;- decimal scUnitPriceInclTax = prices.UnitPriceInclTax;- decimal scUnitPriceExclTax = prices.UnitPriceExclTax;- decimal scSubTotalInclTax = prices.SubTotalInclTax;- decimal scSubTotalExclTax = prices.SubTotalExclTax;- decimal discountAmountInclTax = prices.discountAmountInclTax;- decimal discountAmountExclTax = prices.discountAmountExclTax;+ double scUnitPriceWithoutDiscInclTax = prices.UnitPriceWihoutDiscInclTax;+ double scUnitPriceWithoutDiscExclTax = prices.UnitPriceWihoutDiscExclTax;+ double scUnitPriceInclTax = prices.UnitPriceInclTax;+ double scUnitPriceExclTax = prices.UnitPriceExclTax;+ double scSubTotalInclTax = prices.SubTotalInclTax;+ double scSubTotalExclTax = prices.SubTotalExclTax;+ double discountAmountInclTax = prices.discountAmountInclTax;+ double discountAmountExclTax = prices.discountAmountExclTax;foreach (var disc in scDiscounts){@@ -943,7 +943,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Orders{foreach (var agc in details.AppliedGiftVouchers){- decimal amountUsed = agc.AmountCanBeUsed;+ double amountUsed = agc.AmountCanBeUsed;var gcuh = new GiftVoucherUsageHistory{GiftVoucherId = agc.GiftVoucher.Id,@@ -995,7 +995,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.OrdersPaymentMethodAdditionalFeeExclTax = Math.Round(details.PaymentAdditionalFeeExclTax, 6),OrderTax = Math.Round(details.OrderTaxTotal, 6),OrderTotal = Math.Round(details.OrderTotal, 6),- RefundedAmount = decimal.Zero,+ RefundedAmount = 0,OrderDiscount = Math.Round(details.OrderDiscountAmount, 6),CheckoutAttributeDescription = details.CheckoutAttributeDescription,CheckoutAttributes = details.CheckoutAttributes,diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ProcessOrderPaidCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ProcessOrderPaidCommandHandler.csindex 95de17c21..7ae8ba5ae 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ProcessOrderPaidCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ProcessOrderPaidCommandHandler.cs@@ -59,7 +59,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersawait _mediator.Publish(new OrderPaidEvent(order));//order paid email notification- if (order.OrderTotal != decimal.Zero)+ if (order.OrderTotal != 0){var customer = await _customerService.GetCustomerById(order.CustomerId);diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ReOrderCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ReOrderCommandHandler.csindex 42b7b8ef6..b863e5b99 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ReOrderCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ReOrderCommandHandler.cs@@ -52,7 +52,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.OrdersorderItem.Attributes,product.EnteredPrice ?_taxSettings.PricesIncludeTax ? orderItem.UnitPriceInclTax : orderItem.UnitPriceExclTax- : (decimal?)default,+ : (double?)default,orderItem.RentalStartDateUtc, orderItem.RentalEndDateUtc,orderItem.Quantity, false, getRequiredProductWarnings: false));}diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundCommandHandler.csindex 15db1bf7a..286181cf3 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundCommandHandler.cs@@ -72,7 +72,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersif (order == null)throw new ArgumentNullException(nameof(order));- decimal totalAmountRefunded = order.RefundedAmount + request.AmountToRefund;+ double totalAmountRefunded = order.RefundedAmount + request.AmountToRefund;//update order infoorder.RefundedAmount = totalAmountRefunded;diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundOfflineCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundOfflineCommandHandler.csindex 962a59331..d3ec1f498 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundOfflineCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/RefundOfflineCommandHandler.cs@@ -57,10 +57,10 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersthrow new ArgumentNullException(nameof(order));//amout to refund- decimal amountToRefund = order.OrderTotal;+ double amountToRefund = order.OrderTotal;//total amount refunded- decimal totalAmountRefunded = order.RefundedAmount + amountToRefund;+ double totalAmountRefunded = order.RefundedAmount + amountToRefund;//update order infoorder.RefundedAmount = totalAmountRefunded;diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateMinShoppingCartSubtotalAmountCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateMinShoppingCartSubtotalAmountCommandHandler.csindex 77738adc7..753a3b53e 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateMinShoppingCartSubtotalAmountCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateMinShoppingCartSubtotalAmountCommandHandler.cs@@ -43,7 +43,7 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersreturn false;//min order amount sub-total validation- if (cart.Any() && _orderSettings.MinOrderSubtotalAmount > decimal.Zero)+ if (cart.Any() && _orderSettings.MinOrderSubtotalAmount > 0){//subtotalvar (_, _, subTotalWithoutDiscount, _, _) = await _orderTotalCalculationService.GetShoppingCartSubTotal(cart, false);diff --git a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateShoppingCartTotalAmountCommandHandler.cs b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateShoppingCartTotalAmountCommandHandler.csindex f961f1f51..bb24ee457 100644--- a/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateShoppingCartTotalAmountCommandHandler.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Handlers/Orders/ValidateShoppingCartTotalAmountCommandHandler.cs@@ -36,14 +36,14 @@ namespace Grand.Business.Checkout.Commands.Handlers.Ordersvar customerGroups = await _groupService.GetAllByIds(request.Customer.Groups.ToArray());var minroles = customerGroups.OrderBy(x => x.MinOrderAmount).FirstOrDefault(x => x.MinOrderAmount.HasValue);- var minOrderAmount = minroles?.MinOrderAmount ?? decimal.MinValue;+ var minOrderAmount = minroles?.MinOrderAmount ?? double.MinValue;var maxroles = customerGroups.OrderByDescending(x => x.MaxOrderAmount).FirstOrDefault(x => x.MaxOrderAmount.HasValue);- var maxOrderAmount = maxroles?.MaxOrderAmount ?? decimal.MaxValue;+ var maxOrderAmount = maxroles?.MaxOrderAmount ?? double.MaxValue;- if (request.Cart.Any() && (minOrderAmount > decimal.Zero || maxOrderAmount > decimal.Zero || _orderSettings.MinOrderTotalAmount > 0))+ if (request.Cart.Any() && (minOrderAmount > 0 || maxOrderAmount > 0 || _orderSettings.MinOrderTotalAmount > 0)){- decimal? shoppingCartTotalBase = (await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart)).shoppingCartTotal;+ double? shoppingCartTotalBase = (await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart)).shoppingCartTotal;if (shoppingCartTotalBase.HasValue && (shoppingCartTotalBase.Value < minOrderAmount || shoppingCartTotalBase.Value > maxOrderAmount))return false;diff --git a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/CalculateLoyaltyPointsCommand.cs b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/CalculateLoyaltyPointsCommand.csindex 63258c97e..244df972e 100644--- a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/CalculateLoyaltyPointsCommand.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/CalculateLoyaltyPointsCommand.cs@@ -6,6 +6,6 @@ namespace Grand.Business.Checkout.Commands.Models.Orderspublic class CalculateLoyaltyPointsCommand : IRequest<int>{public Customer Customer { get; set; }- public decimal Amount { get; set; }+ public double Amount { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyPaidOfflineCommand.cs b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyPaidOfflineCommand.csindex 99dc2c757..08f558c7e 100644--- a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyPaidOfflineCommand.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyPaidOfflineCommand.cs@@ -6,6 +6,6 @@ namespace Grand.Business.Checkout.Commands.Models.Orderspublic class PartiallyPaidOfflineCommand : IRequest<bool>{public PaymentTransaction PaymentTransaction { get; set; }- public decimal AmountToPaid { get; set; }+ public double AmountToPaid { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundCommand.cs b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundCommand.csindex 2033b3e9a..0feec8ece 100644--- a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundCommand.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundCommand.cs@@ -7,6 +7,6 @@ namespace Grand.Business.Checkout.Commands.Models.Orderspublic class PartiallyRefundCommand : IRequest<IList<string>>{public PaymentTransaction PaymentTransaction { get; set; }- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundOfflineCommand.cs b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundOfflineCommand.csindex efee5be77..d9dee9ae1 100644--- a/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundOfflineCommand.cs+++ b/src/Business/Grand.Business.Checkout/Commands/Models/Orders/PartiallyRefundOfflineCommand.cs@@ -6,6 +6,6 @@ namespace Grand.Business.Checkout.Commands.Models.Orderspublic class PartiallyRefundOfflineCommand : IRequest<bool>{public PaymentTransaction PaymentTransaction { get; set; }- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Events/Orders/OrderPlacedEventHandler.cs b/src/Business/Grand.Business.Checkout/Events/Orders/OrderPlacedEventHandler.csindex 95c5fe939..57e70f5de 100644--- a/src/Business/Grand.Business.Checkout/Events/Orders/OrderPlacedEventHandler.cs+++ b/src/Business/Grand.Business.Checkout/Events/Orders/OrderPlacedEventHandler.cs@@ -80,7 +80,7 @@ namespace Grand.Business.Checkout.Events.Ordersprotected Task InsertLoyaltyPointsHistory(Order order){//loyalty points history- if (order.RedeemedLoyaltyPointsAmount > decimal.Zero)+ if (order.RedeemedLoyaltyPointsAmount > 0){_loyaltyPointsService.AddLoyaltyPointsHistory(order.CustomerId,-order.RedeemedLoyaltyPoints, order.StoreId,diff --git a/src/Business/Grand.Business.Checkout/Events/Orders/PaymentTransactionRefundedEvent.cs b/src/Business/Grand.Business.Checkout/Events/Orders/PaymentTransactionRefundedEvent.csindex ae7a6e368..d3d535221 100644--- a/src/Business/Grand.Business.Checkout/Events/Orders/PaymentTransactionRefundedEvent.cs+++ b/src/Business/Grand.Business.Checkout/Events/Orders/PaymentTransactionRefundedEvent.cs@@ -8,7 +8,7 @@ namespace Grand.Business.Checkout.Events.Orders/// </summary>public class PaymentTransactionRefundedEvent : INotification{- public PaymentTransactionRefundedEvent(PaymentTransaction paymentTransaction, decimal amount)+ public PaymentTransactionRefundedEvent(PaymentTransaction paymentTransaction, double amount){PaymentTransaction = PaymentTransaction;Amount = amount;@@ -22,6 +22,6 @@ namespace Grand.Business.Checkout.Events.Orders/// <summary>/// Amount/// </summary>- public decimal Amount { get; private set; }+ public double Amount { get; private set; }}}diff --git a/src/Business/Grand.Business.Checkout/Extensions/PaymentExtensions.cs b/src/Business/Grand.Business.Checkout/Extensions/PaymentExtensions.csindex 3f0688672..dea25b48b 100644--- a/src/Business/Grand.Business.Checkout/Extensions/PaymentExtensions.cs+++ b/src/Business/Grand.Business.Checkout/Extensions/PaymentExtensions.cs@@ -45,21 +45,21 @@ namespace Grand.Business.Checkout.Extensions/// <param name="fee">Fee value</param>/// <param name="usePercentage">Is fee amount specified as percentage or fixed value?</param>/// <returns>Result</returns>- public static async Task<decimal> CalculateAdditionalFee(this IPaymentProvider paymentMethod,+ public static async Task<double> CalculateAdditionalFee(this IPaymentProvider paymentMethod,IOrderCalculationService orderTotalCalculationService, IList<ShoppingCartItem> cart,- decimal fee, bool usePercentage)+ double fee, bool usePercentage){if (paymentMethod == null)throw new ArgumentNullException(nameof(paymentMethod));if (fee <= 0)return fee;- decimal result;+ double result;if (usePercentage){//percentagevar shoppingCartSubTotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);- result = (decimal)((((float)shoppingCartSubTotal.subTotalWithDiscount) * ((float)fee)) / 100f);+ result = (double)((((float)shoppingCartSubTotal.subTotalWithDiscount) * ((float)fee)) / 100f);}else{diff --git a/src/Business/Grand.Business.Checkout/Interfaces/Orders/ILoyaltyPointsService.cs b/src/Business/Grand.Business.Checkout/Interfaces/Orders/ILoyaltyPointsService.csindex 423e63556..f267bfc6f 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Orders/ILoyaltyPointsService.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Orders/ILoyaltyPointsService.cs@@ -29,7 +29,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="usedWithOrder">the order for which points were redeemed as a payment</param>/// <param name="usedAmount">Used amount</param>Task<LoyaltyPointsHistory> AddLoyaltyPointsHistory(string customerId, int points, string storeId, string message = "",- string usedWithOrderId = "", decimal usedAmount = 0M);+ string usedWithOrderId = "", double usedAmount = 0);/// <summary>/// Load loyalty point history recordsdiff --git a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IOrderCalculationService.cs b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IOrderCalculationService.csindex dddc8ae90..c9496cebf 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IOrderCalculationService.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IOrderCalculationService.cs@@ -21,7 +21,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="subTotalWithoutDiscount">Sub total (without discount)</param>/// <param name="subTotalWithDiscount">Sub total (with discount)</param>/// <param name="taxRates">Tax rates (of order sub total)</param>- Task<(decimal discountAmount, List<ApplyDiscount> appliedDiscounts, decimal subTotalWithoutDiscount, decimal subTotalWithDiscount, SortedDictionary<decimal, decimal> taxRates)>+ Task<(double discountAmount, List<ApplyDiscount> appliedDiscounts, double subTotalWithoutDiscount, double subTotalWithDiscount, SortedDictionary<double, double> taxRates)>GetShoppingCartSubTotal(IList<ShoppingCartItem> cart,bool includingTax);@@ -32,14 +32,14 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="cart">Cart</param>/// <param name="appliedDiscount">Applied discount</param>/// <returns>Adjusted shipping rate</returns>- Task<(decimal shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(decimal shippingRate, IList<ShoppingCartItem> cart);+ Task<(double shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(double shippingRate, IList<ShoppingCartItem> cart);/// <summary>/// Gets shopping cart additional shipping charge/// </summary>/// <param name="cart">Cart</param>/// <returns>Additional shipping charge</returns>- Task<decimal> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart);+ Task<double> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart);/// <summary>/// Gets a value indicating whether shipping is free@@ -53,7 +53,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// </summary>/// <param name="cart">Cart</param>/// <returns>Shipping total</returns>- Task<(decimal? shoppingCartShippingTotal, decimal taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart);+ Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart);/// <summary>/// Gets shopping cart shipping total@@ -63,7 +63,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="taxRate">Applied tax rate</param>/// <param name="appliedDiscount">Applied discount</param>/// <returns>Shipping total</returns>- Task<(decimal? shoppingCartShippingTotal, decimal taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax);+ Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax);/// <summary>@@ -73,7 +73,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="taxRates">Tax rates</param>/// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee when calculating tax</param>/// <returns>Tax total</returns>- Task<(decimal taxtotal, SortedDictionary<decimal, decimal> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart, bool usePaymentMethodAdditionalFee = true);+ Task<(double taxtotal, SortedDictionary<double, double> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart, bool usePaymentMethodAdditionalFee = true);/// <summary>/// Gets shopping cart total@@ -87,8 +87,8 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="useLoyaltyPoints">A value indicating loyalty points should be used; null to detect current choice of the customer</param>/// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee when calculating order total</param>/// <returns>Shopping cart total;Null if shopping cart total couldn't be calculated now</returns>- Task<(decimal? shoppingCartTotal, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, List<AppliedGiftVoucher> appliedGiftVouchers,- int redeemedLoyaltyPoints, decimal redeemedLoyaltyPointsAmount)>+ Task<(double? shoppingCartTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts, List<AppliedGiftVoucher> appliedGiftVouchers,+ int redeemedLoyaltyPoints, double redeemedLoyaltyPointsAmount)>GetShoppingCartTotal(IList<ShoppingCartItem> cart, bool? useLoyaltyPoints = null, bool usePaymentMethodAdditionalFee = true);/// <summary>@@ -96,14 +96,14 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// </summary>/// <param name="loyaltyPoints">Loyalty points</param>/// <returns>Converted value</returns>- Task<decimal> ConvertLoyaltyPointsToAmount(int loyaltyPoints);+ Task<double> ConvertLoyaltyPointsToAmount(int loyaltyPoints);/// <summary>/// Converts an amount to loyalty points/// </summary>/// <param name="amount">Amount</param>/// <returns>Converted value</returns>- int ConvertAmountToLoyaltyPoints(decimal amount);+ int ConvertAmountToLoyaltyPoints(double amount);/// <summary>/// Gets a value indicating whether a customer has minimum amount of loyalty points to use (if enabled)diff --git a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartService.cs b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartService.csindex 6d8443a81..9b2067afa 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartService.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartService.cs@@ -38,7 +38,7 @@ namespace Grand.Business.Checkout.Interfaces.Ordersstring productId,string warehouseId = null,IList<CustomAttribute> attributes = null,- decimal? customerEnteredPrice = null,+ double? customerEnteredPrice = null,DateTime? rentalStartDate = null,DateTime? rentalEndDate = null);@@ -58,7 +58,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <returns>Warnings</returns>Task<IList<string>> AddToCart(Customer customer, string productId,ShoppingCartType shoppingCartType, string storeId, string warehouseId = null, IList<CustomAttribute> attributes = null,- decimal? customerEnteredPrice = null,+ double? customerEnteredPrice = null,DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,int quantity = 1, bool automaticallyAddRequiredProductsIfEnabled = true, string reservationId = "", string parameter = "", string duration = "", bool getRequiredProductWarnings = true);@@ -76,7 +76,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <returns>Warnings</returns>Task<IList<string>> UpdateShoppingCartItem(Customer customer,string shoppingCartItemId, string warehouseId, IList<CustomAttribute> attributes,- decimal? customerEnteredPrice = null,+ double? customerEnteredPrice = null,DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,int quantity = 1, bool resetCheckoutData = true, string reservationId = "", string sciId = "");diff --git a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartValidator.cs b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartValidator.csindex 82dd09edb..d5b460a49 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartValidator.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Orders/IShoppingCartValidator.cs@@ -49,7 +49,7 @@ namespace Grand.Business.Checkout.Interfaces.Orders/// <param name="product"></param>/// <param name="customer"></param>/// <returns></returns>- IList<string> GetAuctionProductWarning(decimal bid, Product product, Customer customer);+ IList<string> GetAuctionProductWarning(double bid, Product product, Customer customer);/// <summary>/// Validates shopping cart itemdiff --git a/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentProvider.cs b/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentProvider.csindex d89692e9d..fdfc30802 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentProvider.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentProvider.cs@@ -53,7 +53,7 @@ namespace Grand.Business.Checkout.Interfaces.Payments/// </summary>/// <param name="cart">Shoping cart</param>/// <returns>Additional handling fee</returns>- Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart);+ Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart);/// <summary>/// Captures paymentdiff --git a/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentService.cs b/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentService.csindex 08d754692..92f1395b7 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentService.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Payments/IPaymentService.cs@@ -98,7 +98,7 @@ namespace Grand.Business.Checkout.Interfaces.Payments/// <param name="cart">Shoping cart</param>/// <param name="paymentMethodSystemName">Payment method system name</param>/// <returns>Additional handling fee</returns>- Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName);+ Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName);/// <summary>/// Gets a value indicating whether capture is supported by payment methoddiff --git a/src/Business/Grand.Business.Checkout/Interfaces/Shipping/IShippingRateCalculationProvider.cs b/src/Business/Grand.Business.Checkout/Interfaces/Shipping/IShippingRateCalculationProvider.csindex 796037da5..a284b1a0c 100644--- a/src/Business/Grand.Business.Checkout/Interfaces/Shipping/IShippingRateCalculationProvider.cs+++ b/src/Business/Grand.Business.Checkout/Interfaces/Shipping/IShippingRateCalculationProvider.cs@@ -37,7 +37,7 @@ namespace Grand.Business.Checkout.Interfaces.Shipping/// </summary>/// <param name="getShippingOptionRequest">A request for getting shipping options</param>/// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>- Task<decimal?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest);+ Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest);/// <summary>/// Gets a shipment trackerdiff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyPaidOfflineQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyPaidOfflineQueryHandler.csindex 9893250a9..ad2adf737 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyPaidOfflineQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyPaidOfflineQueryHandler.cs@@ -17,11 +17,11 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersvar amountToPaid = request.AmountToPaid;- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return Task.FromResult(false);- decimal canBePaid = paymentTransaction.TransactionAmount - paymentTransaction.PaidAmount;- if (canBePaid <= decimal.Zero)+ double canBePaid = paymentTransaction.TransactionAmount - paymentTransaction.PaidAmount;+ if (canBePaid <= 0)return Task.FromResult(false);if (amountToPaid > canBePaid)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundOfflineQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundOfflineQueryHandler.csindex 995971b45..c4de6f357 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundOfflineQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundOfflineQueryHandler.cs@@ -17,11 +17,11 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersvar amountToRefund = request.AmountToRefund;- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return Task.FromResult(false);- decimal canBeRefunded = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;- if (canBeRefunded <= decimal.Zero)+ double canBeRefunded = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;+ if (canBeRefunded <= 0)return Task.FromResult(false);if (amountToRefund > canBeRefunded)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundQueryHandler.csindex 6960ccea3..35ec9a061 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanPartiallyRefundQueryHandler.cs@@ -25,15 +25,15 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersvar amountToRefund = request.AmountToRefund;- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return false;//uncomment the lines below in order to allow this operation for cancelled orders//if (order.OrderStatus == OrderStatus.Cancelled)// return false;- decimal canBeRefunded = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;- if (canBeRefunded <= decimal.Zero)+ double canBeRefunded = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;+ if (canBeRefunded <= 0)return false;if (amountToRefund > canBeRefunded)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundOfflineQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundOfflineQueryHandler.csindex 80aaad4c1..d5eec5a7f 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundOfflineQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundOfflineQueryHandler.cs@@ -15,11 +15,11 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersif (paymentTransaction == null)throw new ArgumentNullException(nameof(request.PaymentTransaction));- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return Task.FromResult(false);//refund cannot be made if previously a partial refund has been already done. only other partial refund can be made in this case- if (paymentTransaction.RefundedAmount > decimal.Zero)+ if (paymentTransaction.RefundedAmount > 0)return Task.FromResult(false);if (paymentTransaction.TransactionStatus == TransactionStatus.Paid)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundQueryHandler.csindex a230c53e4..6d34123b9 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanRefundQueryHandler.cs@@ -23,10 +23,10 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersif (paymentTransaction == null)throw new ArgumentNullException(nameof(request.PaymentTransaction));- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return false;- if (paymentTransaction.RefundedAmount > decimal.Zero)+ if (paymentTransaction.RefundedAmount > 0)return false;//if (order.OrderStatus == OrderStatus.Cancelled)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidOfflineQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidOfflineQueryHandler.csindex 618a171e7..d43f74262 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidOfflineQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidOfflineQueryHandler.cs@@ -15,7 +15,7 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersif (paymentTransaction == null)throw new ArgumentNullException(nameof(request.PaymentTransaction));- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return Task.FromResult(false);if (paymentTransaction.TransactionStatus == TransactionStatus.Authorized)diff --git a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidQueryHandler.cs b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidQueryHandler.csindex 30269ea78..0fba6ef89 100644--- a/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidQueryHandler.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Handlers/Orders/CanVoidQueryHandler.cs@@ -23,7 +23,7 @@ namespace Grand.Business.Checkout.Queries.Handlers.Ordersif (paymentTransaction == null)throw new ArgumentNullException(nameof(request.PaymentTransaction));- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0)return false;if (paymentTransaction.TransactionStatus == TransactionStatus.Authorized &&diff --git a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyPaidOfflineQuery.cs b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyPaidOfflineQuery.csindex e3ecbb9fa..7d1add5eb 100644--- a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyPaidOfflineQuery.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyPaidOfflineQuery.cs@@ -6,6 +6,6 @@ namespace Grand.Business.Checkout.Queries.Models.Orderspublic class CanPartiallyPaidOfflineQuery : IRequest<bool>{public PaymentTransaction PaymentTransaction { get; set; }- public decimal AmountToPaid { get; set; }+ public double AmountToPaid { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundOfflineQuery.cs b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundOfflineQuery.csindex d87da571b..a69f301a1 100644--- a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundOfflineQuery.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundOfflineQuery.cs@@ -6,6 +6,6 @@ namespace Grand.Business.Checkout.Queries.Models.Orderspublic class CanPartiallyRefundOfflineQuery : IRequest<bool>{public PaymentTransaction PaymentTransaction { get; set; }- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundQuery.cs b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundQuery.csindex fb8824f7c..1696b2ca5 100644--- a/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundQuery.cs+++ b/src/Business/Grand.Business.Checkout/Queries/Models/Orders/CanPartiallyRefundQuery.cs@@ -5,7 +5,7 @@ namespace Grand.Business.Checkout.Queries.Models.Orders{public class CanPartiallyRefundQuery : IRequest<bool>{- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }public PaymentTransaction PaymentTransaction { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Services/CheckoutAttributes/CheckoutAttributeFormatter.cs b/src/Business/Grand.Business.Checkout/Services/CheckoutAttributes/CheckoutAttributeFormatter.csindex 6c8d291ef..6dbf0e3ef 100644--- a/src/Business/Grand.Business.Checkout/Services/CheckoutAttributes/CheckoutAttributeFormatter.cs+++ b/src/Business/Grand.Business.Checkout/Services/CheckoutAttributes/CheckoutAttributeFormatter.cs@@ -140,8 +140,8 @@ namespace Grand.Business.Checkout.Services.CheckoutAttributesformattedAttribute = string.Format("{0}: {1}", attribute.GetTranslation(a => a.Name, _workContext.WorkingLanguage.Id), attributeValue.GetTranslation(a => a.Name, _workContext.WorkingLanguage.Id));if (renderPrices){- decimal priceAdjustmentBase = (await _taxService.GetCheckoutAttributePrice(attribute, attributeValue, customer)).checkoutPrice;- decimal priceAdjustment = await _currencyService.ConvertFromPrimaryStoreCurrency(priceAdjustmentBase, _workContext.WorkingCurrency);+ double priceAdjustmentBase = (await _taxService.GetCheckoutAttributePrice(attribute, attributeValue, customer)).checkoutPrice;+ double priceAdjustment = await _currencyService.ConvertFromPrimaryStoreCurrency(priceAdjustmentBase, _workContext.WorkingCurrency);if (priceAdjustmentBase > 0){string priceAdjustmentStr = _priceFormatter.FormatPrice(priceAdjustment);diff --git a/src/Business/Grand.Business.Checkout/Services/Orders/LoyaltyPointsService.cs b/src/Business/Grand.Business.Checkout/Services/Orders/LoyaltyPointsService.csindex 780c659db..987fb1695 100644--- a/src/Business/Grand.Business.Checkout/Services/Orders/LoyaltyPointsService.cs+++ b/src/Business/Grand.Business.Checkout/Services/Orders/LoyaltyPointsService.cs@@ -76,7 +76,7 @@ namespace Grand.Business.Checkout.Services.Orders/// <returns>LoyaltyPointsHistory</returns>public virtual async Task<LoyaltyPointsHistory> AddLoyaltyPointsHistory(string customerId, int points, string storeId, string message = "",- string usedWithOrderId = "", decimal usedAmount = 0M)+ string usedWithOrderId = "", double usedAmount = 0){var loyaltyPointsHistory = new LoyaltyPointsHistorydiff --git a/src/Business/Grand.Business.Checkout/Services/Orders/OrderCalculationService.cs b/src/Business/Grand.Business.Checkout/Services/Orders/OrderCalculationService.csindex 3a7280975..0bf393c84 100644--- a/src/Business/Grand.Business.Checkout/Services/Orders/OrderCalculationService.cs+++ b/src/Business/Grand.Business.Checkout/Services/Orders/OrderCalculationService.cs@@ -126,10 +126,10 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="currency">Currency</param>/// <param name="orderSubTotal">Order subtotal</param>/// <returns>Order discount</returns>- protected virtual async Task<(decimal ordersubtotaldiscount, List<ApplyDiscount> appliedDiscounts)> GetOrderSubtotalDiscount(Customer customer, Currency currency, decimal orderSubTotal)+ protected virtual async Task<(double ordersubtotaldiscount, List<ApplyDiscount> appliedDiscounts)> GetOrderSubtotalDiscount(Customer customer, Currency currency, double orderSubTotal){var appliedDiscounts = new List<ApplyDiscount>();- decimal discountAmount = decimal.Zero;+ double discountAmount = 0;if (_catalogSettings.IgnoreDiscounts)return (discountAmount, appliedDiscounts);@@ -156,8 +156,8 @@ namespace Grand.Business.Checkout.Services.OrdersappliedDiscounts = preferredDiscounts.appliedDiscount;discountAmount = preferredDiscounts.discountAmount;- if (discountAmount < decimal.Zero)- discountAmount = decimal.Zero;+ if (discountAmount < 0)+ discountAmount = 0;return (discountAmount, appliedDiscounts);}@@ -169,10 +169,10 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="currency">Currency</param>/// <param name="shippingTotal">Shipping total</param>/// <returns>Shipping discount</returns>- protected virtual async Task<(decimal shippingDiscount, List<ApplyDiscount> appliedDiscounts)> GetShippingDiscount(Customer customer, Currency currency, decimal shippingTotal)+ protected virtual async Task<(double shippingDiscount, List<ApplyDiscount> appliedDiscounts)> GetShippingDiscount(Customer customer, Currency currency, double shippingTotal){var appliedDiscounts = new List<ApplyDiscount>();- decimal shippingDiscountAmount = decimal.Zero;+ double shippingDiscountAmount = 0;if (_catalogSettings.IgnoreDiscounts)return (shippingDiscountAmount, appliedDiscounts);@@ -199,8 +199,8 @@ namespace Grand.Business.Checkout.Services.OrdersappliedDiscounts = appliedDiscount;shippingDiscountAmount = discountAmount;- if (shippingDiscountAmount < decimal.Zero)- shippingDiscountAmount = decimal.Zero;+ if (shippingDiscountAmount < 0)+ shippingDiscountAmount = 0;if (_shoppingCartSettings.RoundPrices){@@ -216,10 +216,10 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="currency">Currency</param>/// <param name="orderTotal">Order total</param>/// <returns>Order discount</returns>- protected virtual async Task<(decimal orderTotalDiscount, List<ApplyDiscount> appliedDiscounts)> GetOrderTotalDiscount(Customer customer, Currency currency, decimal orderTotal)+ protected virtual async Task<(double orderTotalDiscount, List<ApplyDiscount> appliedDiscounts)> GetOrderTotalDiscount(Customer customer, Currency currency, double orderTotal){var appliedDiscounts = new List<ApplyDiscount>();- decimal discountAmount = decimal.Zero;+ double discountAmount = 0;if (_catalogSettings.IgnoreDiscounts)return (discountAmount, appliedDiscounts);@@ -245,8 +245,8 @@ namespace Grand.Business.Checkout.Services.OrdersappliedDiscounts = preferredDiscount.appliedDiscount;discountAmount = preferredDiscount.discountAmount;- if (discountAmount < decimal.Zero)- discountAmount = decimal.Zero;+ if (discountAmount < 0)+ discountAmount = 0;if (_shoppingCartSettings.RoundPrices){@@ -295,15 +295,15 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="subTotalWithoutDiscount">Sub total (without discount)</param>/// <param name="subTotalWithDiscount">Sub total (with discount)</param>/// <param name="taxRates">Tax rates (of order sub total)</param>- public virtual async Task<(decimal discountAmount, List<ApplyDiscount> appliedDiscounts,- decimal subTotalWithoutDiscount, decimal subTotalWithDiscount, SortedDictionary<decimal, decimal> taxRates)>+ public virtual async Task<(double discountAmount, List<ApplyDiscount> appliedDiscounts,+ double subTotalWithoutDiscount, double subTotalWithDiscount, SortedDictionary<double, double> taxRates)>GetShoppingCartSubTotal(IList<ShoppingCartItem> cart, bool includingTax){- var discountAmount = decimal.Zero;+ double discountAmount = 0;var appliedDiscounts = new List<ApplyDiscount>();- var subTotalWithoutDiscount = decimal.Zero;- var subTotalWithDiscount = decimal.Zero;- var taxRates = new SortedDictionary<decimal, decimal>();+ double subTotalWithoutDiscount = 0;+ double subTotalWithDiscount = 0;+ var taxRates = new SortedDictionary<double, double>();if (!cart.Any())return (discountAmount, appliedDiscounts, subTotalWithoutDiscount, subTotalWithDiscount, taxRates);@@ -312,8 +312,8 @@ namespace Grand.Business.Checkout.Services.OrdersCustomer customer = _workContext.CurrentCustomer;//sub totals- decimal subTotalExclTaxWithoutDiscount = decimal.Zero;- decimal subTotalInclTaxWithoutDiscount = decimal.Zero;+ double subTotalExclTaxWithoutDiscount = 0;+ double subTotalInclTaxWithoutDiscount = 0;foreach (var shoppingCartItem in cart){var product = await _productService.GetProductById(shoppingCartItem.ProductId);@@ -321,22 +321,22 @@ namespace Grand.Business.Checkout.Services.Orderscontinue;var subtotal = await _pricingService.GetSubTotal(shoppingCartItem, product);- decimal sciSubTotal = subtotal.subTotal;+ double sciSubTotal = subtotal.subTotal;- decimal taxRate;+ double taxRate;var pricesExcl = await _taxService.GetProductPrice(product, sciSubTotal, false, customer);- decimal sciExclTax = pricesExcl.productprice;+ double sciExclTax = pricesExcl.productprice;var pricesIncl = await _taxService.GetProductPrice(product, sciSubTotal, true, customer);- decimal sciInclTax = pricesIncl.productprice;+ double sciInclTax = pricesIncl.productprice;taxRate = pricesIncl.taxRate;subTotalExclTaxWithoutDiscount += sciExclTax;subTotalInclTaxWithoutDiscount += sciInclTax;//tax rates- decimal sciTax = sciInclTax - sciExclTax;- if (taxRate > decimal.Zero && sciTax > decimal.Zero)+ double sciTax = sciInclTax - sciExclTax;+ if (taxRate > 0 && sciTax > 0){if (!taxRates.ContainsKey(taxRate)){@@ -356,12 +356,12 @@ namespace Grand.Business.Checkout.Services.Ordersvar attributeValues = await _checkoutAttributeParser.ParseCheckoutAttributeValue(checkoutAttributes);foreach (var attributeValue in attributeValues){- decimal taxRate;+ double taxRate;var checkoutAttributePriceExclTax = await _taxService.GetCheckoutAttributePrice(attributeValue.ca, attributeValue.cav, false, customer);- decimal caExclTax = await _currencyService.ConvertFromPrimaryStoreCurrency(checkoutAttributePriceExclTax.checkoutPrice, _workContext.WorkingCurrency);+ double caExclTax = await _currencyService.ConvertFromPrimaryStoreCurrency(checkoutAttributePriceExclTax.checkoutPrice, _workContext.WorkingCurrency);var checkoutAttributePriceInclTax = await _taxService.GetCheckoutAttributePrice(attributeValue.ca, attributeValue.cav, true, customer);- decimal caInclTax = await _currencyService.ConvertFromPrimaryStoreCurrency(checkoutAttributePriceInclTax.checkoutPrice, _workContext.WorkingCurrency);+ double caInclTax = await _currencyService.ConvertFromPrimaryStoreCurrency(checkoutAttributePriceInclTax.checkoutPrice, _workContext.WorkingCurrency);taxRate = checkoutAttributePriceInclTax.taxRate;@@ -369,8 +369,8 @@ namespace Grand.Business.Checkout.Services.OrderssubTotalInclTaxWithoutDiscount += caInclTax;//tax rates- decimal caTax = caInclTax - caExclTax;- if (taxRate > decimal.Zero && caTax > decimal.Zero)+ double caTax = caInclTax - caExclTax;+ if (taxRate > 0 && caTax > 0){if (!taxRates.ContainsKey(taxRate)){@@ -387,8 +387,8 @@ namespace Grand.Business.Checkout.Services.Orders//subtotal without discountsubTotalWithoutDiscount = includingTax ? subTotalInclTaxWithoutDiscount : subTotalExclTaxWithoutDiscount;- if (subTotalWithoutDiscount < decimal.Zero)- subTotalWithoutDiscount = decimal.Zero;+ if (subTotalWithoutDiscount < 0)+ subTotalWithoutDiscount = 0;if (_shoppingCartSettings.RoundPrices){@@ -397,29 +397,29 @@ namespace Grand.Business.Checkout.Services.Orders//We calculate discount amount on order subtotal excl tax (discount first)//calculate discount amount ('Applied to order subtotal' discount)var orderSubtotalDiscount = await GetOrderSubtotalDiscount(customer, _workContext.WorkingCurrency, subTotalExclTaxWithoutDiscount);- decimal discountAmountExclTax = orderSubtotalDiscount.ordersubtotaldiscount;+ double discountAmountExclTax = orderSubtotalDiscount.ordersubtotaldiscount;appliedDiscounts = orderSubtotalDiscount.appliedDiscounts;if (subTotalExclTaxWithoutDiscount < discountAmountExclTax)discountAmountExclTax = subTotalExclTaxWithoutDiscount;- decimal discountAmountInclTax = discountAmountExclTax;+ double discountAmountInclTax = discountAmountExclTax;//subtotal with discount (excl tax)- decimal subTotalExclTaxWithDiscount = subTotalExclTaxWithoutDiscount - discountAmountExclTax;- decimal subTotalInclTaxWithDiscount = subTotalExclTaxWithDiscount;+ double subTotalExclTaxWithDiscount = subTotalExclTaxWithoutDiscount - discountAmountExclTax;+ double subTotalInclTaxWithDiscount = subTotalExclTaxWithDiscount;//add tax for shopping items & checkout attributes- var tempTaxRates = new Dictionary<decimal, decimal>(taxRates);- foreach (KeyValuePair<decimal, decimal> kvp in tempTaxRates)+ var tempTaxRates = new Dictionary<double, double>(taxRates);+ foreach (KeyValuePair<double, double> kvp in tempTaxRates){- decimal taxRate = kvp.Key;- decimal taxValue = kvp.Value;+ double taxRate = kvp.Key;+ double taxValue = kvp.Value;- if (taxValue != decimal.Zero)+ if (taxValue != 0){//discount the tax amount that applies to subtotal items- if (subTotalExclTaxWithoutDiscount > decimal.Zero)+ if (subTotalExclTaxWithoutDiscount > 0){- decimal discountTax = taxRates[taxRate] * (discountAmountExclTax / subTotalExclTaxWithoutDiscount);+ double discountTax = taxRates[taxRate] * (discountAmountExclTax / subTotalExclTaxWithoutDiscount);discountAmountInclTax += discountTax;taxValue = taxRates[taxRate] - discountTax;if (_shoppingCartSettings.RoundPrices)@@ -449,8 +449,8 @@ namespace Grand.Business.Checkout.Services.OrdersdiscountAmount = discountAmountExclTax;}- if (subTotalWithDiscount < decimal.Zero)- subTotalWithDiscount = decimal.Zero;+ if (subTotalWithDiscount < 0)+ subTotalWithDiscount = 0;if (_shoppingCartSettings.RoundPrices)subTotalWithDiscount = RoundingHelper.RoundPrice(subTotalWithDiscount, _workContext.WorkingCurrency);@@ -464,13 +464,13 @@ namespace Grand.Business.Checkout.Services.Orders/// </summary>/// <param name="cart">Cart</param>/// <returns>Additional shipping charge</returns>- public virtual async Task<decimal> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart)+ public virtual async Task<double> GetShoppingCartAdditionalShippingCharge(IList<ShoppingCartItem> cart){- decimal additionalShippingCharge = decimal.Zero;+ double additionalShippingCharge = 0;bool isFreeShipping = await IsFreeShipping(cart);if (isFreeShipping)- return decimal.Zero;+ return 0;foreach (var sci in cart)if (sci.IsShipEnabled && !sci.IsFreeShipping)@@ -543,28 +543,28 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="cart">Cart</param>/// <param name="appliedDiscount">Applied discount</param>/// <returns>Adjusted shipping rate</returns>- public virtual async Task<(decimal shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(decimal shippingRate, IList<ShoppingCartItem> cart)+ public virtual async Task<(double shippingRate, List<ApplyDiscount> appliedDiscounts)> AdjustShippingRate(double shippingRate, IList<ShoppingCartItem> cart){var appliedDiscounts = new List<ApplyDiscount>();//free shippingif (await IsFreeShipping(cart))- return (decimal.Zero, appliedDiscounts);+ return (0, appliedDiscounts);//additional shipping charges- decimal additionalShippingCharge = await GetShoppingCartAdditionalShippingCharge(cart);+ double additionalShippingCharge = await GetShoppingCartAdditionalShippingCharge(cart);var adjustedRate = shippingRate + additionalShippingCharge;//discountvar customer = _workContext.CurrentCustomer;var shippingDiscount = await GetShippingDiscount(customer, _workContext.WorkingCurrency, adjustedRate);- decimal discountAmount = shippingDiscount.shippingDiscount;+ double discountAmount = shippingDiscount.shippingDiscount;appliedDiscounts = shippingDiscount.appliedDiscounts;adjustedRate -= discountAmount;- if (adjustedRate < decimal.Zero)- adjustedRate = decimal.Zero;+ if (adjustedRate < 0)+ adjustedRate = 0;if (_shoppingCartSettings.RoundPrices){@@ -579,7 +579,7 @@ namespace Grand.Business.Checkout.Services.Orders/// </summary>/// <param name="cart">Cart</param>/// <returns>Shipping total</returns>- public virtual async Task<(decimal? shoppingCartShippingTotal, decimal taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart)+ public virtual async Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart){bool includingTax = _workContext.TaxDisplayType == TaxDisplayType.IncludingTax;return await GetShoppingCartShippingTotal(cart, includingTax);@@ -594,19 +594,19 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="taxRate">Applied tax rate</param>/// <param name="appliedDiscount">Applied discount</param>/// <returns>Shipping total</returns>- public virtual async Task<(decimal? shoppingCartShippingTotal, decimal taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax)+ public virtual async Task<(double? shoppingCartShippingTotal, double taxRate, List<ApplyDiscount> appliedDiscounts)> GetShoppingCartShippingTotal(IList<ShoppingCartItem> cart, bool includingTax){- decimal? shippingTotal = null;- decimal? shippingTotalTaxed = null;+ double? shippingTotal = null;+ double? shippingTotalTaxed = null;var appliedDiscounts = new List<ApplyDiscount>();- var taxRate = decimal.Zero;+ double taxRate = 0;var customer = _workContext.CurrentCustomer;var currency = await _currencyService.GetPrimaryExchangeRateCurrency();bool isFreeShipping = await IsFreeShipping(cart);if (isFreeShipping)- return (decimal.Zero, taxRate, appliedDiscounts);+ return (0, taxRate, appliedDiscounts);ShippingOption shippingOption = null;if (customer != null)@@ -639,7 +639,7 @@ namespace Grand.Business.Checkout.Services.OrdersshippingAddress,_workContext.CurrentStore);- decimal? fixedRate = null;+ double? fixedRate = null;foreach (var shippingOptionRequest in shippingOptionRequests){//calculate fixed rates for each request-package@@ -647,7 +647,7 @@ namespace Grand.Business.Checkout.Services.Ordersif (fixedRateTmp.HasValue){if (!fixedRate.HasValue)- fixedRate = decimal.Zero;+ fixedRate = 0;fixedRate += fixedRateTmp.Value;}@@ -665,8 +665,8 @@ namespace Grand.Business.Checkout.Services.Ordersif (shippingTotal.HasValue){- if (shippingTotal.Value < decimal.Zero)- shippingTotal = decimal.Zero;+ if (shippingTotal.Value < 0)+ shippingTotal = 0;//roundif (_shoppingCartSettings.RoundPrices)@@ -691,12 +691,12 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="taxRates">Tax rates</param>/// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee when calculating tax</param>/// <returns>Tax total</returns>- public virtual async Task<(decimal taxtotal, SortedDictionary<decimal, decimal> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart, bool usePaymentMethodAdditionalFee = true)+ public virtual async Task<(double taxtotal, SortedDictionary<double, double> taxRates)> GetTaxTotal(IList<ShoppingCartItem> cart, bool usePaymentMethodAdditionalFee = true){if (cart == null)throw new ArgumentNullException(nameof(cart));- var taxRates = new SortedDictionary<decimal, decimal>();+ var taxRates = new SortedDictionary<double, double>();var customer = _workContext.CurrentCustomer;string paymentMethodSystemName = "";@@ -708,18 +708,18 @@ namespace Grand.Business.Checkout.Services.Orders}//order sub total (items + checkout attributes)- decimal subTotalTaxTotal = decimal.Zero;+ double subTotalTaxTotal = 0;var shoppingCartSubTotal = await GetShoppingCartSubTotal(cart, false);- SortedDictionary<decimal, decimal> orderSubTotalTaxRates = shoppingCartSubTotal.taxRates;+ SortedDictionary<double, double> orderSubTotalTaxRates = shoppingCartSubTotal.taxRates;- foreach (KeyValuePair<decimal, decimal> kvp in orderSubTotalTaxRates)+ foreach (KeyValuePair<double, double> kvp in orderSubTotalTaxRates){- decimal taxRate = kvp.Key;- decimal taxValue = kvp.Value;+ double taxRate = kvp.Key;+ double taxValue = kvp.Value;subTotalTaxTotal += taxValue;- if (taxRate > decimal.Zero && taxValue > decimal.Zero)+ if (taxRate > 0 && taxValue > 0){if (!taxRates.ContainsKey(taxRate))taxRates.Add(taxRate, taxValue);@@ -729,15 +729,15 @@ namespace Grand.Business.Checkout.Services.Orders}//shipping- decimal shippingTax = decimal.Zero;+ double shippingTax = 0;if (_taxSettings.ShippingIsTaxable){- decimal taxRate;+ double taxRate;var shippingTotalExcl = await GetShoppingCartShippingTotal(cart, false);- decimal? shippingExclTax = shippingTotalExcl.shoppingCartShippingTotal;+ double? shippingExclTax = shippingTotalExcl.shoppingCartShippingTotal;var shippingTotalIncl = await GetShoppingCartShippingTotal(cart, true);- decimal? shippingInclTax = shippingTotalIncl.shoppingCartShippingTotal;+ double? shippingInclTax = shippingTotalIncl.shoppingCartShippingTotal;taxRate = shippingTotalIncl.taxRate;@@ -745,11 +745,11 @@ namespace Grand.Business.Checkout.Services.Orders{shippingTax = shippingInclTax.Value - shippingExclTax.Value;//ensure that tax is equal or greater than zero- if (shippingTax < decimal.Zero)- shippingTax = decimal.Zero;+ if (shippingTax < 0)+ shippingTax = 0;//tax rates- if (taxRate > decimal.Zero && shippingTax > decimal.Zero)+ if (taxRate > 0 && shippingTax > 0){if (!taxRates.ContainsKey(taxRate))taxRates.Add(taxRate, shippingTax);@@ -760,27 +760,27 @@ namespace Grand.Business.Checkout.Services.Orders}//payment method additional fee- decimal paymentMethodAdditionalFeeTax = decimal.Zero;+ double paymentMethodAdditionalFeeTax = 0;if (usePaymentMethodAdditionalFee && _taxSettings.PaymentMethodAdditionalFeeIsTaxable){- decimal taxRate;- decimal paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(cart, paymentMethodSystemName);+ double taxRate;+ double paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(cart, paymentMethodSystemName);var additionalFeeExclTax = await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, false, customer);- decimal paymentMethodAdditionalFeeExclTax = additionalFeeExclTax.paymentPrice;+ double paymentMethodAdditionalFeeExclTax = additionalFeeExclTax.paymentPrice;var additionalFeeInclTax = await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, true, customer);- decimal paymentMethodAdditionalFeeInclTax = additionalFeeInclTax.paymentPrice;+ double paymentMethodAdditionalFeeInclTax = additionalFeeInclTax.paymentPrice;taxRate = additionalFeeInclTax.taxRate;paymentMethodAdditionalFeeTax = paymentMethodAdditionalFeeInclTax - paymentMethodAdditionalFeeExclTax;//ensure that tax is equal or greater than zero- if (paymentMethodAdditionalFeeTax < decimal.Zero)- paymentMethodAdditionalFeeTax = decimal.Zero;+ if (paymentMethodAdditionalFeeTax < 0)+ paymentMethodAdditionalFeeTax = 0;//tax rates- if (taxRate > decimal.Zero && paymentMethodAdditionalFeeTax > decimal.Zero)+ if (taxRate > 0 && paymentMethodAdditionalFeeTax > 0){if (!taxRates.ContainsKey(taxRate))taxRates.Add(taxRate, paymentMethodAdditionalFeeTax);@@ -791,13 +791,13 @@ namespace Grand.Business.Checkout.Services.Orders//add at least one tax rate (0%)if (!taxRates.Any())- taxRates.Add(decimal.Zero, decimal.Zero);+ taxRates.Add(0, 0);//summarize taxes- decimal taxTotal = subTotalTaxTotal + shippingTax + paymentMethodAdditionalFeeTax;+ double taxTotal = subTotalTaxTotal + shippingTax + paymentMethodAdditionalFeeTax;//ensure that tax is equal or greater than zero- if (taxTotal < decimal.Zero)- taxTotal = decimal.Zero;+ if (taxTotal < 0)+ taxTotal = 0;//round taxif (_shoppingCartSettings.RoundPrices){@@ -814,13 +814,13 @@ namespace Grand.Business.Checkout.Services.Orders/// <param name="ignoreLoyaltyPonts">A value indicating whether we should ignore loyalty points</param>/// <param name="usePaymentMethodAdditionalFee">A value indicating whether we should use payment method additional fee</param>/// <returns>Shopping cart total, discount amount, applied discounts, gift vouchers, loyalty point/amount</returns>- public virtual async Task<(decimal? shoppingCartTotal, decimal discountAmount, List<ApplyDiscount> appliedDiscounts, List<AppliedGiftVoucher> appliedGiftVouchers,- int redeemedLoyaltyPoints, decimal redeemedLoyaltyPointsAmount)>+ public virtual async Task<(double? shoppingCartTotal, double discountAmount, List<ApplyDiscount> appliedDiscounts, List<AppliedGiftVoucher> appliedGiftVouchers,+ int redeemedLoyaltyPoints, double redeemedLoyaltyPointsAmount)>GetShoppingCartTotal(IList<ShoppingCartItem> cart, bool? useLoyaltyPoints = null, bool usePaymentMethodAdditionalFee = true){var redeemedLoyaltyPoints = 0;- var redeemedLoyaltyPointsAmount = decimal.Zero;+ double redeemedLoyaltyPointsAmount = 0;var customer = _workContext.CurrentCustomer;@@ -834,17 +834,17 @@ namespace Grand.Business.Checkout.Services.Orders//subtotal without taxvar subTotal = await GetShoppingCartSubTotal(cart, false);- decimal subTotalWithDiscountBase = subTotal.subTotalWithDiscount;+ double subTotalWithDiscountBase = subTotal.subTotalWithDiscount;//subtotal with discount- decimal subtotalBase = subTotalWithDiscountBase;+ double subtotalBase = subTotalWithDiscountBase;//shipping without taxvar shippingTotal = await GetShoppingCartShippingTotal(cart, false);- decimal? shoppingCartShipping = shippingTotal.shoppingCartShippingTotal;+ double? shoppingCartShipping = shippingTotal.shoppingCartShippingTotal;//payment method additional fee without tax- decimal paymentMethodAdditionalFeeWithoutTax = decimal.Zero;+ double paymentMethodAdditionalFeeWithoutTax = 0;if (usePaymentMethodAdditionalFee && !string.IsNullOrEmpty(paymentMethodSystemName)){var paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(cart, paymentMethodSystemName);@@ -852,10 +852,10 @@ namespace Grand.Business.Checkout.Services.Orders}//tax- decimal shoppingCartTax = (await GetTaxTotal(cart, usePaymentMethodAdditionalFee)).taxtotal;+ double shoppingCartTax = (await GetTaxTotal(cart, usePaymentMethodAdditionalFee)).taxtotal;//order total- decimal resultTemp = decimal.Zero;+ double resultTemp = 0;resultTemp += subtotalBase;if (shoppingCartShipping.HasValue){@@ -880,8 +880,8 @@ namespace Grand.Business.Checkout.Services.Orders//reduce subtotalresultTemp -= discountAmount;- if (resultTemp < decimal.Zero)- resultTemp = decimal.Zero;+ if (resultTemp < 0)+ resultTemp = 0;if (_shoppingCartSettings.RoundPrices)resultTemp = RoundingHelper.RoundPrice(resultTemp, _workContext.WorkingCurrency);@@ -894,10 +894,10 @@ namespace Grand.Business.Checkout.Services.Ordersvar giftVouchers = await GetActiveGiftVouchers(customer, _workContext.WorkingCurrency);if (giftVouchers != null)foreach (var gc in giftVouchers)- if (resultTemp > decimal.Zero)+ if (resultTemp > 0){- decimal remainingAmount = gc.GetGiftVoucherRemainingAmount();- decimal amountCanBeUsed = resultTemp > remainingAmount ?+ double remainingAmount = gc.GetGiftVoucherRemainingAmount();+ double amountCanBeUsed = resultTemp > remainingAmount ?remainingAmount :resultTemp;@@ -914,8 +914,8 @@ namespace Grand.Business.Checkout.Services.Orders#endregion- if (resultTemp < decimal.Zero)- resultTemp = decimal.Zero;+ if (resultTemp < 0)+ resultTemp = 0;if (_shoppingCartSettings.RoundPrices)resultTemp = RoundingHelper.RoundPrice(resultTemp, _workContext.WorkingCurrency);@@ -925,7 +925,7 @@ namespace Grand.Business.Checkout.Services.Ordersreturn (null, discountAmount, appliedDiscounts, appliedGiftVouchers, redeemedLoyaltyPoints, redeemedLoyaltyPointsAmount);}- decimal orderTotal = resultTemp;+ double orderTotal = resultTemp;#region Loyalty points@@ -939,8 +939,8 @@ namespace Grand.Business.Checkout.Services.Ordersint loyaltyPointsBalance = await _loyaltyPointsService.GetLoyaltyPointsBalance(customer.Id, _workContext.CurrentStore.Id);if (CheckMinimumLoyaltyPointsToUseRequirement(loyaltyPointsBalance)){- decimal loyaltyPointsBalanceAmount = await ConvertLoyaltyPointsToAmount(loyaltyPointsBalance);- if (orderTotal > decimal.Zero)+ double loyaltyPointsBalanceAmount = await ConvertLoyaltyPointsToAmount(loyaltyPointsBalance);+ if (orderTotal > 0){if (orderTotal > loyaltyPointsBalanceAmount){@@ -971,10 +971,10 @@ namespace Grand.Business.Checkout.Services.Orders/// </summary>/// <param name="loyaltyPoints">Loyalty points</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertLoyaltyPointsToAmount(int loyaltyPoints)+ public virtual async Task<double> ConvertLoyaltyPointsToAmount(int loyaltyPoints){if (loyaltyPoints <= 0)- return decimal.Zero;+ return 0;var result = loyaltyPoints * _loyaltyPointsSettings.ExchangeRate;if (_shoppingCartSettings.RoundPrices)@@ -989,7 +989,7 @@ namespace Grand.Business.Checkout.Services.Orders/// </summary>/// <param name="amount">Amount</param>/// <returns>Converted value</returns>- public virtual int ConvertAmountToLoyaltyPoints(decimal amount)+ public virtual int ConvertAmountToLoyaltyPoints(double amount){int result = 0;if (amount <= 0)diff --git a/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartService.cs b/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartService.csindex 9e687f512..6122fb6eb 100644--- a/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartService.cs+++ b/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartService.cs@@ -106,7 +106,7 @@ namespace Grand.Business.Checkout.Services.Ordersstring productId,string warehouseId = null,IList<CustomAttribute> attributes = null,- decimal? customerEnteredPrice = null,+ double? customerEnteredPrice = null,DateTime? rentalStartDate = null,DateTime? rentalEndDate = null){@@ -191,7 +191,7 @@ namespace Grand.Business.Checkout.Services.Orderspublic virtual async Task<IList<string>> AddToCart(Customer customer, string productId,ShoppingCartType shoppingCartType, string storeId,string warehouseId = null, IList<CustomAttribute> attributes = null,- decimal? customerEnteredPrice = null,+ double? customerEnteredPrice = null,DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,int quantity = 1, bool automaticallyAddRequiredProductsIfEnabled = true,string reservationId = "", string parameter = "", string duration = "",@@ -425,7 +425,7 @@ namespace Grand.Business.Checkout.Services.Orders/// <returns>Warnings</returns>public virtual async Task<IList<string>> UpdateShoppingCartItem(Customer customer,string shoppingCartItemId, string warehouseId, IList<CustomAttribute> attributes,- decimal? customerEnteredPrice,+ double? customerEnteredPrice,DateTime? rentalStartDate = null, DateTime? rentalEndDate = null,int quantity = 1, bool resetCheckoutData = true, string reservationId = "", string sciId = ""){diff --git a/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartValidator.cs b/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartValidator.csindex da1b98c5c..5540207fe 100644--- a/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartValidator.cs+++ b/src/Business/Grand.Business.Checkout/Services/Orders/ShoppingCartValidator.cs@@ -141,8 +141,8 @@ namespace Grand.Business.Checkout.Services.Ordersif (shoppingCartItemEnteredPrice < product.MinEnteredPrice ||shoppingCartItemEnteredPrice > product.MaxEnteredPrice){- decimal minimumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MinEnteredPrice, _workContext.WorkingCurrency);- decimal maximumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MaxEnteredPrice, _workContext.WorkingCurrency);+ double minimumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MinEnteredPrice, _workContext.WorkingCurrency);+ double maximumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MaxEnteredPrice, _workContext.WorkingCurrency);warnings.Add(string.Format(_translationService.GetResource("ShoppingCart.CustomerEnteredPrice.RangeError"),_priceFormatter.FormatPrice(minimumCustomerEnteredPrice, false),_priceFormatter.FormatPrice(maximumCustomerEnteredPrice, false)));@@ -564,7 +564,7 @@ namespace Grand.Business.Checkout.Services.Ordersreturn warnings;}- public virtual IList<string> GetAuctionProductWarning(decimal bid, Product product, Customer customer)+ public virtual IList<string> GetAuctionProductWarning(double bid, Product product, Customer customer){var warnings = new List<string>();if (bid <= product.HighestBid || bid <= product.StartPrice)diff --git a/src/Business/Grand.Business.Checkout/Services/Payments/PaymentService.cs b/src/Business/Grand.Business.Checkout/Services/Payments/PaymentService.csindex 1841804b6..4766c86de 100644--- a/src/Business/Grand.Business.Checkout/Services/Payments/PaymentService.cs+++ b/src/Business/Grand.Business.Checkout/Services/Payments/PaymentService.cs@@ -209,7 +209,7 @@ namespace Grand.Business.Checkout.Services.Paymentsif (paymentTransaction == null)throw new ArgumentNullException(nameof(paymentTransaction));- if (paymentTransaction.TransactionAmount == decimal.Zero)+ if (paymentTransaction.TransactionAmount == 0){var result = new ProcessPaymentResult{@@ -251,7 +251,7 @@ namespace Grand.Business.Checkout.Services.Paymentsif (paymentTransaction == null)throw new ArgumentNullException(nameof(paymentTransaction));- //already paid or order.OrderTotal == decimal.Zero+ //already paid or order.OrderTotal == 0if (paymentTransaction.TransactionStatus == TransactionStatus.Paid)return;@@ -315,18 +315,18 @@ namespace Grand.Business.Checkout.Services.Payments/// <param name="cart">Shoping cart</param>/// <param name="paymentMethodSystemName">Payment method system name</param>/// <returns>Additional handling fee</returns>- public virtual async Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName)+ public virtual async Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart, string paymentMethodSystemName){if (String.IsNullOrEmpty(paymentMethodSystemName))- return decimal.Zero;+ return 0;var paymentMethod = LoadPaymentMethodBySystemName(paymentMethodSystemName);if (paymentMethod == null)- return decimal.Zero;+ return 0;- decimal result = await paymentMethod.GetAdditionalHandlingFee(cart);- if (result < decimal.Zero)- result = decimal.Zero;+ double result = await paymentMethod.GetAdditionalHandlingFee(cart);+ if (result < 0)+ result = 0;return result;}diff --git a/src/Business/Grand.Business.Checkout/Utilities/AppliedGiftVoucher.cs b/src/Business/Grand.Business.Checkout/Utilities/AppliedGiftVoucher.csindex e5bb1fcb9..4ee2a6b6c 100644--- a/src/Business/Grand.Business.Checkout/Utilities/AppliedGiftVoucher.cs+++ b/src/Business/Grand.Business.Checkout/Utilities/AppliedGiftVoucher.cs@@ -10,7 +10,7 @@ namespace Grand.Business.Checkout.Utilities/// <summary>/// Gets or sets the used value/// </summary>- public decimal AmountCanBeUsed { get; set; }+ public double AmountCanBeUsed { get; set; }/// <summary>/// Gets the gift voucherdiff --git a/src/Business/Grand.Business.Checkout/Utilities/PlaceOrderContainter.cs b/src/Business/Grand.Business.Checkout/Utilities/PlaceOrderContainter.csindex 73f0daa76..9f93ea3f5 100644--- a/src/Business/Grand.Business.Checkout/Utilities/PlaceOrderContainter.cs+++ b/src/Business/Grand.Business.Checkout/Utilities/PlaceOrderContainter.cs@@ -26,7 +26,7 @@ namespace Grand.Business.Checkout.Utilitiespublic Currency Currency { get; set; }public string AffiliateId { get; set; }public TaxDisplayType TaxDisplayType { get; set; }- public decimal CurrencyRate { get; set; }+ public double CurrencyRate { get; set; }public string PrimaryCurrencyCode { get; set; }public string PaymentMethodSystemName { get; set; }public Address BillingAddress { get; set; }@@ -47,19 +47,19 @@ namespace Grand.Business.Checkout.Utilitiespublic List<ApplyDiscount> AppliedDiscounts { get; set; }public List<AppliedGiftVoucher> AppliedGiftVouchers { get; set; }- public decimal OrderSubTotalInclTax { get; set; }- public decimal OrderSubTotalExclTax { get; set; }- public decimal OrderSubTotalDiscountInclTax { get; set; }- public decimal OrderSubTotalDiscountExclTax { get; set; }- public decimal OrderShippingTotalInclTax { get; set; }- public decimal OrderShippingTotalExclTax { get; set; }- public decimal PaymentAdditionalFeeInclTax { get; set; }- public decimal PaymentAdditionalFeeExclTax { get; set; }- public decimal OrderTaxTotal { get; set; }- public decimal OrderDiscountAmount { get; set; }+ public double OrderSubTotalInclTax { get; set; }+ public double OrderSubTotalExclTax { get; set; }+ public double OrderSubTotalDiscountInclTax { get; set; }+ public double OrderSubTotalDiscountExclTax { get; set; }+ public double OrderShippingTotalInclTax { get; set; }+ public double OrderShippingTotalExclTax { get; set; }+ public double PaymentAdditionalFeeInclTax { get; set; }+ public double PaymentAdditionalFeeExclTax { get; set; }+ public double OrderTaxTotal { get; set; }+ public double OrderDiscountAmount { get; set; }public int RedeemedLoyaltyPoints { get; set; }- public decimal RedeemedLoyaltyPointsAmount { get; set; }- public decimal OrderTotal { get; set; }+ public double RedeemedLoyaltyPointsAmount { get; set; }+ public double OrderTotal { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Utilities/ProcessPaymentResult.cs b/src/Business/Grand.Business.Checkout/Utilities/ProcessPaymentResult.csindex f1e5131b0..ca4fe3722 100644--- a/src/Business/Grand.Business.Checkout/Utilities/ProcessPaymentResult.cs+++ b/src/Business/Grand.Business.Checkout/Utilities/ProcessPaymentResult.cs@@ -59,6 +59,6 @@ namespace Grand.Business.Checkout.Utilities/// <summary>/// Gets or sets value paid amount/// </summary>- public decimal PaidAmount { get; set; }+ public double PaidAmount { get; set; }}}diff --git a/src/Business/Grand.Business.Checkout/Utilities/RefundPaymentRequest.cs b/src/Business/Grand.Business.Checkout/Utilities/RefundPaymentRequest.csindex 56abac6dc..42826e6d2 100644--- a/src/Business/Grand.Business.Checkout/Utilities/RefundPaymentRequest.cs+++ b/src/Business/Grand.Business.Checkout/Utilities/RefundPaymentRequest.cs@@ -15,7 +15,7 @@ namespace Grand.Business.Checkout.Utilities/// <summary>/// Gets or sets an amount/// </summary>- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }/// <summary>/// Gets or sets a value indicating whether it's a partial refund; otherwize, full refunddiff --git a/src/Business/Grand.Business.Common/Interfaces/Directory/ICurrencyService.cs b/src/Business/Grand.Business.Common/Interfaces/Directory/ICurrencyService.csindex 6248dcbed..14775d8b4 100644--- a/src/Business/Grand.Business.Common/Interfaces/Directory/ICurrencyService.cs+++ b/src/Business/Grand.Business.Common/Interfaces/Directory/ICurrencyService.cs@@ -68,7 +68,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="amount">Amount</param>/// <param name="exchangeRate">Currency exchange rate</param>/// <returns>Converted value</returns>- decimal ConvertCurrency(decimal amount, decimal exchangeRate);+ double ConvertCurrency(double amount, double exchangeRate);/// <summary>/// Converts currency@@ -77,7 +77,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="sourceCurrencyCode">Source currency code</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- Task<decimal> ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode);+ Task<double> ConvertCurrency(double amount, Currency sourceCurrencyCode, Currency targetCurrencyCode);/// <summary>/// Converts to primary exchange rate currency@@ -85,7 +85,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="amount">Amount</param>/// <param name="sourceCurrencyCode">Source currency code</param>/// <returns>Converted value</returns>- Task<decimal> ConvertToPrimaryExchangeRateCurrency(decimal amount, Currency sourceCurrencyCode);+ Task<double> ConvertToPrimaryExchangeRateCurrency(double amount, Currency sourceCurrencyCode);/// <summary>/// Converts from primary exchange rate currency@@ -93,7 +93,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="amount">Amount</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- Task<decimal> ConvertFromPrimaryExchangeRateCurrency(decimal amount, Currency targetCurrencyCode);+ Task<double> ConvertFromPrimaryExchangeRateCurrency(double amount, Currency targetCurrencyCode);/// <summary>/// Converts to primary store currency@@ -101,7 +101,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="amount">Amount</param>/// <param name="sourceCurrencyCode">Source currency code</param>/// <returns>Converted value</returns>- Task<decimal> ConvertToPrimaryStoreCurrency(decimal amount, Currency sourceCurrencyCode);+ Task<double> ConvertToPrimaryStoreCurrency(double amount, Currency sourceCurrencyCode);/// <summary>/// Converts from primary store currency@@ -109,6 +109,6 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="amount">Amount</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- Task<decimal> ConvertFromPrimaryStoreCurrency(decimal amount, Currency targetCurrencyCode);+ Task<double> ConvertFromPrimaryStoreCurrency(double amount, Currency targetCurrencyCode);}}\ No newline at end of filediff --git a/src/Business/Grand.Business.Common/Interfaces/Directory/IMeasureService.cs b/src/Business/Grand.Business.Common/Interfaces/Directory/IMeasureService.csindex ee5f2a7d5..a59f510fc 100644--- a/src/Business/Grand.Business.Common/Interfaces/Directory/IMeasureService.cs+++ b/src/Business/Grand.Business.Common/Interfaces/Directory/IMeasureService.cs@@ -56,7 +56,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="targetMeasureDimension">Target dimension</param>/// <param name="round">A value indicating whether a result should be rounded</param>/// <returns>Converted value</returns>- Task<decimal> ConvertDimension(decimal value,+ Task<double> ConvertDimension(double value,MeasureDimension sourceMeasureDimension, MeasureDimension targetMeasureDimension, bool round = true);/// <summary>@@ -65,7 +65,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="value">Value to convert</param>/// <param name="sourceMeasureDimension">Source dimension</param>/// <returns>Converted value</returns>- Task<decimal> ConvertToPrimaryMeasureDimension(decimal value,+ Task<double> ConvertToPrimaryMeasureDimension(double value,MeasureDimension sourceMeasureDimension);/// <summary>@@ -74,7 +74,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="value">Value to convert</param>/// <param name="targetMeasureDimension">Target dimension</param>/// <returns>Converted value</returns>- Task<decimal> ConvertFromPrimaryMeasureDimension(decimal value,+ Task<double> ConvertFromPrimaryMeasureDimension(double value,MeasureDimension targetMeasureDimension);@@ -124,7 +124,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="targetMeasureWeight">Target weight</param>/// <param name="round">A value indicating whether a result should be rounded</param>/// <returns>Converted value</returns>- Task<decimal> ConvertWeight(decimal value,+ Task<double> ConvertWeight(double value,MeasureWeight sourceMeasureWeight, MeasureWeight targetMeasureWeight, bool round = true);/// <summary>@@ -133,7 +133,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="value">Value to convert</param>/// <param name="sourceMeasureWeight">Source weight</param>/// <returns>Converted value</returns>- Task<decimal> ConvertToPrimaryMeasureWeight(decimal value, MeasureWeight sourceMeasureWeight);+ Task<double> ConvertToPrimaryMeasureWeight(double value, MeasureWeight sourceMeasureWeight);/// <summary>/// Converts from primary weight@@ -141,7 +141,7 @@ namespace Grand.Business.Common.Interfaces.Directory/// <param name="value">Value to convert</param>/// <param name="targetMeasureWeight">Target weight</param>/// <returns>Converted value</returns>- Task<decimal> ConvertFromPrimaryMeasureWeight(decimal value,+ Task<double> ConvertFromPrimaryMeasureWeight(double value,MeasureWeight targetMeasureWeight);/// <summary>diff --git a/src/Business/Grand.Business.Common/Services/Directory/CurrencyService.cs b/src/Business/Grand.Business.Common/Services/Directory/CurrencyService.csindex a724a4412..e9a517821 100644--- a/src/Business/Grand.Business.Common/Services/Directory/CurrencyService.cs+++ b/src/Business/Grand.Business.Common/Services/Directory/CurrencyService.cs@@ -199,11 +199,11 @@ namespace Grand.Business.Common.Services.Directory/// <param name="amount">Amount</param>/// <param name="exchangeRate">Currency exchange rate</param>/// <returns>Converted value</returns>- public virtual decimal ConvertCurrency(decimal amount, decimal exchangeRate)+ public virtual double ConvertCurrency(double amount, double exchangeRate){- if (amount != decimal.Zero && exchangeRate != decimal.Zero)+ if (amount != 0 && exchangeRate != 0)return amount * exchangeRate;- return decimal.Zero;+ return 0;}/// <summary>@@ -213,7 +213,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="sourceCurrencyCode">Source currency code</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode)+ public virtual async Task<double> ConvertCurrency(double amount, Currency sourceCurrencyCode, Currency targetCurrencyCode){if (sourceCurrencyCode == null)throw new ArgumentNullException(nameof(sourceCurrencyCode));@@ -223,7 +223,7 @@ namespace Grand.Business.Common.Services.Directoryvar result = amount;- if (result == decimal.Zero || sourceCurrencyCode.Id == targetCurrencyCode.Id)+ if (result == 0 || sourceCurrencyCode.Id == targetCurrencyCode.Id)return result;result = await ConvertToPrimaryExchangeRateCurrency(result, sourceCurrencyCode);@@ -239,7 +239,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="amount">Amount</param>/// <param name="sourceCurrencyCode">Source currency code</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertToPrimaryExchangeRateCurrency(decimal amount, Currency sourceCurrencyCode)+ public virtual async Task<double> ConvertToPrimaryExchangeRateCurrency(double amount, Currency sourceCurrencyCode){if (sourceCurrencyCode == null)throw new ArgumentNullException(nameof(sourceCurrencyCode));@@ -248,9 +248,9 @@ namespace Grand.Business.Common.Services.Directoryif (primaryExchangeRateCurrency == null)throw new Exception("Primary exchange rate currency cannot be loaded");- decimal result = amount;- decimal exchangeRate = sourceCurrencyCode.Rate;- if (exchangeRate == decimal.Zero)+ double result = amount;+ double exchangeRate = sourceCurrencyCode.Rate;+ if (exchangeRate == 0)throw new GrandException(string.Format("Exchange rate not found for currency [{0}]", sourceCurrencyCode.Name));result = result / exchangeRate;return result;@@ -262,7 +262,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="amount">Amount</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertFromPrimaryExchangeRateCurrency(decimal amount, Currency targetCurrencyCode)+ public virtual async Task<double> ConvertFromPrimaryExchangeRateCurrency(double amount, Currency targetCurrencyCode){if (targetCurrencyCode == null)throw new ArgumentNullException(nameof(targetCurrencyCode));@@ -271,10 +271,10 @@ namespace Grand.Business.Common.Services.Directoryif (primaryExchangeRateCurrency == null)throw new Exception("Primary exchange rate currency cannot be loaded");- decimal result = amount;+ double result = amount;- decimal exchangeRate = targetCurrencyCode.Rate;- if (exchangeRate == decimal.Zero)+ double exchangeRate = targetCurrencyCode.Rate;+ if (exchangeRate == 0)throw new GrandException(string.Format("Exchange rate not found for currency [{0}]", targetCurrencyCode.Name));result = result * exchangeRate;@@ -288,7 +288,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="amount">Amount</param>/// <param name="sourceCurrencyCode">Source currency code</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertToPrimaryStoreCurrency(decimal amount, Currency sourceCurrencyCode)+ public virtual async Task<double> ConvertToPrimaryStoreCurrency(double amount, Currency sourceCurrencyCode){if (sourceCurrencyCode == null)throw new ArgumentNullException(nameof(sourceCurrencyCode));@@ -305,7 +305,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="amount">Amount</param>/// <param name="targetCurrencyCode">Target currency code</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertFromPrimaryStoreCurrency(decimal amount, Currency targetCurrencyCode)+ public virtual async Task<double> ConvertFromPrimaryStoreCurrency(double amount, Currency targetCurrencyCode){if (targetCurrencyCode == null)return amount;diff --git a/src/Business/Grand.Business.Common/Services/Directory/MeasureService.cs b/src/Business/Grand.Business.Common/Services/Directory/MeasureService.csindex 4ca7072ee..df62a2798 100644--- a/src/Business/Grand.Business.Common/Services/Directory/MeasureService.cs+++ b/src/Business/Grand.Business.Common/Services/Directory/MeasureService.cs@@ -164,7 +164,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="targetMeasureDimension">Target dimension</param>/// <param name="round">A value indicating whether a result should be rounded</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertDimension(decimal value,+ public virtual async Task<double> ConvertDimension(double value,MeasureDimension sourceMeasureDimension, MeasureDimension targetMeasureDimension, bool round = true){if (sourceMeasureDimension == null)@@ -173,8 +173,8 @@ namespace Grand.Business.Common.Services.Directoryif (targetMeasureDimension == null)throw new ArgumentNullException(nameof(targetMeasureDimension));- decimal result = value;- if (result != decimal.Zero && sourceMeasureDimension.Id != targetMeasureDimension.Id)+ double result = value;+ if (result != 0 && sourceMeasureDimension.Id != targetMeasureDimension.Id){result = await ConvertToPrimaryMeasureDimension(result, sourceMeasureDimension);result = await ConvertFromPrimaryMeasureDimension(result, targetMeasureDimension);@@ -190,18 +190,18 @@ namespace Grand.Business.Common.Services.Directory/// <param name="value">Value to convert</param>/// <param name="sourceMeasureDimension">Source dimension</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertToPrimaryMeasureDimension(decimal value,+ public virtual async Task<double> ConvertToPrimaryMeasureDimension(double value,MeasureDimension sourceMeasureDimension){if (sourceMeasureDimension == null)throw new ArgumentNullException(nameof(sourceMeasureDimension));- decimal result = value;+ double result = value;var baseDimensionIn = await GetMeasureDimensionById(_measureSettings.BaseDimensionId);- if (result != decimal.Zero && sourceMeasureDimension.Id != baseDimensionIn.Id)+ if (result != 0 && sourceMeasureDimension.Id != baseDimensionIn.Id){- decimal exchangeRatio = sourceMeasureDimension.Ratio;- if (exchangeRatio == decimal.Zero)+ double exchangeRatio = sourceMeasureDimension.Ratio;+ if (exchangeRatio == 0)throw new GrandException(string.Format("Exchange ratio not set for dimension [{0}]", sourceMeasureDimension.Name));result = result / exchangeRatio;}@@ -214,18 +214,18 @@ namespace Grand.Business.Common.Services.Directory/// <param name="value">Value to convert</param>/// <param name="targetMeasureDimension">Target dimension</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertFromPrimaryMeasureDimension(decimal value,+ public virtual async Task<double> ConvertFromPrimaryMeasureDimension(double value,MeasureDimension targetMeasureDimension){if (targetMeasureDimension == null)throw new ArgumentNullException(nameof(targetMeasureDimension));- decimal result = value;+ double result = value;var baseDimensionIn = await GetMeasureDimensionById(_measureSettings.BaseDimensionId);- if (result != decimal.Zero && targetMeasureDimension.Id != baseDimensionIn.Id)+ if (result != 0 && targetMeasureDimension.Id != baseDimensionIn.Id){- decimal exchangeRatio = targetMeasureDimension.Ratio;- if (exchangeRatio == decimal.Zero)+ double exchangeRatio = targetMeasureDimension.Ratio;+ if (exchangeRatio == 0)throw new GrandException(string.Format("Exchange ratio not set for dimension [{0}]", targetMeasureDimension.Name));result = result * exchangeRatio;}@@ -339,7 +339,7 @@ namespace Grand.Business.Common.Services.Directory/// <param name="targetMeasureWeight">Target weight</param>/// <param name="round">A value indicating whether a result should be rounded</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertWeight(decimal value,+ public virtual async Task<double> ConvertWeight(double value,MeasureWeight sourceMeasureWeight, MeasureWeight targetMeasureWeight, bool round = true){if (sourceMeasureWeight == null)@@ -348,8 +348,8 @@ namespace Grand.Business.Common.Services.Directoryif (targetMeasureWeight == null)throw new ArgumentNullException(nameof(targetMeasureWeight));- decimal result = value;- if (result != decimal.Zero && sourceMeasureWeight.Id != targetMeasureWeight.Id)+ double result = value;+ if (result != 0 && sourceMeasureWeight.Id != targetMeasureWeight.Id){result = await ConvertToPrimaryMeasureWeight(result, sourceMeasureWeight);result = await ConvertFromPrimaryMeasureWeight(result, targetMeasureWeight);@@ -365,17 +365,17 @@ namespace Grand.Business.Common.Services.Directory/// <param name="value">Value to convert</param>/// <param name="sourceMeasureWeight">Source weight</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertToPrimaryMeasureWeight(decimal value, MeasureWeight sourceMeasureWeight)+ public virtual async Task<double> ConvertToPrimaryMeasureWeight(double value, MeasureWeight sourceMeasureWeight){if (sourceMeasureWeight == null)throw new ArgumentNullException(nameof(sourceMeasureWeight));- decimal result = value;+ double result = value;var baseWeightIn = await GetMeasureWeightById(_measureSettings.BaseWeightId);- if (result != decimal.Zero && sourceMeasureWeight.Id != baseWeightIn.Id)+ if (result != 0 && sourceMeasureWeight.Id != baseWeightIn.Id){- decimal exchangeRatio = sourceMeasureWeight.Ratio;- if (exchangeRatio == decimal.Zero)+ double exchangeRatio = sourceMeasureWeight.Ratio;+ if (exchangeRatio == 0)throw new GrandException(string.Format("Exchange ratio not set for weight [{0}]", sourceMeasureWeight.Name));result = result / exchangeRatio;}@@ -388,18 +388,18 @@ namespace Grand.Business.Common.Services.Directory/// <param name="value">Value to convert</param>/// <param name="targetMeasureWeight">Target weight</param>/// <returns>Converted value</returns>- public virtual async Task<decimal> ConvertFromPrimaryMeasureWeight(decimal value,+ public virtual async Task<double> ConvertFromPrimaryMeasureWeight(double value,MeasureWeight targetMeasureWeight){if (targetMeasureWeight == null)throw new ArgumentNullException(nameof(targetMeasureWeight));- decimal result = value;+ double result = value;var baseWeightIn = await GetMeasureWeightById(_measureSettings.BaseWeightId);- if (result != decimal.Zero && targetMeasureWeight.Id != baseWeightIn.Id)+ if (result != 0 && targetMeasureWeight.Id != baseWeightIn.Id){- decimal exchangeRatio = targetMeasureWeight.Ratio;- if (exchangeRatio == decimal.Zero)+ double exchangeRatio = targetMeasureWeight.Ratio;+ if (exchangeRatio == 0)throw new GrandException(string.Format("Exchange ratio not set for weight [{0}]", targetMeasureWeight.Name));result = result * exchangeRatio;}diff --git a/src/Business/Grand.Business.Marketing/Interfaces/Customers/ICustomerProductService.cs b/src/Business/Grand.Business.Marketing/Interfaces/Customers/ICustomerProductService.csindex 88035481d..3b1610dba 100644--- a/src/Business/Grand.Business.Marketing/Interfaces/Customers/ICustomerProductService.cs+++ b/src/Business/Grand.Business.Marketing/Interfaces/Customers/ICustomerProductService.cs@@ -24,7 +24,7 @@ namespace Grand.Business.Marketing.Interfaces.Customers/// <param name="customerId">Customer Identifier</param>/// <param name="productId">Product Identifier</param>/// <returns>Customer product price</returns>- Task<decimal?> GetPriceByCustomerProduct(string customerId, string productId);+ Task<double?> GetPriceByCustomerProduct(string customerId, string productId);/// <summary>/// Gets a customer productdiff --git a/src/Business/Grand.Business.Marketing/Services/Customers/CustomerProductService.cs b/src/Business/Grand.Business.Marketing/Services/Customers/CustomerProductService.csindex a64240cd4..d2dc4799e 100644--- a/src/Business/Grand.Business.Marketing/Services/Customers/CustomerProductService.cs+++ b/src/Business/Grand.Business.Marketing/Services/Customers/CustomerProductService.cs@@ -53,7 +53,7 @@ namespace Grand.Business.Marketing.Services.Customers/// <param name="customerId">Customer Identifier</param>/// <param name="productId">Product Identifier</param>/// <returns>Customer product price</returns>- public virtual async Task<decimal?> GetPriceByCustomerProduct(string customerId, string productId)+ public virtual async Task<double?> GetPriceByCustomerProduct(string customerId, string productId){var key = string.Format(CacheKey.CUSTOMER_PRODUCT_PRICE_KEY_ID, customerId, productId);var productprice = await _cacheBase.GetAsync(key, async () =>diff --git a/src/Business/Grand.Business.Marketing/Services/PushNotifications/PushNotificationsService.cs b/src/Business/Grand.Business.Marketing/Services/PushNotifications/PushNotificationsService.csindex 11c4525dd..80257e6a2 100644--- a/src/Business/Grand.Business.Marketing/Services/PushNotifications/PushNotificationsService.cs+++ b/src/Business/Grand.Business.Marketing/Services/PushNotifications/PushNotificationsService.cs@@ -160,7 +160,7 @@ namespace Grand.Business.Marketing.Services.PushNotifications}int batchsize = 1000;- for (int batch = 0; batch <= Math.Round((decimal)(receivers.Count / batchsize), 0, MidpointRounding.ToEven); batch++)+ for (int batch = 0; batch <= Math.Round((double)(receivers.Count / batchsize), 0, MidpointRounding.ToEven); batch++){var t = receivers.Skip(batch * batchsize).Take(batchsize);foreach (var receiver in receivers)diff --git a/src/Business/Grand.Business.Messages/Commands/Models/Tokens/GetOrderTokensCommand.cs b/src/Business/Grand.Business.Messages/Commands/Models/Tokens/GetOrderTokensCommand.csindex 544140155..2748811b8 100644--- a/src/Business/Grand.Business.Messages/Commands/Models/Tokens/GetOrderTokensCommand.cs+++ b/src/Business/Grand.Business.Messages/Commands/Models/Tokens/GetOrderTokensCommand.cs@@ -14,6 +14,6 @@ namespace Grand.Business.Messages.Commands.Modelspublic Store Store { get; set; }public OrderNote OrderNote { get; set; } = null;public Vendor Vendor { get; set; } = null;- public decimal RefundedAmount { get; set; } = 0;+ public double RefundedAmount { get; set; } = 0;}}diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.csindex d1a550db9..b68958e90 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidMerchandiseReturnItem.cs@@ -106,7 +106,7 @@ namespace Grand.Business.Messages.DotLiquidDropsreturn _item.RequestedAction;}}- public decimal UnitPriceWithoutDiscInclTax+ public double UnitPriceWithoutDiscInclTax{get{@@ -114,7 +114,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceWithoutDiscExclTax+ public double UnitPriceWithoutDiscExclTax{get{@@ -122,7 +122,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceInclTax+ public double UnitPriceInclTax{get{@@ -130,7 +130,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceExclTax+ public double UnitPriceExclTax{get{@@ -138,7 +138,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal PriceInclTax+ public double PriceInclTax{get{@@ -146,7 +146,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal PriceExclTax+ public double PriceExclTax{get{@@ -154,7 +154,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal DiscountAmountInclTax+ public double DiscountAmountInclTax{get{@@ -162,7 +162,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal DiscountAmountExclTax+ public double DiscountAmountExclTax{get{@@ -170,7 +170,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal OriginalProductCost+ public double OriginalProductCost{get{diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidObjectBuilder.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidObjectBuilder.csindex 95ec53114..b7948a3a3 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidObjectBuilder.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidObjectBuilder.cs@@ -51,7 +51,7 @@ namespace Grand.Business.Messages.DotLiquidDropsreturn this;}- public LiquidObjectBuilder AddOrderTokens(Order order, Customer customer, Store store, OrderNote orderNote = null, Vendor vendor = null, decimal refundedAmount = 0)+ public LiquidObjectBuilder AddOrderTokens(Order order, Customer customer, Store store, OrderNote orderNote = null, Vendor vendor = null, double refundedAmount = 0){_chain.Add(async liquidObject =>{diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrder.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrder.csindex a3f528efe..970525676 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrder.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrder.cs@@ -268,7 +268,7 @@ namespace Grand.Business.Messages.DotLiquidDrops{get{- return _order.PaymentMethodAdditionalFeeExclTax > decimal.Zero;+ return _order.PaymentMethodAdditionalFeeExclTax > 0;}}diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrderItem.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrderItem.csindex b342bf68e..38356e15a 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrderItem.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidOrderItem.cs@@ -175,7 +175,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceWithoutDiscInclTax+ public double UnitPriceWithoutDiscInclTax{get{@@ -183,7 +183,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceWithoutDiscExclTax+ public double UnitPriceWithoutDiscExclTax{get{@@ -191,7 +191,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceInclTax+ public double UnitPriceInclTax{get{@@ -199,7 +199,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal UnitPriceExclTax+ public double UnitPriceExclTax{get{@@ -207,7 +207,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal PriceInclTax+ public double PriceInclTax{get{@@ -215,7 +215,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal PriceExclTax+ public double PriceExclTax{get{@@ -223,7 +223,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal DiscountAmountInclTax+ public double DiscountAmountInclTax{get{@@ -231,7 +231,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal DiscountAmountExclTax+ public double DiscountAmountExclTax{get{@@ -239,7 +239,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal OriginalProductCost+ public double OriginalProductCost{get{@@ -279,7 +279,7 @@ namespace Grand.Business.Messages.DotLiquidDrops}}- public decimal? ItemWeight+ public double? ItemWeight{get{diff --git a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidProduct.cs b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidProduct.csindex 57084c021..ef0412465 100644--- a/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidProduct.cs+++ b/src/Business/Grand.Business.Messages/DotLiquidDrops/LiquidProduct.cs@@ -41,7 +41,7 @@ namespace Grand.Business.Messages.DotLiquidDropsget { return _product.Sku; }}- public decimal Price+ public double Price{get { return _product.Price; }}diff --git a/src/Business/Grand.Business.Messages/Interfaces/IMessageProviderService.cs b/src/Business/Grand.Business.Messages/Interfaces/IMessageProviderService.csindex 8fe8a5f93..5dd958751 100644--- a/src/Business/Grand.Business.Messages/Interfaces/IMessageProviderService.cs+++ b/src/Business/Grand.Business.Messages/Interfaces/IMessageProviderService.cs@@ -203,7 +203,7 @@ namespace Grand.Business.Messages.Interfaces/// <param name="refundedAmount">Amount refunded</param>/// <param name="languageId">Message language identifier</param>/// <returns>Queued email identifier</returns>- Task<int> SendOrderRefundedStoreOwnerMessage(Order order, decimal refundedAmount, string languageId);+ Task<int> SendOrderRefundedStoreOwnerMessage(Order order, double refundedAmount, string languageId);/// <summary>/// Sends an order refunded notification to a customer@@ -212,7 +212,7 @@ namespace Grand.Business.Messages.Interfaces/// <param name="refundedAmount">Amount refunded</param>/// <param name="languageId">Message language identifier</param>/// <returns>Queued email identifier</returns>- Task<int> SendOrderRefundedCustomerMessage(Order order, decimal refundedAmount, string languageId);+ Task<int> SendOrderRefundedCustomerMessage(Order order, double refundedAmount, string languageId);/// <summary>/// Sends a new order note added notification to a customerdiff --git a/src/Business/Grand.Business.Messages/Services/MessageProviderService.cs b/src/Business/Grand.Business.Messages/Services/MessageProviderService.csindex f959af9c3..afc987727 100644--- a/src/Business/Grand.Business.Messages/Services/MessageProviderService.cs+++ b/src/Business/Grand.Business.Messages/Services/MessageProviderService.cs@@ -295,7 +295,7 @@ namespace Grand.Business.Messages.Services/// <param name="refundedAmount">Amount refunded</param>/// <param name="languageId">Message language identifier</param>/// <returns>Queued email identifier</returns>- public virtual async Task<int> SendOrderRefundedStoreOwnerMessage(Order order, decimal refundedAmount, string languageId)+ public virtual async Task<int> SendOrderRefundedStoreOwnerMessage(Order order, double refundedAmount, string languageId){var customer = await _mediator.Send(new GetCustomerByIdQuery() { Id = order.CustomerId });return await SendOrderStoreOwnerMessage(MessageTemplateNames.SendOrderRefundedStoreOwnerMessage, order, customer, languageId, refundedAmount);@@ -308,7 +308,7 @@ namespace Grand.Business.Messages.Services/// <param name="customer">Customer instance</param>/// <param name="languageId">Message language identifier</param>/// <returns>Queued email identifier</returns>- private async Task<int> SendOrderStoreOwnerMessage(string template, Order order, Customer customer, string languageId, decimal refundedAmount = 0)+ private async Task<int> SendOrderStoreOwnerMessage(string template, Order order, Customer customer, string languageId, double refundedAmount = 0){if (order == null)throw new ArgumentNullException(nameof(order));@@ -408,7 +408,7 @@ namespace Grand.Business.Messages.Services/// <param name="refundedAmount">Amount refunded</param>/// <param name="languageId">Message language identifier</param>/// <returns>Queued email identifier</returns>- public virtual async Task<int> SendOrderRefundedCustomerMessage(Order order, decimal refundedAmount, string languageId)+ public virtual async Task<int> SendOrderRefundedCustomerMessage(Order order, double refundedAmount, string languageId){var customer = await _mediator.Send(new GetCustomerByIdQuery() { Id = order.CustomerId });return await SendOrderCustomerMessage(MessageTemplateNames.SendOrderRefundedCustomerMessage, order, customer, languageId, refundedAmount: refundedAmount);@@ -426,7 +426,7 @@ namespace Grand.Business.Messages.Services/// <param name="attachments">Attachments ident</param>/// <returns>Queued email identifier</returns>private async Task<int> SendOrderCustomerMessage(string message, Order order, Customer customer, string languageId,- string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null, decimal refundedAmount = 0)+ string attachmentFilePath = null, string attachmentFileName = null, IEnumerable<string> attachments = null, double refundedAmount = 0){if (order == null)throw new ArgumentNullException(nameof(order));diff --git a/src/Business/Grand.Business.System/Commands/Handlers/Messages/GetOrderTokensCommandHandler.cs b/src/Business/Grand.Business.System/Commands/Handlers/Messages/GetOrderTokensCommandHandler.csindex facc4b9bf..10a2b7cd2 100644--- a/src/Business/Grand.Business.System/Commands/Handlers/Messages/GetOrderTokensCommandHandler.cs+++ b/src/Business/Grand.Business.System/Commands/Handlers/Messages/GetOrderTokensCommandHandler.cs@@ -193,7 +193,7 @@ namespace Grand.Business.System.Commands.Handlers.Messages//subtotal_cusSubTotal = _priceFormatter.FormatPrice(request.Order.OrderSubtotalInclTax, currency, language, true);//discount (applied to order subtotal)- if (request.Order.OrderSubTotalDiscountInclTax > decimal.Zero)+ if (request.Order.OrderSubTotalDiscountInclTax > 0){_cusSubTotalDiscount = _priceFormatter.FormatPrice(-request.Order.OrderSubTotalDiscountInclTax, currency, language, true);_displaySubTotalDiscount = true;@@ -206,7 +206,7 @@ namespace Grand.Business.System.Commands.Handlers.Messages//subtotal_cusSubTotal = _priceFormatter.FormatPrice(request.Order.OrderSubtotalExclTax, currency, language, false);//discount (applied to order subtotal)- if (request.Order.OrderSubTotalDiscountExclTax > decimal.Zero)+ if (request.Order.OrderSubTotalDiscountExclTax > 0){_cusSubTotalDiscount = _priceFormatter.FormatPrice(-request.Order.OrderSubTotalDiscountExclTax, currency, language, false);_displaySubTotalDiscount = true;@@ -240,7 +240,7 @@ namespace Grand.Business.System.Commands.Handlers.Messagesbool displayShipping = request.Order.ShippingStatusId != ShippingStatus.ShippingNotRequired;//payment method fee- bool displayPaymentMethodFee = request.Order.PaymentMethodAdditionalFeeExclTax > decimal.Zero;+ bool displayPaymentMethodFee = request.Order.PaymentMethodAdditionalFeeExclTax > 0;//tax_displayTax = true;@@ -269,7 +269,7 @@ namespace Grand.Business.System.Commands.Handlers.Messages//discount_displayDiscount = false;- if (request.Order.OrderDiscount > decimal.Zero)+ if (request.Order.OrderDiscount > 0){_cusDiscount = _priceFormatter.FormatPrice(-request.Order.OrderDiscount, currency, language, request.Order.CustomerTaxDisplayTypeId == TaxDisplayType.IncludingTax, false);_displayDiscount = true;diff --git a/src/Business/Grand.Business.System/Interfaces/Reports/IOrderReportService.cs b/src/Business/Grand.Business.System/Interfaces/Reports/IOrderReportService.csindex 7f3c237b5..ae4fa902a 100644--- a/src/Business/Grand.Business.System/Interfaces/Reports/IOrderReportService.cs+++ b/src/Business/Grand.Business.System/Interfaces/Reports/IOrderReportService.cs@@ -160,7 +160,7 @@ namespace Grand.Business.System.Interfaces.Reports/// <param name="billingLastName">Billing last name. Leave empty to load all records.</param>/// <param name="tagid">tag ident</param>/// <returns>Result</returns>- Task<decimal> ProfitReport(string storeId = "", string customerId = "", string vendorId = "", string salesEmployeeId = "",+ Task<double> ProfitReport(string storeId = "", string customerId = "", string vendorId = "", string salesEmployeeId = "",string billingCountryId = "", string orderId = "", string paymentMethodSystemName = null,int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,DateTime? startTimeUtc = null, DateTime? endTimeUtc = null,diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataCurrencies.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataCurrencies.csindex d7248c419..f27e2e68e 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataCurrencies.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataCurrencies.cs@@ -31,7 +31,7 @@ namespace Grand.Business.System.Services.Installation{Name = "Euro",CurrencyCode = "EUR",- Rate = 0.95M,+ Rate = 0.95,DisplayLocale = "",CustomFormatting = string.Format("{0}0.00", "\u20ac"),NumberDecimal = 2,@@ -46,7 +46,7 @@ namespace Grand.Business.System.Services.Installation{Name = "British Pound",CurrencyCode = "GBP",- Rate = 0.82M,+ Rate = 0.82,DisplayLocale = "en-GB",CustomFormatting = "",NumberDecimal = 2,@@ -61,7 +61,7 @@ namespace Grand.Business.System.Services.Installation{Name = "Chinese Yuan Renminbi",CurrencyCode = "CNY",- Rate = 6.93M,+ Rate = 6.93,DisplayLocale = "zh-CN",CustomFormatting = "",NumberDecimal = 2,@@ -76,7 +76,7 @@ namespace Grand.Business.System.Services.Installation{Name = "Indian Rupee",CurrencyCode = "INR",- Rate = 68.17M,+ Rate = 68.17,DisplayLocale = "en-IN",CustomFormatting = "",NumberDecimal = 2,@@ -91,7 +91,7 @@ namespace Grand.Business.System.Services.Installation{Name = "Złoty",CurrencyCode = "PLN",- Rate = 3.97M,+ Rate = 3.97,DisplayLocale = "pl-PL",CustomFormatting = "",NumberDecimal = 2,diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataMeasures.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataMeasures.csindex 05fb0de0e..79a9bcf03 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataMeasures.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataMeasures.cs@@ -15,21 +15,21 @@ namespace Grand.Business.System.Services.Installation{Name = "centimetre(s)",SystemKeyword = "centimetres",- Ratio = 1M,+ Ratio = 1,DisplayOrder = 1,},new MeasureDimension{Name = "inch(es)",SystemKeyword = "inches",- Ratio = 0.393701M,+ Ratio = 0.393701,DisplayOrder = 2,},new MeasureDimension{Name = "feet",SystemKeyword = "feet",- Ratio = 0.0328084M,+ Ratio = 0.0328084,DisplayOrder = 3,}};@@ -42,28 +42,28 @@ namespace Grand.Business.System.Services.Installation{Name = "ounce(s)",SystemKeyword = "ounce",- Ratio = 16M,+ Ratio = 16,DisplayOrder = 1,},new MeasureWeight{Name = "lb(s)",SystemKeyword = "lb",- Ratio = 1M,+ Ratio = 1,DisplayOrder = 2,},new MeasureWeight{Name = "kg(s)",SystemKeyword = "kg",- Ratio = 0.45359237M,+ Ratio = 0.45359237,DisplayOrder = 3,},new MeasureWeight{Name = "gram(s)",SystemKeyword = "grams",- Ratio = 453.59237M,+ Ratio = 453.59237,DisplayOrder = 4,}};diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataProducts.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataProducts.csindex 31aa4b1b4..efce29179 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataProducts.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataProducts.cs@@ -63,7 +63,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Fight back against cluttered workspaces with the stylish DELL Inspiron desktop PC, featuring powerful computing resources and a stunning 20.1-inch widescreen display with stunning XBRITE-HiColor LCD technology. The black IBM zBC12 has a built-in microphone and MOTION EYE camera with face-tracking technology that allows for easy communication with friends and family. And it has a built-in DVD burner and Sony's Movie Store software so you can create a digital entertainment library for personal viewing at your convenience. Easy to setup and even easier to use, this JS-series All-in-One includes an elegantly designed keyboard and a USB mouse.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1200M,+ Price = 1200,IsShipEnabled = true,IsFreeShipping = true,Weight = 2,@@ -254,7 +254,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The DualSense wireless controller for PS5 offers realistic touch effects2, adaptive 'Trigger' effects and a built-in microphone - all integrated into an iconic design.</p><p>Feel a physical reaction to your in-game actions thanks to dual actuators that replace traditional vibration motors. Such dynamic vibrations in your hands can simulate the tactile sensations of many things, from the world around you to the recoil of various weapons.</p><p>Enjoy intuitive motion controls for selected games thanks to the built-in accelerometer and gyroscope.</p><p>Chat with friends online using the built-in microphone or by plugging a headset into the 3.5mm jack. With the dedicated MUTE button you can disable voice recording.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 59M,+ Price = 59,IsShipEnabled = true,Weight = 7,Length = 7,@@ -306,7 +306,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Get dependable performance for work and play from the Duet 3i’s Intel® Pentium® processor, which gives you the ability to effortlessly multitask with multi-screen capabilities, communicate easily with friends and family, and take all your favorite entertainment to go.</p><p>Work more freely on the elegant IdeaPad Duet 3i than on a regular laptop. The detachable Bluetooth keyboard allows you to easily switch between laptop and tablet modes, and the stand makes it easy to position your computer on any surface. The laptop runs on the power of an Intel® Pentium® processor, and the HD touchscreen, Dolby Audio ™ sound and optional LTE connectivity will keep you entertained anywhere.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 99M,+ Price = 99,IsShipEnabled = true,Weight = 7,Length = 7,@@ -360,8 +360,8 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Designed with utmost patience and craftsmanship, the Mi NoteBook 14 is so beautiful that you can't help but notice it. Weighing just 1.5kg, the sleek unibody metal chassis and an anodized sandblasted coating makes your device sturdy and gives it a slim look.</p><p>With the power-efficient NVIDIA® GeForce® MX250 graphics, now enjoy incredible HD photo and video editing, faster and smoother gaming. The powerful graphics engine and next-gen technologies gives you performance you desire.</p><p>The Mi Notebook 14 offers great clock speeds at 2666MHz, and thus makes you say goodbye to slow and insufficient memory. This helps you multi-task with your favorite editing/productivity tools and casual games.</p><p>Comes with a wider air intake area of 2530mm² and a large diameter fan which brings excellent cooling to the whole machine. This keeps your machine cool so that you can hold onto yours. The maximum sound of the fan is a mere 37 dB even when the system is loaded to its max.</p><p>Based on the scissor mechanism, the keys have ABS texture and a travel distance of 1.3mm which makes typing a lot more comfortable and low-profile on this device. The in-built dust protection layer is also an excellent addition.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1800M,- OldPrice = 2000M,+ Price = 1800,+ OldPrice = 2000,IsShipEnabled = true,IsFreeShipping = true,Weight = 3,@@ -442,7 +442,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The 17.3 ”Y740 Legion is a gaming masterpiece. You will be immersed in the action thanks to best-in-class Corsair iCUE lighting and Dolby realistic image and surround sound technologies. Check out what the Lenovo Legion Y740 looks like in reality.Grab the photo below and drag it left or right to rotate the product, or use the navigation buttons.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1500M,+ Price = 1500,IsShipEnabled = true,Weight = 7,Length = 7,@@ -528,7 +528,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Use the new Sony HD Camera for PlayStation 5 to show other players your reactions during the game. Equipped with two lenses, the camera can record images in 1080p quality and works seamlessly with the PS5 background removal tools. They put you in the spotlight of viewers. In addition, the camera has been equipped with a stand that makes it easy to mount it above or below the TV.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 150M,+ Price = 150,IsShipEnabled = true,Weight = 7,Length = 7,@@ -613,7 +613,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Experience a new dimension of gameplay with the Acer Nitro 5 laptop. Equipped with a powerful Intel Core i5 processor and GTX1050 graphics card, it is able to cope with even the most demanding tasks. Additionally, the matrix in IPS technology will ensure high quality of the displayed image, good color reproduction and wide viewing angles. The Acer Nitro 5 laptop is the perfect choice for both gaming and work. Dominate the virtual battlefield with the GeForce GTX 1050 graphics card, featuring the groundbreaking NVIDIA Pascal architecture. Excellent performance, innovative gaming technologies and support for DirectX 12 libraries will allow you to immerse yourself in phenomenal 4K resolution, enriched with HDR mode, or play in an amazingly realistic VR scenery. Every time without cuts or delays, every time on high details. Play the latest, most challenging games the way they deserve.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1350M,+ Price = 1350,IsShipEnabled = true,Weight = 7,Length = 7,@@ -699,7 +699,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "The Dell Inspiron G5 is a 15-inch gaming notebook with fantastic graphics capabilities, thanks to the NVIDIA® GeForce® GTX 1060 Max-Q graphics card, the latest 8th generation Intel® Core ™ i7 hexa-core processor and efficient DDR4 2666MHz RAM memory. The Inspiron G5 is designed specifically with the specific, demanding needs of gaming enthusiasts in mind.</p><p>The enormous performance, speed and dynamics of the eighth generation Intel Core i7 Coffee Lake processor is a guarantee of the highest performance in gaming and smooth operation with advanced applications. When more power is needed, Turbo Boost 2.0 technology intelligently speeds up the clock speed, unleashing the maximum potential of each CPU core. In addition, the unit flawlessly supports the highest definition video as well as spherical videos, while ensuring the security of transactions concluded on the network.</p><p>Play the latest, most demanding games with GeForce GTX 1060 Max-Q. Pull the sliders to the maximum and admire virtual worlds in 4K quality, enriched with HDR mode and DirectX 12 functions. All this with excellent smoothness of the image, without lag and clipping, thanks to the breakthrough architecture of Pascal GPU, packed with technologies for players.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1460M,+ Price = 1460,IsShipEnabled = true,Weight = 7,Length = 7,@@ -783,10 +783,10 @@ namespace Grand.Business.System.Services.InstallationVisibleIndividually = true,Name = "Dell XPS",ShortDescription = "Dell laptop with a screen size of 13.4 inches and a resolution of 1920 x 1200 pixels. It is equipped with an Intel Core i7-1065G7 processor with a clock frequency of 1.3 - 3.9 GHz, DDR4 RAM memory with a size of 16 GB. 1000 GB SSD hard drive. Intel HD Graphics.",- FullDescription = "<p>Dell laptop with a screen size of 13.4 inches and a resolution of 1920 x 1200 pixels. It is equipped with an Intel Core i7-1065G7 processor with a clock frequency of 1.3 - 3.9 GHz, DDR4 RAM memory with a size of 16 GB. 1000 GB SSD hard drive. Intel HD Graphics. Graphics card size shared with RAM, integrated. The installed operating system is Windows 10 Home.</p>",+ FullDescription = "<p>Dell laptop with a screen size of 13.4 inches and a resolution of 1920 x 1200 pixels. It is equipped with an Intel Core i7-1065G7 processor with a clock frequency of 1.3 - 3.9 GHz, DDR4 RAM memory with a size of 16 GB. 1000 GB SSD hard drive. Intel HD Graphics. Graphics card size shared with RA, integrated. The installed operating system is Windows 10 Home.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1360M,+ Price = 1360,IsShipEnabled = true,Weight = 7,Length = 7,@@ -861,7 +861,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Weighing just 1.16 kg, the Yoga Duet 7i is light and versatile enough to be used anywhere. The adjustable stand allows for more convenient and effective work, sketching or taking notes in laptop mode or at a lower angle. The detachable Bluetooth® keyboard allows you to write and look at the screen with even more freedom.</p><p>The Yoga Duet 7i is an advanced mobile device that is not only intuitive to use and easily personalized, but also uncompromisingly efficient. How is this possible? Powered by the 10th Gen Intel® Core ™ processor and artificial intelligence features that dynamically adjust power to optimize battery life. So it works for up to 10.8 hours on a single charge. It also has USB-C ports for faster charging.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 75M,+ Price = 75,IsShipEnabled = true,Weight = 2,Length = 2,@@ -912,7 +912,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The most versatile entertainment tablet now can do even more. Lenovo Yoga Smart Tab with Google Assistant is a development of the groundbreaking Yoga Tab 3 with a stand for working in various modes. This tablet offers high-end entertainment features such as an IPS display with FHD resolution and two JBL® stereo speakers. Additionally, it also acts as a digital home control center. The built-in LTE modem ensures permanent access to the Internet.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 65M,+ Price = 65,IsShipEnabled = true,Weight = 2,Length = 2,@@ -963,7 +963,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Explore exciting new virtual worlds with the ASUS Windows Mixed Reality Headset! It features a unique and beautiful 3D-pattern aesthetic and a comfy weight-balanced design with premium antibacterial cushioned materials, so it’s not only stylish but also supremely cool and comfortable for extended periods of exploring. Unlike other headsets, the ASUS Windows Mixed Reality Headset doesn’t need any external sensors, making initial set up super easy — you’ll be ready to play in 10 minutes or less*! It’s the revolutionary, easy-to-use and affordable way to explore your imagination.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 399M,+ Price = 399,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1018,7 +1018,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Auto-Portrait Technology Now the projector image can rotate automatically, just like on your phone! Equipped with Auto-Portrait technology, the C250i is the first model to be able to rotate the projected image in real time. There is no need to customize settings or content. Simply place the image vertically and the Acer C250i projector will remove intrusive black stripes by itself when you activate this mode. No stand, projecting from any angle The projector can be easily taken anywhere. The exclusive design does not take up much space and allows a 360-degree projection from any angle without using the stand. FHD Resolutions A beautiful 100-inch 1080p Full HD picture looks almost as realistic as the view from the window.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 530M,+ Price = 530,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1069,7 +1069,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Eliminate choppy gameplay and distracting visual tear with AMD Radeon FreeSync™1. Savor the smooth, responsive visuals as the monitor’s refresh rate is synched to your computer’s framerate.</p><p>Enjoy seamless, lag-free gaming with a blazingly fast 165Hz2 refresh rate. To keep pace with the action, the rapid 4ms response time provides clearer, more immersive images.</p><p>Take your gameplay to the next level with improved color accuracy and contrast guaranteed by this VESA Certified DisplayHDR™ 400 monitor. This industry standard specifies HDR quality, including luminance, color gamut, bit depth, and rise time.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 1300M,+ Price = 1300,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1124,7 +1124,7 @@ namespace Grand.Business.System.Services.InstallationProductLayoutId = productLayoutSimple.Id,Flag = "New",AllowCustomerReviews = true,- Price = 199M,+ Price = 199,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1173,7 +1173,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Redmi Note 9 is equipped with a high-performance octa-core processor with a maximum clock frequency of 2.0 GHz. The maximum GPU frequency of 1.0GHz ensures better performance and thus offers a smooth gaming experience.</p><p>Thanks to the improved 5020mAh battery, you can enjoy long work on a single charge. In combination with the 18W fast charge, you will get excellent results and charge the battery in no time.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 249M,+ Price = 249,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1225,7 +1225,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The speed demon is now even better. Powered by an octa-core trifecta processor with a liquid cooling system, it provides a perfect working experience. Quad Camera with Pro Mode support.</p><p>The technology of execution in 7nm provides a 25% increase in performance, improving the smoothness of graphics rendering, while significantly reducing energy consumption. Kryo 585 ™ processor | Adreno 650 ™ graphics processor</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 299M,+ Price = 299,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1278,7 +1278,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p><b>Mi Smart Band 3i:</b> Ignite your fitness journey with water resistant smart watch. Intuitive and Easy to View with large 0.78 inch OLED touch display. Get moving with the Fit App. Activity tracker and sleep tracker included.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 79.99M,+ Price = 79.99,IsShipEnabled = true,IsFreeShipping = true,Weight = 2,@@ -1352,7 +1352,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Meet the sleeker, smaller PS4 ™ that offers gamers an amazing gaming experience. The volume of the new PS4 is more than 30% smaller compared to previous console models, and its weight has been reduced by 25% and 16% respectively compared to the first (CUH-1000 series) and current (CUH-1200) versions of the PS4 ™.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 39M,+ Price = 39,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1403,7 +1403,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Rounded blades for skin - friendly performance. Advanced self - sharpening. With 2 combs that can go between 0.5mm and 20mm, this trimmer will perfectly sculpt your beard.Precision is at its finest with 6000 oscillations per min delivering accurate cuts and even shape.</p><p>IPX7 fully-washable body The whole body is hydro - resistant and fully washable for your convenience.Comes with detachable head.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 37M,+ Price = 37,IsShipEnabled = true,Weight = 7,Length = 7,@@ -1460,7 +1460,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Adidas Predator is the highest quality model of football boots. The special construction of the sole guarantees high flexibility and great adhesion, and the ingredients used to make the upper (synthetic material) ensure optimal weight of the shoe and adequate protection throughout the year. A feature of this model is also excellent vapor permeability - the moisture generated during the game is effectively expelled to the outside. The unique comfort and excellent foot support are due to the modern construction elements used by Adidas, which improve the player's features on the pitch. In Adidas footwear, the footballer turns into a ruthless predator. Thanks to the combination of modern technologies and great design, it is an excellent choice and fun to play.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 149M,+ Price = 149,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1564,7 +1564,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>One of three colorways of the adidas Consortium Campus 80s Primeknit set to drop alongside each other. This pair comes in light maroon and running white. Featuring a maroon-based primeknit upper with white accents. A limited release, look out for these at select adidas Consortium accounts worldwide.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 99M,+ Price = 99,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1702,7 +1702,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "Be unpredictable. Shoes designed for the youngest players starting their adventure with football. The sole is designed to provide perfect grip on artificial turf and hard or frozen surfaces. The X-SKIN INSPIRATION upper made of synthetic material will give a feeling of lightness and support while guiding the ball thanks to the convex texture. The heel stiffening will provide stability, and the textile inner lining will provide comfort and adequate cushioning. A profiled insole reflecting the anatomical shape of the foot and symmetrical lacing will keep the foot in the right position. The sole will allow for dynamic feints and changes in the direction of the run on artificial turf as well as hard or frozen surfaces.",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 89M,+ Price = 89,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1755,7 +1755,7 @@ namespace Grand.Business.System.Services.InstallationProductLayoutId = productLayoutGrouped.Id,AllowCustomerReviews = true,Published = true,- Price = 129.99M,+ Price = 129.99,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1803,7 +1803,7 @@ namespace Grand.Business.System.Services.InstallationProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,Published = true,- Price = 129.99M,+ Price = 129.99,IsShipEnabled = true,Flag = "Grouped",Weight = 2,@@ -1847,7 +1847,7 @@ namespace Grand.Business.System.Services.InstallationProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,Published = true,- Price = 149.99M,+ Price = 149.99,IsShipEnabled = true,Weight = 2,Length = 2,@@ -1892,7 +1892,7 @@ namespace Grand.Business.System.Services.InstallationProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,Published = true,- Price = 39M,+ Price = 39,IsShipEnabled = true,Weight = 1,Length = 2,@@ -1985,7 +1985,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>This oversized women t-Shirt needs minimum ironing. It is a great product at a great value!</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 99.99M,+ Price = 99.99,IsShipEnabled = true,Weight = 4,Length = 3,@@ -2054,7 +2054,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Show your pride and support and show off in The Rams Homemade Costumes.</p><p>This is an official t-shirt made according to The Rams homewear specification. The whole is decorated with the club badge and the Umbro Double Diamond logo.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 59M,+ Price = 59,IsShipEnabled = true,Weight = 4,Length = 3,@@ -2109,7 +2109,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Show your pride and support and show off in The Rams Homemade Costumes.</p><p>This is an official t-shirt made according to The Rams homewear specification. The whole is decorated with the club badge and the Umbro Double Diamond logo.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 29M,+ Price = 29,IsShipEnabled = true,Weight = 4,Length = 3,@@ -2154,7 +2154,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Show your pride and support and show off in The Rams Homemade Costumes.</p><p>This is an official t-shirt made according to The Rams homewear specification. The whole is decorated with the club badge and the Umbro Double Diamond logo.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 15M,+ Price = 15,IsShipEnabled = true,Weight = 4,Length = 3,@@ -2199,8 +2199,8 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Capture your team's distinct identity when you grab this custom Chicago Bulls jersey, It features classic trims and Chicago Bulls graphics along with Nike Dry and Dri-FIT technologies for added comfort. Before you watch the next game, grab this incredible jersey so everyone knows your fandom is on the cutting edge.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 43.5M,- OldPrice = 55M,+ Price = 43.5,+ OldPrice = 55,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2275,7 +2275,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>You no longer need to search for videos and advice on the web to know what to do while training. The Vívoactive watch offers easy-to-repeat animated cardio, strength, yoga and Pilates exercises that you can view on your watch screen. Choose from preloaded animated workouts or download more from the Garmin Connect ™ community site.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 30M,+ Price = 30,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2358,7 +2358,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Fēnix 2 combines the best features of our fitness watches with outdoor training watches. It is both a great navigation system and an ideal training partner in many different sports. Whether you're running, swimming, skiing, cycling or hiking in the mountains, fēnix 2 lets you easily switch between groups of settings optimized for each activity.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 45M,+ Price = 45,IsShipEnabled = true,Weight = 7,Length = 7,@@ -2410,7 +2410,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>This easy-to-use running watch is great for everyday runs, workouts and even pre-race training in a 10k run. Built-in GPS tracks your running route and provides accurate distance, pace and interval statistics. Its intuitive interface makes it easy to mark laps or pause the timer, even with sweaty hands. Forerunner 45 also monitors heart rate on the wrist during the day and while you sleep.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 25M,+ Price = 25,IsShipEnabled = true,Weight = 7,Length = 7,@@ -2480,7 +2480,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Cyberpunk 2077 is an open-world adventure set in Night City, a megalopolis ruled by an obsessive quest for power, fame and body remake. Your name is V and you must acquire a one-of-a-kind implant - the key to immortality. Create your own playstyle and set out to conquer the mighty city of the future, whose history is shaped by your decisions.</p><p>Become a cyberpunk, a freelance armed to the teeth, and become the legend of the most dangerous city of the future. Create your character from scratch. Take on the role of the outlaw Punk, freedom-loving Nomad or ruthless Corp.</p><p>Get the most powerful implant in Night City and take on those who shake the whole city. Follow Rockerboy Johnny Silverhand (played by Keanu Reeves) and change a world ruled by large corporations forever. And all this is accompanied by music from bands and creators such as Run the Jewels, Refused, Grimes, A $ AP Rocky, Gazelle Twin, Ilan Rubin, Richard Devine, Nina Kraviz, Deadly Hunta, Rat Boy and Tina Guo.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 69M,+ Price = 69,TaxCategoryId = _taxCategoryRepository.Table.Single(tc => tc.Name == "Downloadable Products").Id,ManageInventoryMethodId = ManageInventoryMethod.DontManageStock,StockQuantity = 10000,@@ -2547,7 +2547,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>When a young street hustler, a retired bank robber and a terrifying psychopath land themselves in trouble, they must pull off a series of dangerous heists to survive in a city in which they can trust nobody, least of all each other.</p><p>Launch business ventures from your Maze Bank West Executive Office, research powerful weapons technology from your underground Gunrunning Bunker and use your Counterfeit Cash Factory to start a lucrative counterfeiting operation.</p><p>Tear through the streets with a range of 10 high performance vehicles including a Supercar, Motorcycles, the weaponized Dune FAV, a Helicopter, a Rally Car and more. You’ll also get properties including a 10 car garage to store your growing fleet.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 49M,+ Price = 49,TaxCategoryId = _taxCategoryRepository.Table.Single(tc => tc.Name == "Downloadable Products").Id,ManageInventoryMethodId = ManageInventoryMethod.DontManageStock,StockQuantity = 10000,@@ -2606,7 +2606,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The iconic Black Ops series is back with Call of Duty®: Black Ops Cold War - the direct sequel to the original and fan-favorite Call of Duty®: Black Ops. Black Ops Cold War will drop fans into the depths of the Cold War’s volatile geopolitical battle of the early 1980s. Nothing is ever as it seems in a gripping single-player Campaign, where players will come face-to-face with historical figures and hard truths, as they battle around the globe through iconic locales like East Berlin, Vietnam, Turkey, Soviet KGB headquarters and more. As elite operatives, you will follow the trail of a shadowy figure named Perseus who is on a mission to destabilize the global balance of power and change the course of history. Descend into the dark center of this global conspiracy alongside iconic characters Woods, Mason and Hudson and a new cast of operatives attempting to stop a plot decades in the making. Beyond the Campaign, players will bring a Cold War arsenal of weapons and equipment into the next generation of Multiplayer and Zombies experiences.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 69M,+ Price = 69,TaxCategoryId = _taxCategoryRepository.Table.Single(tc => tc.Name == "Downloadable Products").Id,ManageInventoryMethodId = ManageInventoryMethod.DontManageStock,StockQuantity = 10000,@@ -2657,8 +2657,8 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Inspire kids and adults with the LEGO® Star Wars ™ 75257 Millennium Falcon model. The brick-built version of the iconic Corellian freighter features a variety of details, including a rotating lower and upper gun turret, 2 spring-loaded shooters, a lowering ramp and an opening cockpit with space for 2 minifigures. The top panels fold out to reveal a detailed interior where children will love to reenact scenes from Star Wars: Skywalker. Rebirth ”featuring characters from the“ Star Wars ”universe - Finn, Chewbakka, Lando Calrissian, Boolio, C-3PO, R2-D2 and D-O. This iconic set from the LEGO Star Wars series is a great addition to any fan's collection.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 109M,- OldPrice = 199M,+ Price = 109,+ OldPrice = 199,IsShipEnabled = true,IsFreeShipping = true,Weight = 2,@@ -2711,8 +2711,8 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Taste real magic at the LEGO® Harry Potter™ Hogwarts™ Castle! Unforgettable building satisfaction with this highly detailed LEGO Harry Potter collectible set with over 6,000 pieces. It is packed with elements from the Harry Potter series - you will find towers, turrets, chambers, classrooms, creatures, Whomping Willow ™, Hagrid's hut and many other signature details. Plus, with 4 minifigures and 27 microfigures of students, teachers, statues and 5 Dementors, this advanced construction toy set is the perfect gift for any Harry Potter fan.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 99M,- OldPrice = 149M,+ Price = 99,+ OldPrice = 149,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2762,8 +2762,8 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Everything is awesome about the LEGO® City Police Station (60246) playset. Little law enforcers and fans of the LEGO City TV series will love creating stories with a host of fun characters, including Duke DeTain, Chief Wheeler and Daisy Kaboom. </p><p>This fantastic set includes a police station with a light-brick searchlight and a police car with sound-brick siren, plus a cool truck, motorcycle and surveillance drone. A building toy with a little extra With this toy playset you get a simple building guide and Instructions.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 59M,- OldPrice = 99M,+ Price = 59,+ OldPrice = 99,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2817,7 +2817,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The Adidas Finale Top Capitano is a durable training ball with strong references to the UEFA Champions League. The ball is a replica of the model used in this year's Champions League group stage and is perfect for training and spontaneous games. The strong TPU coating has been machine-stitched to increase the durability of the ball. The ball's electrifying multicolored design shows the emotions of fans around the world as Europe's top teams compete for the highest honor.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 69M,+ Price = 69,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2864,7 +2864,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Made of high-quality synthetic leather (PU) A high-class ball based on the V200W match model. Solid and strong machine sewing.The 18 - panel, colorful design increases the visibility of the ball during the game.</p><p> Weight: 260 - 280g </p><p> Circumference: 65 - 67cm </p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 29.99M,+ Price = 29.99,IsShipEnabled = true,IsFreeShipping = true,Weight = 2,@@ -2911,7 +2911,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>The panels of leather, composite leather are attached to the rubber body by hand. This technique is used for indoor and indoor / outdoor balls. Balloon - the highest quality inner tube that maintains the pressure of the ball. A specialized nylon braid - nylon lines give the ball integrity and durability. Smooth body and channels for a softer feel and strength - optimized deep channel design for better grip and control. Composite leather cover - provides a good grip, feel and aesthetic appearance of the ball, as well as the necessary strength and resistance to abrasion. Composite leather has an advanced moisture management system to improve dry and wet grip.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 49M,+ Price = 49,IsShipEnabled = true,Weight = 2,Length = 2,@@ -2963,7 +2963,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Gift vouchers must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftVoucher balance. Any unused balance will be placed in the recipient's GiftVoucher account when redeemed. If an order exceeds the amount of the GiftVoucher, the balance must be paid with a credit card or other available payment method.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 25M,+ Price = 25,IsGiftVoucher = true,GiftVoucherTypeId = GiftVoucherType.Virtual,ManageInventoryMethodId = ManageInventoryMethod.DontManageStock,@@ -3003,7 +3003,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Gift vouchers must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftVoucher balance. Any unused balance will be placed in the recipient's GiftVoucher account when redeemed. If an order exceeds the amount of the GiftVoucher, the balance must be paid with a credit card or other available payment method.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 50M,+ Price = 50,IsGiftVoucher = true,GiftVoucherTypeId = GiftVoucherType.Physical,IsShipEnabled = true,@@ -3050,7 +3050,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Gift vouchers must be redeemed through our site Web site toward the purchase of eligible products. Purchases are deducted from the GiftVoucher balance. Any unused balance will be placed in the recipient's GiftVoucher account when redeemed. If an order exceeds the amount of the GiftVoucher, the balance must be paid with a credit card or other available payment method.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 100M,+ Price = 100,IsGiftVoucher = true,GiftVoucherTypeId = GiftVoucherType.Physical,IsShipEnabled = true,@@ -3094,7 +3094,7 @@ namespace Grand.Business.System.Services.InstallationFullDescription = "<p>Meet the sleeker, smaller PS4 ™ that offers gamers an amazing gaming experience. The volume of the new PS4 is more than 30% smaller compared to previous console models, and its weight has been reduced by 25% and 16% respectively compared to the first (CUH-1000 series) and current (CUH-1200) versions of the PS4 ™.</p>",ProductLayoutId = productLayoutSimple.Id,AllowCustomerReviews = true,- Price = 259M,+ Price = 259,IsShipEnabled = true,Flag = "Bundle Product",Weight = 2,diff --git a/src/Business/Grand.Business.System/Services/Installation/InstallDataSettings.cs b/src/Business/Grand.Business.System/Services/Installation/InstallDataSettings.csindex 171fbbc63..f40083165 100644--- a/src/Business/Grand.Business.System/Services/Installation/InstallDataSettings.cs+++ b/src/Business/Grand.Business.System/Services/Installation/InstallDataSettings.cs@@ -406,7 +406,7 @@ namespace Grand.Business.System.Services.Installationawait _settingService.SaveSetting(new ShippingSettings {AllowPickUpInStore = true,FreeShippingOverXEnabled = false,- FreeShippingOverXValue = decimal.Zero,+ FreeShippingOverXValue = 0,FreeShippingOverXIncludingTax = false,EstimateShippingEnabled = false,DisplayShipmentEventsToCustomers = false,diff --git a/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs b/src/Business/Grand.Business.System/Services/Reports/OrderReportService.csindex 3573227a3..6e612f2b4 100644--- a/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs+++ b/src/Business/Grand.Business.System/Services/Reports/OrderReportService.cs@@ -272,9 +272,9 @@ namespace Grand.Business.System.Services.Reportsvar item2 = query.Count() > 0 ? query.FirstOrDefault() : new OrderAverageReportLine {CountOrders = 0,- SumShippingExclTax = decimal.Zero,- SumTax = decimal.Zero,- SumOrders = decimal.Zero,+ SumShippingExclTax = 0,+ SumTax = 0,+ SumOrders = 0,};return await Task.FromResult(item2);}@@ -545,7 +545,7 @@ namespace Grand.Business.System.Services.Reports/// <param name="billingEmail">Billing email. Leave empty to load all records.</param>/// <param name="tagid">Tag ident.</param>/// <returns>Result</returns>- public virtual async Task<decimal> ProfitReport(string storeId = "", string customerId = "", string vendorId = "", string salesEmployeeId = "",+ public virtual async Task<double> ProfitReport(string storeId = "", string customerId = "", string vendorId = "", string salesEmployeeId = "",string billingCountryId = "", string orderId = "", string paymentMethodSystemName = null,int? os = null, PaymentStatus? ps = null, ShippingStatus? ss = null,DateTime? startTimeUtc = null, DateTime? endTimeUtc = null,@@ -624,7 +624,7 @@ namespace Grand.Business.System.Services.ReportsbillingEmail: billingEmail,tagid: tagid);- var profit = Convert.ToDecimal(reportSummary.SumOrders - reportSummary.SumShippingExclTax - reportSummary.SumTax - productCost);+ var profit = Convert.ToDouble(reportSummary.SumOrders - reportSummary.SumShippingExclTax - reportSummary.SumTax - productCost);return profit;}@@ -639,7 +639,7 @@ namespace Grand.Business.System.Services.Reportspublic int Month { get; set; }public int Day { get; set; }public int Count { get; set; }- public decimal Amount { get; set; }+ public double Amount { get; set; }}#endregiondiff --git a/src/Business/Grand.Business.System/Utilities/BestCustomerReportLine.cs b/src/Business/Grand.Business.System/Utilities/BestCustomerReportLine.csindex f68b94744..1744313da 100644--- a/src/Business/Grand.Business.System/Utilities/BestCustomerReportLine.cs+++ b/src/Business/Grand.Business.System/Utilities/BestCustomerReportLine.cs@@ -14,7 +14,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the order total/// </summary>- public decimal OrderTotal { get; set; }+ public double OrderTotal { get; set; }/// <summary>/// Gets or sets the order countdiff --git a/src/Business/Grand.Business.System/Utilities/BestsellersReportLine.cs b/src/Business/Grand.Business.System/Utilities/BestsellersReportLine.csindex 0b0326e16..b0b238499 100644--- a/src/Business/Grand.Business.System/Utilities/BestsellersReportLine.cs+++ b/src/Business/Grand.Business.System/Utilities/BestsellersReportLine.cs@@ -16,7 +16,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the total amount/// </summary>- public decimal TotalAmount { get; set; }+ public double TotalAmount { get; set; }/// <summary>/// Gets or sets the total quantitydiff --git a/src/Business/Grand.Business.System/Utilities/OrderAverageReportLine.cs b/src/Business/Grand.Business.System/Utilities/OrderAverageReportLine.csindex 1e170d1a4..735a4d165 100644--- a/src/Business/Grand.Business.System/Utilities/OrderAverageReportLine.cs+++ b/src/Business/Grand.Business.System/Utilities/OrderAverageReportLine.cs@@ -13,16 +13,16 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the shipping summary (excluding tax)/// </summary>- public decimal SumShippingExclTax { get; set; }+ public double SumShippingExclTax { get; set; }/// <summary>/// Gets or sets the tax summary/// </summary>- public decimal SumTax { get; set; }+ public double SumTax { get; set; }/// <summary>/// Gets or sets the order total summary/// </summary>- public decimal SumOrders { get; set; }+ public double SumOrders { get; set; }}}diff --git a/src/Business/Grand.Business.System/Utilities/OrderAverageReportLineSummary.cs b/src/Business/Grand.Business.System/Utilities/OrderAverageReportLineSummary.csindex 49f173e59..570fb38b5 100644--- a/src/Business/Grand.Business.System/Utilities/OrderAverageReportLineSummary.cs+++ b/src/Business/Grand.Business.System/Utilities/OrderAverageReportLineSummary.cs@@ -15,7 +15,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the sum today total/// </summary>- public decimal SumTodayOrders { get; set; }+ public double SumTodayOrders { get; set; }/// <summary>/// Gets or sets the today count@@ -25,7 +25,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the sum this week total/// </summary>- public decimal SumThisWeekOrders { get; set; }+ public double SumThisWeekOrders { get; set; }/// <summary>/// Gets or sets the this week count@@ -35,7 +35,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the sum this month total/// </summary>- public decimal SumThisMonthOrders { get; set; }+ public double SumThisMonthOrders { get; set; }/// <summary>/// Gets or sets the this month count@@ -45,7 +45,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the sum this year total/// </summary>- public decimal SumThisYearOrders { get; set; }+ public double SumThisYearOrders { get; set; }/// <summary>/// Gets or sets the this year count@@ -55,7 +55,7 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the sum all time total/// </summary>- public decimal SumAllTimeOrders { get; set; }+ public double SumAllTimeOrders { get; set; }/// <summary>/// Gets or sets the all time countdiff --git a/src/Business/Grand.Business.System/Utilities/OrderByCountryReportLine.cs b/src/Business/Grand.Business.System/Utilities/OrderByCountryReportLine.csindex 76639029a..27698dae1 100644--- a/src/Business/Grand.Business.System/Utilities/OrderByCountryReportLine.cs+++ b/src/Business/Grand.Business.System/Utilities/OrderByCountryReportLine.cs@@ -18,6 +18,6 @@ namespace Grand.Business.System.Utilities/// <summary>/// Gets or sets the order total summary/// </summary>- public decimal SumOrders { get; set; }+ public double SumOrders { get; set; }}}diff --git a/src/Business/Grand.Business.System/Utilities/OrderByTimeReportLine.cs b/src/Business/Grand.Business.System/Utilities/OrderByTimeReportLine.csindex c848a4250..58ef70bf6 100644--- a/src/Business/Grand.Business.System/Utilities/OrderByTimeReportLine.cs+++ b/src/Business/Grand.Business.System/Utilities/OrderByTimeReportLine.cs@@ -9,6 +9,6 @@ namespace Grand.Business.System.Utilitiespublic int TotalOrders { get; set; }- public decimal SumOrders { get; set; }+ public double SumOrders { get; set; }}}diff --git a/src/Business/Grand.Business.System/Utilities/PropertyByName.cs b/src/Business/Grand.Business.System/Utilities/PropertyByName.csindex 872c1e077..36657877c 100644--- a/src/Business/Grand.Business.System/Utilities/PropertyByName.cs+++ b/src/Business/Grand.Business.System/Utilities/PropertyByName.cs@@ -76,26 +76,26 @@ namespace Grand.Business.System.Utilities}/// <summary>- /// Converted property value to decimal+ /// Converted property value to double/// </summary>- public decimal DecimalValue+ public double DecimalValue{get{- if (PropertyValue == null || !decimal.TryParse(PropertyValue.ToString(), out var rez))+ if (PropertyValue == null || !double.TryParse(PropertyValue.ToString(), out var rez))return default;return rez;}}/// <summary>- /// Converted property value to decimal?+ /// Converted property value to double?/// </summary>- public decimal? DecimalValueNullable+ public double? DecimalValueNullable{get{- if (PropertyValue == null || !decimal.TryParse(PropertyValue.ToString(), out var rez))+ if (PropertyValue == null || !double.TryParse(PropertyValue.ToString(), out var rez))return null;return rez;}diff --git a/src/Business/Grand.Business.System/Utilities/ReportPeriodOrder.cs b/src/Business/Grand.Business.System/Utilities/ReportPeriodOrder.csindex 951654b2d..6b45b7e30 100644--- a/src/Business/Grand.Business.System/Utilities/ReportPeriodOrder.cs+++ b/src/Business/Grand.Business.System/Utilities/ReportPeriodOrder.cs@@ -6,6 +6,6 @@ namespace Grand.Business.System.Utilities{public DateTime Date { get; set; }public int Count { get; set; }- public decimal Amount { get; set; }+ public double Amount { get; set; }}}diff --git a/src/Core/Grand.Domain/Catalog/Bid.cs b/src/Core/Grand.Domain/Catalog/Bid.csindex df1c697b3..67461e416 100644--- a/src/Core/Grand.Domain/Catalog/Bid.cs+++ b/src/Core/Grand.Domain/Catalog/Bid.cs@@ -28,7 +28,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets Amount/// </summary>- public decimal Amount { get; set; }+ public double Amount { get; set; }/// <summary>/// Gets or sets Order Id/// </summary>diff --git a/src/Core/Grand.Domain/Catalog/PredefinedProductAttributeValue.cs b/src/Core/Grand.Domain/Catalog/PredefinedProductAttributeValue.csindex d1591303d..7334f9bb6 100644--- a/src/Core/Grand.Domain/Catalog/PredefinedProductAttributeValue.cs+++ b/src/Core/Grand.Domain/Catalog/PredefinedProductAttributeValue.cs@@ -21,17 +21,17 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the price adjustment/// </summary>- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }/// <summary>/// Gets or sets the weight adjustment/// </summary>- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }/// <summary>/// Gets or sets the attibute value cost/// </summary>- public decimal Cost { get; set; }+ public double Cost { get; set; }/// <summary>/// Gets or sets a value indicating whether the value is pre-selecteddiff --git a/src/Core/Grand.Domain/Catalog/Product.cs b/src/Core/Grand.Domain/Catalog/Product.csindex 1964ea9d4..6939763be 100644--- a/src/Core/Grand.Domain/Catalog/Product.cs+++ b/src/Core/Grand.Domain/Catalog/Product.cs@@ -169,7 +169,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets gift voucher amount that can be used after purchase. If not specified, then product price will be used./// </summary>- public decimal? OverGiftAmount { get; set; }+ public double? OverGiftAmount { get; set; }/// <summary>/// Gets or sets a value indicating whether the product requires that other products are added to the cart (Product X requires Product Y)/// </summary>@@ -267,7 +267,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the additional shipping charge/// </summary>- public decimal AdditionalShippingCharge { get; set; }+ public double AdditionalShippingCharge { get; set; }/// <summary>/// Gets or sets a delivery date identifier/// </summary>@@ -380,21 +380,21 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the price/// </summary>- public decimal Price { get; set; }+ public double Price { get; set; }/// <summary>/// Gets or sets the old price/// </summary>- public decimal OldPrice { get; set; }+ public double OldPrice { get; set; }/// <summary>/// Gets or sets the catalog price/// </summary>- public decimal CatalogPrice { get; set; }+ public double CatalogPrice { get; set; }/// <summary>/// Gets or sets the product cost/// </summary>- public decimal ProductCost { get; set; }+ public double ProductCost { get; set; }/// <summary>/// Gets or sets a value indicating whether a customer enters price@@ -403,11 +403,11 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the minimum price entered by a customer/// </summary>- public decimal MinEnteredPrice { get; set; }+ public double MinEnteredPrice { get; set; }/// <summary>/// Gets or sets the maximum price entered by a customer/// </summary>- public decimal MaxEnteredPrice { get; set; }+ public double MaxEnteredPrice { get; set; }/// <summary>/// Gets or sets a value indicating whether base price (PAngV) is enabled. Used by German users.@@ -416,7 +416,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets an amount in product for PAngV/// </summary>- public decimal BasepriceAmount { get; set; }+ public double BasepriceAmount { get; set; }/// <summary>/// Gets or sets a unit of product for PAngV (MeasureWeight entity)/// </summary>@@ -424,7 +424,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets a reference amount for PAngV/// </summary>- public decimal BasepriceBaseAmount { get; set; }+ public double BasepriceBaseAmount { get; set; }/// <summary>/// Gets or sets a reference unit for PAngV (MeasureWeight entity)/// </summary>@@ -456,19 +456,19 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the weight/// </summary>- public decimal Weight { get; set; }+ public double Weight { get; set; }/// <summary>/// Gets or sets the length/// </summary>- public decimal Length { get; set; }+ public double Length { get; set; }/// <summary>/// Gets or sets the width/// </summary>- public decimal Width { get; set; }+ public double Width { get; set; }/// <summary>/// Gets or sets the height/// </summary>- public decimal Height { get; set; }+ public double Height { get; set; }/// <summary>/// Gets or sets the available start date and time@@ -482,12 +482,12 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets auction start price/// </summary>- public decimal StartPrice { get; set; }+ public double StartPrice { get; set; }/// <summary>/// Gets or sets current highest bid/// </summary>- public decimal HighestBid { get; set; }+ public double HighestBid { get; set; }/// <summary>/// Gets or sets current highest bidder customer iddiff --git a/src/Core/Grand.Domain/Catalog/ProductAttributeCombination.cs b/src/Core/Grand.Domain/Catalog/ProductAttributeCombination.csindex 4aebcbaad..dc133f45d 100644--- a/src/Core/Grand.Domain/Catalog/ProductAttributeCombination.cs+++ b/src/Core/Grand.Domain/Catalog/ProductAttributeCombination.cs@@ -54,7 +54,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the attribute combination price. This way a store owner can override the default product price when this attribute combination is added to the cart. For example, you can give a discount this way./// </summary>- public decimal? OverriddenPrice { get; set; }+ public double? OverriddenPrice { get; set; }/// <summary>/// Gets or sets the quantity when admin should be notifieddiff --git a/src/Core/Grand.Domain/Catalog/ProductAttributeValue.cs b/src/Core/Grand.Domain/Catalog/ProductAttributeValue.csindex 386cfea72..f918849b5 100644--- a/src/Core/Grand.Domain/Catalog/ProductAttributeValue.cs+++ b/src/Core/Grand.Domain/Catalog/ProductAttributeValue.cs@@ -41,17 +41,17 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the price adjustment (used only with AttributeValueType.Simple)/// </summary>- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }/// <summary>/// Gets or sets the weight adjustment (used only with AttributeValueType.Simple)/// </summary>- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }/// <summary>/// Gets or sets the attibute value cost (used only with AttributeValueType.Simple)/// </summary>- public decimal Cost { get; set; }+ public double Cost { get; set; }/// <summary>/// Gets or sets the quantity of associated product (used only with AttributeValueType.AssociatedToProduct)diff --git a/src/Core/Grand.Domain/Catalog/ProductCombinationTierPrices.cs b/src/Core/Grand.Domain/Catalog/ProductCombinationTierPrices.csindex 4007fabd2..2bff05103 100644--- a/src/Core/Grand.Domain/Catalog/ProductCombinationTierPrices.cs+++ b/src/Core/Grand.Domain/Catalog/ProductCombinationTierPrices.cs@@ -23,7 +23,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the price/// </summary>- public decimal Price { get; set; }+ public double Price { get; set; }}}diff --git a/src/Core/Grand.Domain/Catalog/ProductPrice.cs b/src/Core/Grand.Domain/Catalog/ProductPrice.csindex bba14aba2..208e09a18 100644--- a/src/Core/Grand.Domain/Catalog/ProductPrice.cs+++ b/src/Core/Grand.Domain/Catalog/ProductPrice.cs@@ -4,6 +4,6 @@{public string ProductId { get; set; }public string CurrencyCode { get; set; }- public decimal Price { get; set; }+ public double Price { get; set; }}}diff --git a/src/Core/Grand.Domain/Catalog/TierPrice.cs b/src/Core/Grand.Domain/Catalog/TierPrice.csindex 4318acfee..829369fed 100644--- a/src/Core/Grand.Domain/Catalog/TierPrice.cs+++ b/src/Core/Grand.Domain/Catalog/TierPrice.cs@@ -31,7 +31,7 @@ namespace Grand.Domain.Catalog/// <summary>/// Gets or sets the price/// </summary>- public decimal Price { get; set; }+ public double Price { get; set; }/// <summary>/// Gets or sets the start date and time of the special price/// </summary>diff --git a/src/Core/Grand.Domain/Customers/CustomerGroup.cs b/src/Core/Grand.Domain/Customers/CustomerGroup.csindex 787328d86..688fb8a46 100644--- a/src/Core/Grand.Domain/Customers/CustomerGroup.cs+++ b/src/Core/Grand.Domain/Customers/CustomerGroup.cs@@ -49,12 +49,12 @@ namespace Grand.Domain.Customers/// <summary>/// Gets or sets a minimum order total amount/// </summary>- public decimal? MinOrderAmount { get; set; }+ public double? MinOrderAmount { get; set; }/// <summary>/// Gets or sets a maximum order total amount/// </summary>- public decimal? MaxOrderAmount { get; set; }+ public double? MaxOrderAmount { get; set; }}}\ No newline at end of filediff --git a/src/Core/Grand.Domain/Customers/CustomerProductPrice.cs b/src/Core/Grand.Domain/Customers/CustomerProductPrice.csindex c08da036d..3dde07bed 100644--- a/src/Core/Grand.Domain/Customers/CustomerProductPrice.cs+++ b/src/Core/Grand.Domain/Customers/CustomerProductPrice.cs@@ -4,6 +4,6 @@{public string CustomerId { get; set; }public string ProductId { get; set; }- public decimal Price { get; set; }+ public double Price { get; set; }}}diff --git a/src/Core/Grand.Domain/Customers/SalesEmployee.cs b/src/Core/Grand.Domain/Customers/SalesEmployee.csindex 54d657e0e..c1577bf6c 100644--- a/src/Core/Grand.Domain/Customers/SalesEmployee.cs+++ b/src/Core/Grand.Domain/Customers/SalesEmployee.cs@@ -25,7 +25,7 @@/// <summary>/// Gets or sets the commission rate/// </summary>- public decimal? Commission { get; set; }+ public double? Commission { get; set; }/// <summary>/// Gets or sets the display orderdiff --git a/src/Core/Grand.Domain/Data/Mongo/MongoDBMapperConfiguration.cs b/src/Core/Grand.Domain/Data/Mongo/MongoDBMapperConfiguration.csindex d61eae19b..a9a22f9b8 100644--- a/src/Core/Grand.Domain/Data/Mongo/MongoDBMapperConfiguration.cs+++ b/src/Core/Grand.Domain/Data/Mongo/MongoDBMapperConfiguration.cs@@ -16,8 +16,8 @@ namespace Grand.Domain.Data.Mongo/// </summary>public static void RegisterMongoDBMappings(){- BsonSerializer.RegisterSerializer(new DecimalSerializer(BsonType.Decimal128));- BsonSerializer.RegisterSerializer(typeof(decimal?), new NullableSerializer<decimal>(new DecimalSerializer(BsonType.Decimal128)));+ //BsonSerializer.RegisterSerializer(new DecimalSerializer(BsonType.Decimal128));+ //BsonSerializer.RegisterSerializer(typeof(double?), new NullableSerializer<double>(new DecimalSerializer(BsonType.Decimal128)));BsonSerializer.RegisterSerializer(typeof(DateTime), new BsonUtcDateTimeSerializer());BsonSerializer.RegisterSerializer(typeof(Dictionary<int, int>),diff --git a/src/Core/Grand.Domain/Directory/Currency.cs b/src/Core/Grand.Domain/Directory/Currency.csindex 2f8623300..33f1496ed 100644--- a/src/Core/Grand.Domain/Directory/Currency.cs+++ b/src/Core/Grand.Domain/Directory/Currency.cs@@ -28,7 +28,7 @@ namespace Grand.Domain.Directory/// <summary>/// Gets or sets the rate/// </summary>- public decimal Rate { get; set; }+ public double Rate { get; set; }/// <summary>/// Gets or sets the display locale@@ -67,7 +67,7 @@ namespace Grand.Domain.Directorypublic MidpointRounding MidpointRoundId { get; set; }/// <summary>- /// Gets or sets the number of decimal places (for RoundPrice)+ /// Gets or sets the number of double places (for RoundPrice)/// </summary>public int NumberDecimal { get; set; } = 2;diff --git a/src/Core/Grand.Domain/Directory/ExchangeRate.cs b/src/Core/Grand.Domain/Directory/ExchangeRate.csindex 9c59956f6..363ba3a8f 100644--- a/src/Core/Grand.Domain/Directory/ExchangeRate.cs+++ b/src/Core/Grand.Domain/Directory/ExchangeRate.cs@@ -13,7 +13,7 @@ namespace Grand.Domain.Directorypublic ExchangeRate(){CurrencyCode = string.Empty;- Rate = 1.0m;+ Rate = 1.0;}/// <summary>@@ -24,7 +24,7 @@ namespace Grand.Domain.Directory/// <summary>/// The conversion rate of this currency from the base currency/// </summary>- public decimal Rate { get; set; }+ public double Rate { get; set; }/// <summary>/// When was this exchange rate updated from the data source (the internet data xml feed)diff --git a/src/Core/Grand.Domain/Directory/MeasureDimension.cs b/src/Core/Grand.Domain/Directory/MeasureDimension.csindex 631a72c23..370691456 100644--- a/src/Core/Grand.Domain/Directory/MeasureDimension.cs+++ b/src/Core/Grand.Domain/Directory/MeasureDimension.cs@@ -18,7 +18,7 @@ namespace Grand.Domain.Directory/// <summary>/// Gets or sets the ratio/// </summary>- public decimal Ratio { get; set; }+ public double Ratio { get; set; }/// <summary>/// Gets or sets the display orderdiff --git a/src/Core/Grand.Domain/Directory/MeasureWeight.cs b/src/Core/Grand.Domain/Directory/MeasureWeight.csindex fb46a7f72..19ee51388 100644--- a/src/Core/Grand.Domain/Directory/MeasureWeight.cs+++ b/src/Core/Grand.Domain/Directory/MeasureWeight.cs@@ -18,7 +18,7 @@ namespace Grand.Domain.Directory/// <summary>/// Gets or sets the ratio/// </summary>- public decimal Ratio { get; set; }+ public double Ratio { get; set; }/// <summary>/// Gets or sets the display orderdiff --git a/src/Core/Grand.Domain/Discounts/Discount.cs b/src/Core/Grand.Domain/Discounts/Discount.csindex 9d2d1ed98..0d6e99c71 100644--- a/src/Core/Grand.Domain/Discounts/Discount.cs+++ b/src/Core/Grand.Domain/Discounts/Discount.cs@@ -34,12 +34,12 @@ namespace Grand.Domain.Discounts/// <summary>/// Gets or sets the discount percentage/// </summary>- public decimal DiscountPercentage { get; set; }+ public double DiscountPercentage { get; set; }/// <summary>/// Gets or sets the discount amount/// </summary>- public decimal DiscountAmount { get; set; }+ public double DiscountAmount { get; set; }/// <summary>/// Gets or sets the discount currency@@ -59,7 +59,7 @@ namespace Grand.Domain.Discounts/// <summary>/// Gets or sets the maximum discount amount (used with "UsePercentage")/// </summary>- public decimal? MaximumDiscountAmount { get; set; }+ public double? MaximumDiscountAmount { get; set; }/// <summary>/// Gets or sets the discount start date and timediff --git a/src/Core/Grand.Domain/Documents/Document.cs b/src/Core/Grand.Domain/Documents/Document.csindex b85da4eca..174a77cc4 100644--- a/src/Core/Grand.Domain/Documents/Document.cs+++ b/src/Core/Grand.Domain/Documents/Document.cs@@ -127,12 +127,12 @@ namespace Grand.Domain.Documents/// <summary>/// Gets or sets the total amount/// </summary>- public decimal TotalAmount { get; set; }+ public double TotalAmount { get; set; }/// <summary>/// Gets or sets the outstand amount/// </summary>- public decimal OutstandAmount { get; set; }+ public double OutstandAmount { get; set; }/// <summary>/// Gets or sets the quantitydiff --git a/src/Core/Grand.Domain/Orders/CheckoutAttributeValue.cs b/src/Core/Grand.Domain/Orders/CheckoutAttributeValue.csindex b4b9ce84d..4b1dc6886 100644--- a/src/Core/Grand.Domain/Orders/CheckoutAttributeValue.cs+++ b/src/Core/Grand.Domain/Orders/CheckoutAttributeValue.cs@@ -31,12 +31,12 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the price adjustment/// </summary>- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }/// <summary>/// Gets or sets the weight adjustment/// </summary>- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }/// <summary>/// Gets or sets a value indicating whether the value is pre-selecteddiff --git a/src/Core/Grand.Domain/Orders/GiftVoucher.cs b/src/Core/Grand.Domain/Orders/GiftVoucher.csindex 18c7159f5..8331abb09 100644--- a/src/Core/Grand.Domain/Orders/GiftVoucher.cs+++ b/src/Core/Grand.Domain/Orders/GiftVoucher.cs@@ -19,7 +19,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the amount/// </summary>- public decimal Amount { get; set; }+ public double Amount { get; set; }/// <summary>/// Gets or sets the currency codediff --git a/src/Core/Grand.Domain/Orders/GiftVoucherExtensions.cs b/src/Core/Grand.Domain/Orders/GiftVoucherExtensions.csindex 9798cfa10..58f2c9cfd 100644--- a/src/Core/Grand.Domain/Orders/GiftVoucherExtensions.cs+++ b/src/Core/Grand.Domain/Orders/GiftVoucherExtensions.cs@@ -11,15 +11,15 @@ namespace Grand.Domain.Orders/// Gets a gift voucher remaining amount/// </summary>/// <returns>Gift voucher remaining amount</returns>- public static decimal GetGiftVoucherRemainingAmount(this GiftVoucher giftVoucher)+ public static double GetGiftVoucherRemainingAmount(this GiftVoucher giftVoucher){- decimal result = giftVoucher.Amount;+ double result = giftVoucher.Amount;foreach (var gcuh in giftVoucher.GiftVoucherUsageHistory)result -= gcuh.UsedValue;- if (result < decimal.Zero)- result = decimal.Zero;+ if (result < 0)+ result = 0;return result;}@@ -40,8 +40,8 @@ namespace Grand.Domain.Ordersif(giftVoucher.ValidTo.HasValue && giftVoucher.ValidTo.Value <= System.DateTime.UtcNow)return false;- decimal remainingAmount = giftVoucher.GetGiftVoucherRemainingAmount();- if (remainingAmount > decimal.Zero)+ double remainingAmount = giftVoucher.GetGiftVoucherRemainingAmount();+ if (remainingAmount > 0)return true;return false;diff --git a/src/Core/Grand.Domain/Orders/GiftVoucherUsageHistory.cs b/src/Core/Grand.Domain/Orders/GiftVoucherUsageHistory.csindex 4afaf2b7f..3ab6d6201 100644--- a/src/Core/Grand.Domain/Orders/GiftVoucherUsageHistory.cs+++ b/src/Core/Grand.Domain/Orders/GiftVoucherUsageHistory.cs@@ -20,7 +20,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the used value (amount)/// </summary>- public decimal UsedValue { get; set; }+ public double UsedValue { get; set; }/// <summary>/// Gets or sets the date and time of instance creationdiff --git a/src/Core/Grand.Domain/Orders/LoyaltyPointsHistory.cs b/src/Core/Grand.Domain/Orders/LoyaltyPointsHistory.csindex ec757030f..14af29629 100644--- a/src/Core/Grand.Domain/Orders/LoyaltyPointsHistory.cs+++ b/src/Core/Grand.Domain/Orders/LoyaltyPointsHistory.cs@@ -29,7 +29,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the used amount/// </summary>- public decimal UsedAmount { get; set; }+ public double UsedAmount { get; set; }/// <summary>/// Gets or sets the messagediff --git a/src/Core/Grand.Domain/Orders/LoyaltyPointsSettings.cs b/src/Core/Grand.Domain/Orders/LoyaltyPointsSettings.csindex a23319f9f..ba35ae38f 100644--- a/src/Core/Grand.Domain/Orders/LoyaltyPointsSettings.cs+++ b/src/Core/Grand.Domain/Orders/LoyaltyPointsSettings.cs@@ -12,7 +12,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets a value of Loyalty Points exchange rate/// </summary>- public decimal ExchangeRate { get; set; }+ public double ExchangeRate { get; set; }/// <summary>/// Gets or sets the minimum loyalty points to use@@ -27,7 +27,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets a number of points awarded for purchases (amount in primary store currency)/// </summary>- public decimal PointsForPurchases_Amount { get; set; }+ public double PointsForPurchases_Amount { get; set; }/// <summary>/// Gets or sets a number of points awarded for purchasesdiff --git a/src/Core/Grand.Domain/Orders/Order.cs b/src/Core/Grand.Domain/Orders/Order.csindex 35a8ee98f..cb434ff0e 100644--- a/src/Core/Grand.Domain/Orders/Order.cs+++ b/src/Core/Grand.Domain/Orders/Order.cs@@ -93,12 +93,12 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the currency rate/// </summary>- public decimal CurrencyRate { get; set; }+ public double CurrencyRate { get; set; }/// <summary>/// Gets or sets the currency rate/// </summary>- public decimal Rate { get; set; }+ public double Rate { get; set; }/// <summary>/// Gets or sets the customer tax display type identifier@@ -138,62 +138,62 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the order subtotal (incl tax)/// </summary>- public decimal OrderSubtotalInclTax { get; set; }+ public double OrderSubtotalInclTax { get; set; }/// <summary>/// Gets or sets the order subtotal (excl tax)/// </summary>- public decimal OrderSubtotalExclTax { get; set; }+ public double OrderSubtotalExclTax { get; set; }/// <summary>/// Gets or sets the order subtotal discount (incl tax)/// </summary>- public decimal OrderSubTotalDiscountInclTax { get; set; }+ public double OrderSubTotalDiscountInclTax { get; set; }/// <summary>/// Gets or sets the order subtotal discount (excl tax)/// </summary>- public decimal OrderSubTotalDiscountExclTax { get; set; }+ public double OrderSubTotalDiscountExclTax { get; set; }/// <summary>/// Gets or sets the order shipping (incl tax)/// </summary>- public decimal OrderShippingInclTax { get; set; }+ public double OrderShippingInclTax { get; set; }/// <summary>/// Gets or sets the order shipping (excl tax)/// </summary>- public decimal OrderShippingExclTax { get; set; }+ public double OrderShippingExclTax { get; set; }/// <summary>/// Gets or sets the payment method additional fee (incl tax)/// </summary>- public decimal PaymentMethodAdditionalFeeInclTax { get; set; }+ public double PaymentMethodAdditionalFeeInclTax { get; set; }/// <summary>/// Gets or sets the payment method additional fee (excl tax)/// </summary>- public decimal PaymentMethodAdditionalFeeExclTax { get; set; }+ public double PaymentMethodAdditionalFeeExclTax { get; set; }/// <summary>/// Gets or sets the order tax/// </summary>- public decimal OrderTax { get; set; }+ public double OrderTax { get; set; }/// <summary>/// Gets or sets the order discount (applied to order total)/// </summary>- public decimal OrderDiscount { get; set; }+ public double OrderDiscount { get; set; }/// <summary>/// Gets or sets the order total/// </summary>- public decimal OrderTotal { get; set; }+ public double OrderTotal { get; set; }/// <summary>/// Gets or sets the paid amount/// </summary>- public decimal PaidAmount { get; set; }+ public double PaidAmount { get; set; }/// <summary>/// Gets or sets the paid date and time@@ -203,7 +203,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the refunded amount/// </summary>- public decimal RefundedAmount { get; set; }+ public double RefundedAmount { get; set; }/// <summary>/// Gets or sets the value indicating whether loyalty points were earned for this order@@ -212,7 +212,7 @@ namespace Grand.Domain.Orderspublic int RedeemedLoyaltyPoints { get; set; }- public decimal RedeemedLoyaltyPointsAmount { get; set; }+ public double RedeemedLoyaltyPointsAmount { get; set; }/// Gets or sets the value indicating for calculated loyalty pointspublic int CalcLoyaltyPoints { get; set; }diff --git a/src/Core/Grand.Domain/Orders/OrderItem.cs b/src/Core/Grand.Domain/Orders/OrderItem.csindex 9b57c5abc..c854a31d1 100644--- a/src/Core/Grand.Domain/Orders/OrderItem.cs+++ b/src/Core/Grand.Domain/Orders/OrderItem.cs@@ -67,7 +67,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the cancel amount/// </summary>- public decimal CancelAmount { get; set; }+ public double CancelAmount { get; set; }/// <summary>/// Gets or sets the return quantity@@ -82,52 +82,52 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the tax rate/// </summary>- public decimal TaxRate { get; set; }+ public double TaxRate { get; set; }/// <summary>/// Gets or sets the unit price without discount in primary store currency (incl tax)/// </summary>- public decimal UnitPriceWithoutDiscInclTax { get; set; }+ public double UnitPriceWithoutDiscInclTax { get; set; }/// <summary>/// Gets or sets the unit price without discount in primary store currency (excl tax)/// </summary>- public decimal UnitPriceWithoutDiscExclTax { get; set; }+ public double UnitPriceWithoutDiscExclTax { get; set; }/// <summary>/// Gets or sets the unit price in primary store currency (incl tax)/// </summary>- public decimal UnitPriceInclTax { get; set; }+ public double UnitPriceInclTax { get; set; }/// <summary>/// Gets or sets the unit price in primary store currency (excl tax)/// </summary>- public decimal UnitPriceExclTax { get; set; }+ public double UnitPriceExclTax { get; set; }/// <summary>/// Gets or sets the price in primary store currency (incl tax)/// </summary>- public decimal PriceInclTax { get; set; }+ public double PriceInclTax { get; set; }/// <summary>/// Gets or sets the price in primary store currency (excl tax)/// </summary>- public decimal PriceExclTax { get; set; }+ public double PriceExclTax { get; set; }/// <summary>/// Gets or sets the discount amount (incl tax)/// </summary>- public decimal DiscountAmountInclTax { get; set; }+ public double DiscountAmountInclTax { get; set; }/// <summary>/// Gets or sets the discount amount (excl tax)/// </summary>- public decimal DiscountAmountExclTax { get; set; }+ public double DiscountAmountExclTax { get; set; }/// <summary>/// Gets or sets the original cost of this order item (when an order was placed), qty 1/// </summary>- public decimal OriginalProductCost { get; set; }+ public double OriginalProductCost { get; set; }/// <summary>/// Gets or sets the attribute description@@ -154,7 +154,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the total weight of one item/// </summary>- public decimal? ItemWeight { get; set; }+ public double? ItemWeight { get; set; }/// <summary>/// Gets or sets the rental product start date (null if it's not a rental product)@@ -174,7 +174,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the vendor`s commission/// </summary>- public decimal Commission { get; set; }+ public double Commission { get; set; }}}\ No newline at end of filediff --git a/src/Core/Grand.Domain/Orders/OrderSettings.cs b/src/Core/Grand.Domain/Orders/OrderSettings.csindex 59e1d94d9..1befe28f6 100644--- a/src/Core/Grand.Domain/Orders/OrderSettings.cs+++ b/src/Core/Grand.Domain/Orders/OrderSettings.cs@@ -12,7 +12,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets a minimum order subtotal amount/// </summary>- public decimal MinOrderSubtotalAmount { get; set; }+ public double MinOrderSubtotalAmount { get; set; }/// <summary>/// Gets or sets a value indicating whether 'inimum order subtotal amount' option/// should be evaluated over 'X' value including tax or not@@ -22,7 +22,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets a minimum order total amount/// </summary>- public decimal MinOrderTotalAmount { get; set; }+ public double MinOrderTotalAmount { get; set; }/// <summary>/// Gets or sets a value indicating whether anonymous checkout alloweddiff --git a/src/Core/Grand.Domain/Orders/OrderTax.cs b/src/Core/Grand.Domain/Orders/OrderTax.csindex c034802e7..51f8875fa 100644--- a/src/Core/Grand.Domain/Orders/OrderTax.cs+++ b/src/Core/Grand.Domain/Orders/OrderTax.cs@@ -2,8 +2,8 @@{public class OrderTax : SubBaseEntity{- public decimal Percent { get; set; }+ public double Percent { get; set; }- public decimal Amount { get; set; }+ public double Amount { get; set; }}}diff --git a/src/Core/Grand.Domain/Orders/ShoppingCartItem.cs b/src/Core/Grand.Domain/Orders/ShoppingCartItem.csindex 787f3eef1..8a024da2d 100644--- a/src/Core/Grand.Domain/Orders/ShoppingCartItem.cs+++ b/src/Core/Grand.Domain/Orders/ShoppingCartItem.cs@@ -42,7 +42,7 @@ namespace Grand.Domain.Orders/// <summary>/// Gets or sets the price enter by a customer/// </summary>- public decimal? EnteredPrice { get; set; }+ public double? EnteredPrice { get; set; }/// <summary>/// Gets or sets the quantity@@ -84,12 +84,12 @@ namespace Grand.Domain.Orders/// </summary>public bool IsShipEnabled { get; set; }- public decimal AdditionalShippingChargeProduct { get; set; }+ public double AdditionalShippingChargeProduct { get; set; }/// <summary>/// Gets the additional shipping charge/// </summary>- public decimal AdditionalShippingCharge+ public double AdditionalShippingCharge{get{diff --git a/src/Core/Grand.Domain/Payments/PaymentTransaction.cs b/src/Core/Grand.Domain/Payments/PaymentTransaction.csindex fa76e8c59..4cbf9c1d1 100644--- a/src/Core/Grand.Domain/Payments/PaymentTransaction.cs+++ b/src/Core/Grand.Domain/Payments/PaymentTransaction.cs@@ -47,19 +47,19 @@ namespace Grand.Domain.Payments/// </summary>public string CurrencyCode { get; set; }- public decimal CurrencyRate { get; set; }+ public double CurrencyRate { get; set; }/// <summary>/// Gets or sets amount/// </summary>- public decimal TransactionAmount { get; set; }+ public double TransactionAmount { get; set; }- public decimal PaidAmount { get; set; }+ public double PaidAmount { get; set; }/// <summary>/// Gets or sets the refunded amount/// </summary>- public decimal RefundedAmount { get; set; }+ public double RefundedAmount { get; set; }/// <summary>/// Gets or sets id transactiondiff --git a/src/Core/Grand.Domain/Shipping/PickupPoints.cs b/src/Core/Grand.Domain/Shipping/PickupPoints.csindex b94d00bc8..71556fd1f 100644--- a/src/Core/Grand.Domain/Shipping/PickupPoints.cs+++ b/src/Core/Grand.Domain/Shipping/PickupPoints.cs@@ -40,7 +40,7 @@ namespace Grand.Domain.Shipping/// <summary>/// Gets or sets the pickup fee/// </summary>- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }/// <summary>/// Gets or sets the latitude of the GeoCoordinate.diff --git a/src/Core/Grand.Domain/Shipping/Shipment.cs b/src/Core/Grand.Domain/Shipping/Shipment.csindex 23674e61c..3d7ef0898 100644--- a/src/Core/Grand.Domain/Shipping/Shipment.cs+++ b/src/Core/Grand.Domain/Shipping/Shipment.cs@@ -38,7 +38,7 @@ namespace Grand.Domain.Shipping/// <summary>/// Gets or sets the total weight of this shipment/// </summary>- public decimal? TotalWeight { get; set; }+ public double? TotalWeight { get; set; }/// <summary>/// Gets or sets the shipped date and timediff --git a/src/Core/Grand.Domain/Shipping/ShippingOption.cs b/src/Core/Grand.Domain/Shipping/ShippingOption.csindex 1598b47e1..80dbacb75 100644--- a/src/Core/Grand.Domain/Shipping/ShippingOption.cs+++ b/src/Core/Grand.Domain/Shipping/ShippingOption.cs@@ -13,7 +13,7 @@ namespace Grand.Domain.Shipping/// <summary>/// Gets or sets a shipping rate (without discounts, additional shipping charges, etc)/// </summary>- public decimal Rate { get; set; }+ public double Rate { get; set; }/// <summary>/// Gets or sets a shipping option namediff --git a/src/Core/Grand.Domain/Shipping/ShippingSettings.cs b/src/Core/Grand.Domain/Shipping/ShippingSettings.csindex 05879eb44..788303cec 100644--- a/src/Core/Grand.Domain/Shipping/ShippingSettings.cs+++ b/src/Core/Grand.Domain/Shipping/ShippingSettings.cs@@ -18,7 +18,7 @@ namespace Grand.Domain.Shipping/// <summary>/// Gets or sets a value of 'Free shipping over X' option/// </summary>- public decimal FreeShippingOverXValue { get; set; }+ public double FreeShippingOverXValue { get; set; }/// <summary>/// Gets or sets a value indicating whether 'Free shipping over X' optiondiff --git a/src/Core/Grand.Domain/Vendors/Vendor.cs b/src/Core/Grand.Domain/Vendors/Vendor.csindex a223df46d..f60c3971d 100644--- a/src/Core/Grand.Domain/Vendors/Vendor.cs+++ b/src/Core/Grand.Domain/Vendors/Vendor.cs@@ -126,7 +126,7 @@ namespace Grand.Domain.Vendors/// <summary>/// Gets or sets the commission rate/// </summary>- public decimal? Commission { get; set; }+ public double? Commission { get; set; }/// <summary>/// Gets or sets the vendor addressdiff --git a/src/Core/Grand.Infrastructure/TypeConverters/WebTypeConverter.cs b/src/Core/Grand.Infrastructure/TypeConverters/WebTypeConverter.csindex df9f41327..05685f03c 100644--- a/src/Core/Grand.Infrastructure/TypeConverters/WebTypeConverter.cs+++ b/src/Core/Grand.Infrastructure/TypeConverters/WebTypeConverter.cs@@ -12,7 +12,7 @@ namespace Grand.Infrastructure.TypeConverterspublic void Register(){TypeDescriptor.AddAttributes(typeof(List<int>), new TypeConverterAttribute(typeof(GenericListTypeConverter<int>)));- TypeDescriptor.AddAttributes(typeof(List<decimal>), new TypeConverterAttribute(typeof(GenericListTypeConverter<decimal>)));+ TypeDescriptor.AddAttributes(typeof(List<double>), new TypeConverterAttribute(typeof(GenericListTypeConverter<double>)));TypeDescriptor.AddAttributes(typeof(List<string>), new TypeConverterAttribute(typeof(GenericListTypeConverter<string>)));TypeDescriptor.AddAttributes(typeof(bool), new TypeConverterAttribute(typeof(BoolTypeConverter)));diff --git a/src/Plugins/DiscountRules.Standard/Controllers/HadSpentAmountController.cs b/src/Plugins/DiscountRules.Standard/Controllers/HadSpentAmountController.csindex 715c173c6..cd04c94da 100644--- a/src/Plugins/DiscountRules.Standard/Controllers/HadSpentAmountController.cs+++ b/src/Plugins/DiscountRules.Standard/Controllers/HadSpentAmountController.cs@@ -62,7 +62,7 @@ namespace DiscountRules.Standard.HadSpentAmount.Controllers[HttpPost][AutoValidateAntiforgeryToken]- public async Task<IActionResult> Configure(string discountId, string discountRequirementId, decimal spentAmount)+ public async Task<IActionResult> Configure(string discountId, string discountRequirementId, double spentAmount){if (!await _permissionService.Authorize(StandardPermission.ManageDiscounts))return Content("Access denied");diff --git a/src/Plugins/DiscountRules.Standard/Controllers/ShoppingCartAmountController.cs b/src/Plugins/DiscountRules.Standard/Controllers/ShoppingCartAmountController.csindex 1f31d79be..771dae94b 100644--- a/src/Plugins/DiscountRules.Standard/Controllers/ShoppingCartAmountController.cs+++ b/src/Plugins/DiscountRules.Standard/Controllers/ShoppingCartAmountController.cs@@ -62,7 +62,7 @@ namespace DiscountRules.Standard.Controllers[HttpPost]- public async Task<IActionResult> Configure(string discountId, string discountRequirementId, decimal spentAmount)+ public async Task<IActionResult> Configure(string discountId, string discountRequirementId, double spentAmount){if (!await _permissionService.Authorize(StandardPermission.ManageDiscounts))return Content("Access denied");diff --git a/src/Plugins/DiscountRules.Standard/Models/RequirementHadSpentAmount.cs b/src/Plugins/DiscountRules.Standard/Models/RequirementHadSpentAmount.csindex 362e287a6..f487fce65 100644--- a/src/Plugins/DiscountRules.Standard/Models/RequirementHadSpentAmount.cs+++ b/src/Plugins/DiscountRules.Standard/Models/RequirementHadSpentAmount.cs@@ -2,6 +2,6 @@{public class RequirementHadSpentAmount{- public decimal SpentAmount { get; set; }+ public double SpentAmount { get; set; }}}diff --git a/src/Plugins/DiscountRules.Standard/Models/RequirementModel.cs b/src/Plugins/DiscountRules.Standard/Models/RequirementModel.csindex f271dcbd1..612db0dab 100644--- a/src/Plugins/DiscountRules.Standard/Models/RequirementModel.cs+++ b/src/Plugins/DiscountRules.Standard/Models/RequirementModel.cs@@ -29,7 +29,7 @@ namespace DiscountRules.Standard.HadSpentAmount.Modelspublic class RequirementModel{[GrandResourceDisplayName("Plugins.DiscountRules.Standard.HadSpentAmount.Fields.Amount")]- public decimal SpentAmount { get; set; }+ public double SpentAmount { get; set; }public string DiscountId { get; set; }@@ -154,7 +154,7 @@ namespace Grand.Plugin.DiscountRules.ShoppingCart.Modelspublic class RequirementModel{[GrandResourceDisplayName("Plugins.DiscountRules.ShoppingCart.Fields.Amount")]- public decimal SpentAmount { get; set; }+ public double SpentAmount { get; set; }public string DiscountId { get; set; }diff --git a/src/Plugins/DiscountRules.Standard/Models/RequirementSpentAmount.cs b/src/Plugins/DiscountRules.Standard/Models/RequirementSpentAmount.csindex e3d10c167..ef8e87208 100644--- a/src/Plugins/DiscountRules.Standard/Models/RequirementSpentAmount.cs+++ b/src/Plugins/DiscountRules.Standard/Models/RequirementSpentAmount.cs@@ -2,6 +2,6 @@{public class RequirementSpentAmount{- public decimal SpentAmount { get; set; }+ public double SpentAmount { get; set; }}}diff --git a/src/Plugins/DiscountRules.Standard/Providers/HadSpentAmountDiscountRule.cs b/src/Plugins/DiscountRules.Standard/Providers/HadSpentAmountDiscountRule.csindex d439b4af8..ac5f0c0fb 100644--- a/src/Plugins/DiscountRules.Standard/Providers/HadSpentAmountDiscountRule.cs+++ b/src/Plugins/DiscountRules.Standard/Providers/HadSpentAmountDiscountRule.cs@@ -40,7 +40,7 @@ namespace DiscountRules.Providervar spentAmountRequirement = _settingService.GetSettingByKey<RequirementHadSpentAmount>(string.Format("DiscountRules.Standard.HadSpentAmount-{0}-{1}", request.DiscountId, request.DiscountRequirementId));- if (spentAmountRequirement == null || spentAmountRequirement.SpentAmount == decimal.Zero)+ if (spentAmountRequirement == null || spentAmountRequirement.SpentAmount == 0){//validresult.IsValid = true;@@ -53,7 +53,7 @@ namespace DiscountRules.Providervar orders = await _orderService.SearchOrders(storeId: request.Store.Id,customerId: request.Customer.Id,os: (int)OrderStatusSystem.Complete);- decimal spentAmount = orders.Sum(o => o.OrderTotal);+ double spentAmount = orders.Sum(o => o.OrderTotal);if (spentAmount > spentAmountRequirement.SpentAmount){result.IsValid = true;diff --git a/src/Plugins/DiscountRules.Standard/Providers/ShoppingCartDiscountRule.cs b/src/Plugins/DiscountRules.Standard/Providers/ShoppingCartDiscountRule.csindex ced7bc063..81cf29612 100644--- a/src/Plugins/DiscountRules.Standard/Providers/ShoppingCartDiscountRule.cs+++ b/src/Plugins/DiscountRules.Standard/Providers/ShoppingCartDiscountRule.cs@@ -50,7 +50,7 @@ namespace DiscountRules.Providervar spentAmountRequirement = _settingService.GetSettingByKey<RequirementSpentAmount>(string.Format("DiscountRequirement.ShoppingCart-{0}", request.DiscountRequirementId));- if (spentAmountRequirement == null || spentAmountRequirement.SpentAmount == decimal.Zero)+ if (spentAmountRequirement == null || spentAmountRequirement.SpentAmount == 0){result.IsValid = true;return result;@@ -65,7 +65,7 @@ namespace DiscountRules.Providerresult.IsValid = false;return result;}- decimal spentAmount = 0;+ double spentAmount = 0;var priceCalculationService = _serviceProvider.GetRequiredService<IPricingService>();diff --git a/src/Plugins/ExchangeRate.McExchange/EcbExchange.cs b/src/Plugins/ExchangeRate.McExchange/EcbExchange.csindex da7b9a3cb..50aea1fe3 100644--- a/src/Plugins/ExchangeRate.McExchange/EcbExchange.cs+++ b/src/Plugins/ExchangeRate.McExchange/EcbExchange.cs@@ -33,7 +33,7 @@ namespace Grand.Plugin.ExchangeRate.McExchangeexchangeRates.Add(new Domain.Directory.ExchangeRate(){CurrencyCode = node2.Attributes["currency"].Value,- Rate = decimal.Parse(node2.Attributes["rate"].Value, provider),+ Rate = double.Parse(node2.Attributes["rate"].Value, provider),UpdatedOn = updateDate});diff --git a/src/Plugins/ExchangeRate.McExchange/NbpExchange.cs b/src/Plugins/ExchangeRate.McExchange/NbpExchange.csindex d7d440c03..cca423e27 100644--- a/src/Plugins/ExchangeRate.McExchange/NbpExchange.cs+++ b/src/Plugins/ExchangeRate.McExchange/NbpExchange.cs@@ -36,10 +36,10 @@ namespace Grand.Plugin.ExchangeRate.McExchangevar exchangeRates = new List<Domain.Directory.ExchangeRate>();foreach (XmlNode node2 in ratesNode.ChildNodes){- var rate = decimal.Parse(node2.SelectSingleNode("Mid").InnerText, provider);+ var rate = double.Parse(node2.SelectSingleNode("Mid").InnerText, provider);exchangeRates.Add(new Domain.Directory.ExchangeRate {CurrencyCode = node2.SelectSingleNode("Code").InnerText,- Rate = Math.Round(1m / rate, 4, MidpointRounding.AwayFromZero),+ Rate = Math.Round(1 / rate, 4, MidpointRounding.AwayFromZero),UpdatedOn = updateDate});}diff --git a/src/Plugins/Payments.BrainTree/BrainTreePaymentProvider.cs b/src/Plugins/Payments.BrainTree/BrainTreePaymentProvider.csindex 17e81d400..541770e22 100644--- a/src/Plugins/Payments.BrainTree/BrainTreePaymentProvider.cs+++ b/src/Plugins/Payments.BrainTree/BrainTreePaymentProvider.cs@@ -132,7 +132,7 @@ namespace Payments.BrainTree//new transaction requestvar transactionRequest = new TransactionRequest{- Amount = paymentTransaction.TransactionAmount,+ Amount = Convert.ToDecimal(paymentTransaction.TransactionAmount),};if (_brainTreePaymentSettings.Use3DS)@@ -222,18 +222,18 @@ namespace Payments.BrainTree/// </summary>/// <param name="cart">Shoping cart</param>/// <returns>Additional handling fee</returns>- public async Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart)+ public async Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart){if (_brainTreePaymentSettings.AdditionalFee <= 0)return _brainTreePaymentSettings.AdditionalFee;- decimal result;+ double result;if (_brainTreePaymentSettings.AdditionalFeePercentage){//percentagevar orderTotalCalculationService = _serviceProvider.GetRequiredService<IOrderCalculationService>();var subtotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);- result = (decimal)((((float)subtotal.subTotalWithDiscount) * ((float)_brainTreePaymentSettings.AdditionalFee)) / 100f);+ result = (double)((((float)subtotal.subTotalWithDiscount) * ((float)_brainTreePaymentSettings.AdditionalFee)) / 100f);}else{diff --git a/src/Plugins/Payments.BrainTree/BrainTreePaymentSettings.cs b/src/Plugins/Payments.BrainTree/BrainTreePaymentSettings.csindex 02be6c0d8..7df49555e 100644--- a/src/Plugins/Payments.BrainTree/BrainTreePaymentSettings.cs+++ b/src/Plugins/Payments.BrainTree/BrainTreePaymentSettings.cs@@ -9,7 +9,7 @@ namespace Payments.BrainTreepublic string MerchantId { get; set; }public string PublicKey { get; set; }public string PrivateKey { get; set; }- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }public bool AdditionalFeePercentage { get; set; }public int DisplayOrder { get; set; }}diff --git a/src/Plugins/Payments.BrainTree/Models/ConfigurationModel.cs b/src/Plugins/Payments.BrainTree/Models/ConfigurationModel.csindex 5b2cfabe0..8298a43c9 100644--- a/src/Plugins/Payments.BrainTree/Models/ConfigurationModel.cs+++ b/src/Plugins/Payments.BrainTree/Models/ConfigurationModel.cs@@ -21,7 +21,7 @@ namespace Payments.BrainTree.Modelspublic string PrivateKey { get; set; }[GrandResourceDisplayName("Plugins.Payments.BrainTree.Fields.AdditionalFee")]- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }[GrandResourceDisplayName("Plugins.Payments.BrainTree.Fields.AdditionalFeePercentage")]public bool AdditionalFeePercentage { get; set; }diff --git a/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentProvider.cs b/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentProvider.csindex 661a2e32f..725dc7bd6 100644--- a/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentProvider.cs+++ b/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentProvider.cs@@ -83,18 +83,18 @@ namespace Payments.CashOnDeliveryreturn await Task.FromResult(false);}- public async Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart)+ public async Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart){if (_cashOnDeliveryPaymentSettings.AdditionalFee <= 0)return _cashOnDeliveryPaymentSettings.AdditionalFee;- decimal result;+ double result;if (_cashOnDeliveryPaymentSettings.AdditionalFeePercentage){//percentagevar orderTotalCalculationService = _serviceProvider.GetRequiredService<IOrderCalculationService>();var subtotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);- result = (decimal)((((float)subtotal.subTotalWithDiscount) * ((float)_cashOnDeliveryPaymentSettings.AdditionalFee)) / 100f);+ result = (double)((((float)subtotal.subTotalWithDiscount) * ((float)_cashOnDeliveryPaymentSettings.AdditionalFee)) / 100f);}else{diff --git a/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentSettings.cs b/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentSettings.csindex d98c1d58e..fbf5145a8 100644--- a/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentSettings.cs+++ b/src/Plugins/Payments.CashOnDelivery/CashOnDeliveryPaymentSettings.cs@@ -14,7 +14,7 @@ namespace Payments.CashOnDelivery/// <summary>/// Additional fee/// </summary>- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }/// <summary>/// Gets or sets a value indicating whether shippable products are required in order to display this payment method during checkout/// </summary>diff --git a/src/Plugins/Payments.CashOnDelivery/Models/ConfigurationModel.cs b/src/Plugins/Payments.CashOnDelivery/Models/ConfigurationModel.csindex e169ace8d..0e649e939 100644--- a/src/Plugins/Payments.CashOnDelivery/Models/ConfigurationModel.cs+++ b/src/Plugins/Payments.CashOnDelivery/Models/ConfigurationModel.cs@@ -19,7 +19,7 @@ namespace Payments.CashOnDelivery.Modelspublic string DescriptionText { get; set; }[GrandResourceDisplayName("Plugins.Payment.CashOnDelivery.AdditionalFee")]- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }[GrandResourceDisplayName("Plugins.Payment.CashOnDelivery.AdditionalFeePercentage")]public bool AdditionalFeePercentage { get; set; }diff --git a/src/Plugins/Payments.PayPalStandard/Controllers/PaymentPayPalStandardController.cs b/src/Plugins/Payments.PayPalStandard/Controllers/PaymentPayPalStandardController.csindex 814c0a392..be788714f 100644--- a/src/Plugins/Payments.PayPalStandard/Controllers/PaymentPayPalStandardController.cs+++ b/src/Plugins/Payments.PayPalStandard/Controllers/PaymentPayPalStandardController.cs@@ -180,10 +180,10 @@ namespace Payments.PayPalStandard.Controllers{var paymentTransaction = await _paymentTransactionService.GetByOrdeGuid(orderNumberGuid);- decimal mc_gross = decimal.Zero;+ double mc_gross = 0;try{- mc_gross = decimal.Parse(values["mc_gross"], new CultureInfo("en-US"));+ mc_gross = double.Parse(values["mc_gross"], new CultureInfo("en-US"));}catch (Exception exc){@@ -315,10 +315,10 @@ namespace Payments.PayPalStandard.Controllersif (processor.VerifyIpn(strRequest, out values)){#region values- decimal mc_gross = decimal.Zero;+ double mc_gross = 0;try{- mc_gross = decimal.Parse(values["mc_gross"], new CultureInfo("en-US"));+ mc_gross = double.Parse(values["mc_gross"], new CultureInfo("en-US"));}catch { }diff --git a/src/Plugins/Payments.PayPalStandard/Models/ConfigurationModel.cs b/src/Plugins/Payments.PayPalStandard/Models/ConfigurationModel.csindex 11f651b41..917aebd54 100644--- a/src/Plugins/Payments.PayPalStandard/Models/ConfigurationModel.cs+++ b/src/Plugins/Payments.PayPalStandard/Models/ConfigurationModel.cs@@ -20,7 +20,7 @@ namespace Payments.PayPalStandard.Modelspublic bool PdtValidateOrderTotal { get; set; }[GrandResourceDisplayName("Plugins.Payments.PayPalStandard.Fields.AdditionalFee")]- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }[GrandResourceDisplayName("Plugins.Payments.PayPalStandard.Fields.AdditionalFeePercentage")]public bool AdditionalFeePercentage { get; set; }diff --git a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentPlugin.cs b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentPlugin.csindex 5f74d42ff..dde3c76d8 100644--- a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentPlugin.cs+++ b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentPlugin.cs@@ -73,7 +73,7 @@ namespace Payments.PayPalStandardawait this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.PayPalStandard.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.PayPalStandard.Instructions", "<p><b>If you're using this gateway ensure that your primary store currency is supported by PayPal.</b><br /><br />To use PDT, you must activate PDT and Auto Return in your PayPal account profile. You must also acquire a PDT identity token, which is used in all PDT communication you send to PayPal. Follow these steps to configure your account for PDT:<br /><br />1. Log in to your PayPal account (click <a href=\"https://www.paypal.com/us/webapps/mpp/referral/paypal-business-account2?partner_id=9JJPJNNPQ7PZ8\" target=\"_blank\">here</a> to create your account).<br />2. Click the Profile subtab.<br />3. Click Website Payment Preferences in the Seller Preferences column.<br />4. Under Auto Return for Website Payments, click the On radio button.<br />5. For the Return URL, enter the URL on your site that will receive the transaction ID posted by PayPal after a customer payment ({0}).<br />6. Under Payment Data Transfer, click the On radio button.<br />7. Click Save.<br />8. Click Website Payment Preferences in the Seller Preferences column.<br />9. Scroll down to the Payment Data Transfer section of the page to view your PDT identity token.<br /><br /></p>");await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.PayPalStandard.PaymentMethodDescription", "You will be redirected to PayPal site to complete the payment");- await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.PayPalStandard.RoundingWarning", "It looks like you have \"ShoppingCartSettings.RoundPricesDuringCalculation\" setting disabled. Keep in mind that this can lead to a discrepancy of the order total amount, as PayPal only rounds to two decimals.");+ await this.AddOrUpdatePluginTranslateResource(_translationService, _languageService, "Plugins.Payments.PayPalStandard.RoundingWarning", "It looks like you have \"ShoppingCartSettings.RoundPricesDuringCalculation\" setting disabled. Keep in mind that this can lead to a discrepancy of the order total amount, as PayPal only rounds to two doubles.");await base.Install();}diff --git a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentProvider.cs b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentProvider.csindex 9ab54d51b..8d0cc0a6b 100644--- a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentProvider.cs+++ b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentProvider.cs@@ -270,8 +270,8 @@ namespace Payments.PayPalStandardparameters.Add("cmd", "_cart");parameters.Add("upload", "1");- var cartTotal = decimal.Zero;- var roundedCartTotal = decimal.Zero;+ double cartTotal = 0;+ double roundedCartTotal = 0;var itemCount = 1;//add shopping cart items@@ -301,7 +301,7 @@ namespace Payments.PayPalStandardvar attributePrice = await _taxService.GetCheckoutAttributePrice(attributeValue.ca, attributeValue.cav, false, customer);if (attributePrice.checkoutPrice > 0){- decimal roundedAttributePrice = Math.Round(await currencyService.ConvertFromPrimaryStoreCurrency(attributePrice.checkoutPrice, workContext.WorkingCurrency), 2);+ double roundedAttributePrice = Math.Round(await currencyService.ConvertFromPrimaryStoreCurrency(attributePrice.checkoutPrice, workContext.WorkingCurrency), 2);//add query parametersif (attributeValue.ca != null){@@ -318,7 +318,7 @@ namespace Payments.PayPalStandard//add shipping fee as a separate order item, if it has pricevar roundedShippingPrice = Math.Round(order.OrderShippingExclTax, 2);- if (roundedShippingPrice > decimal.Zero)+ if (roundedShippingPrice > 0){parameters.Add($"item_name_{itemCount}", "Shipping fee");parameters.Add($"amount_{itemCount}", roundedShippingPrice.ToString("0.00", CultureInfo.InvariantCulture));@@ -331,7 +331,7 @@ namespace Payments.PayPalStandard//add payment method additional fee as a separate order item, if it has pricevar roundedPaymentMethodPrice = Math.Round(order.PaymentMethodAdditionalFeeExclTax, 2);- if (roundedPaymentMethodPrice > decimal.Zero)+ if (roundedPaymentMethodPrice > 0){parameters.Add($"item_name_{itemCount}", "Payment method fee");parameters.Add($"amount_{itemCount}", roundedPaymentMethodPrice.ToString("0.00", CultureInfo.InvariantCulture));@@ -344,7 +344,7 @@ namespace Payments.PayPalStandard//add tax as a separate order item, if it has positive amountvar roundedTaxAmount = Math.Round(order.OrderTax, 2);- if (roundedTaxAmount > decimal.Zero)+ if (roundedTaxAmount > 0){parameters.Add($"item_name_{itemCount}", "Tax amount");parameters.Add($"amount_{itemCount}", roundedTaxAmount.ToString("0.00", CultureInfo.InvariantCulture));@@ -474,18 +474,18 @@ namespace Payments.PayPalStandard/// </summary>/// <param name="cart">Shopping cart</param>/// <returns>Additional handling fee</returns>- public async Task<decimal> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart)+ public async Task<double> GetAdditionalHandlingFee(IList<ShoppingCartItem> cart){if (_paypalStandardPaymentSettings.AdditionalFee <= 0)return _paypalStandardPaymentSettings.AdditionalFee;- decimal result;+ double result;if (_paypalStandardPaymentSettings.AdditionalFeePercentage){//percentagevar orderTotalCalculationService = _serviceProvider.GetRequiredService<IOrderCalculationService>();var subtotal = await orderTotalCalculationService.GetShoppingCartSubTotal(cart, true);- result = (decimal)((((float)subtotal.subTotalWithDiscount) * ((float)_paypalStandardPaymentSettings.AdditionalFee)) / 100f);+ result = (double)((((float)subtotal.subTotalWithDiscount) * ((float)_paypalStandardPaymentSettings.AdditionalFee)) / 100f);}else{diff --git a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentSettings.cs b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentSettings.csindex 5aa503d70..22d970173 100644--- a/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentSettings.cs+++ b/src/Plugins/Payments.PayPalStandard/PayPalStandardPaymentSettings.cs@@ -14,7 +14,7 @@ namespace Payments.PayPalStandard/// <summary>/// Additional fee/// </summary>- public decimal AdditionalFee { get; set; }+ public double AdditionalFee { get; set; }public bool PassProductNamesAndTotals { get; set; }public bool PdtValidateOrderTotal { get; set; }diff --git a/src/Plugins/Shipping.ByWeight/ByWeightShippingProvider.cs b/src/Plugins/Shipping.ByWeight/ByWeightShippingProvider.csindex 9a6606695..82cf08173 100644--- a/src/Plugins/Shipping.ByWeight/ByWeightShippingProvider.cs+++ b/src/Plugins/Shipping.ByWeight/ByWeightShippingProvider.cs@@ -65,7 +65,7 @@ namespace Shipping.ByWeight#region Utilities- private async Task<decimal?> GetRate(decimal subTotal, decimal weight, string shippingMethodId,+ private async Task<double?> GetRate(double subTotal, double weight, string shippingMethodId,string storeId, string warehouseId, string countryId, string stateProvinceId, string zip){@@ -79,27 +79,27 @@ namespace Shipping.ByWeightif (shippingByWeightSettings.LimitMethodsToCreated)return null;- return decimal.Zero;+ return 0;}//additional fixed cost- decimal shippingTotal = shippingByWeightRecord.AdditionalFixedCost;+ double shippingTotal = shippingByWeightRecord.AdditionalFixedCost;//charge amount per weight unit- if (shippingByWeightRecord.RatePerWeightUnit > decimal.Zero)+ if (shippingByWeightRecord.RatePerWeightUnit > 0){var weightRate = weight - shippingByWeightRecord.LowerWeightLimit;- if (weightRate < decimal.Zero)- weightRate = decimal.Zero;+ if (weightRate < 0)+ weightRate = 0;shippingTotal += shippingByWeightRecord.RatePerWeightUnit * weightRate;}//percentage rate of subtotal- if (shippingByWeightRecord.PercentageRateOfSubtotal > decimal.Zero)+ if (shippingByWeightRecord.PercentageRateOfSubtotal > 0){- shippingTotal += Math.Round((decimal)((((float)subTotal) * ((float)shippingByWeightRecord.PercentageRateOfSubtotal)) / 100f), 2);+ shippingTotal += Math.Round((double)((((float)subTotal) * ((float)shippingByWeightRecord.PercentageRateOfSubtotal)) / 100f), 2);}- if (shippingTotal < decimal.Zero)- shippingTotal = decimal.Zero;+ if (shippingTotal < 0)+ shippingTotal = 0;return shippingTotal;}@@ -112,17 +112,17 @@ namespace Shipping.ByWeight/// </summary>/// <param name="shoppingCartItem">Shopping cart item</param>/// <returns>Shopping cart item weight</returns>- private async Task<decimal> GetShoppingCartItemWeight(ShoppingCartItem shoppingCartItem)+ private async Task<double> GetShoppingCartItemWeight(ShoppingCartItem shoppingCartItem){if (shoppingCartItem == null)throw new ArgumentNullException(nameof(shoppingCartItem));var product = await _productService.GetProductById(shoppingCartItem.ProductId);if (product == null)- return decimal.Zero;+ return 0;//attribute weight- decimal attributesTotalWeight = decimal.Zero;+ double attributesTotalWeight = 0;if (shoppingCartItem.Attributes != null && shoppingCartItem.Attributes.Any()){var attributeValues = _productAttributeParser.ParseProductAttributeValues(product, shoppingCartItem.Attributes);@@ -158,14 +158,14 @@ namespace Shipping.ByWeight/// <param name="request">Request</param>/// <param name="includeCheckoutAttributes">A value indicating whether we should calculate weights of selected checkotu attributes</param>/// <returns>Total weight</returns>- private async Task<decimal> GetTotalWeight(GetShippingOptionRequest request, bool includeCheckoutAttributes = true)+ private async Task<double> GetTotalWeight(GetShippingOptionRequest request, bool includeCheckoutAttributes = true){if (request == null)throw new ArgumentNullException(nameof(request));Customer customer = request.Customer;- decimal totalWeight = decimal.Zero;+ double totalWeight = 0;//shopping cart itemsforeach (var packageItem in request.Items)totalWeight += await GetShoppingCartItemWeight(packageItem.ShoppingCartItem) * packageItem.GetQuantity();@@ -216,7 +216,7 @@ namespace Shipping.ByWeightstring stateProvinceId = getShippingOptionRequest.ShippingAddress.StateProvinceId;string warehouseId = getShippingOptionRequest.WarehouseFrom != null ? getShippingOptionRequest.WarehouseFrom.Id : "";string zip = getShippingOptionRequest.ShippingAddress.ZipPostalCode;- decimal subTotal = decimal.Zero;+ double subTotal = 0;var priceCalculationService = _serviceProvider.GetRequiredService<IPricingService>();foreach (var packageItem in getShippingOptionRequest.Items)@@ -229,12 +229,12 @@ namespace Shipping.ByWeightsubTotal += (await priceCalculationService.GetSubTotal(packageItem.ShoppingCartItem, product)).subTotal;}- decimal weight = await GetTotalWeight(getShippingOptionRequest);+ double weight = await GetTotalWeight(getShippingOptionRequest);var shippingMethods = await _shippingMethodService.GetAllShippingMethods(countryId, _workContext.CurrentCustomer);foreach (var shippingMethod in shippingMethods){- decimal? rate = await GetRate(subTotal, weight, shippingMethod.Id,+ double? rate = await GetRate(subTotal, weight, shippingMethod.Id,storeId, warehouseId, countryId, stateProvinceId, zip);if (rate.HasValue){@@ -255,9 +255,9 @@ namespace Shipping.ByWeight/// </summary>/// <param name="getShippingOptionRequest">A request for getting shipping options</param>/// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>- public async Task<decimal?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest)+ public async Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest){- return await Task.FromResult(default(decimal?));+ return await Task.FromResult(default(double?));}/// <summary>diff --git a/src/Plugins/Shipping.ByWeight/Domain/ShippingByWeightRecord.cs b/src/Plugins/Shipping.ByWeight/Domain/ShippingByWeightRecord.csindex 5a1169ac6..86bc54dac 100644--- a/src/Plugins/Shipping.ByWeight/Domain/ShippingByWeightRecord.cs+++ b/src/Plugins/Shipping.ByWeight/Domain/ShippingByWeightRecord.cs@@ -40,31 +40,31 @@ namespace Shipping.ByWeight.Domain/// <summary>/// Gets or sets the "from" value/// </summary>- public decimal From { get; set; }+ public double From { get; set; }/// <summary>/// Gets or sets the "to" value/// </summary>- public decimal To { get; set; }+ public double To { get; set; }/// <summary>/// Gets or sets the additional fixed cost/// </summary>- public decimal AdditionalFixedCost { get; set; }+ public double AdditionalFixedCost { get; set; }/// <summary>/// Gets or sets the shipping charge percentage (of subtotal)/// </summary>- public decimal PercentageRateOfSubtotal { get; set; }+ public double PercentageRateOfSubtotal { get; set; }/// <summary>/// Gets or sets the shipping charge amount (per weight unit)/// </summary>- public decimal RatePerWeightUnit { get; set; }+ public double RatePerWeightUnit { get; set; }/// <summary>/// Gets or sets the lower weight limit/// </summary>- public decimal LowerWeightLimit { get; set; }+ public double LowerWeightLimit { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Shipping.ByWeight/Models/ShippingByWeightModel.cs b/src/Plugins/Shipping.ByWeight/Models/ShippingByWeightModel.csindex 66620123f..7dd51e41f 100644--- a/src/Plugins/Shipping.ByWeight/Models/ShippingByWeightModel.cs+++ b/src/Plugins/Shipping.ByWeight/Models/ShippingByWeightModel.cs@@ -45,22 +45,22 @@ namespace Shipping.ByWeight.Modelspublic string ShippingMethodName { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.From")]- public decimal From { get; set; }+ public double From { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.To")]- public decimal To { get; set; }+ public double To { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.AdditionalFixedCost")]- public decimal AdditionalFixedCost { get; set; }+ public double AdditionalFixedCost { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.PercentageRateOfSubtotal")]- public decimal PercentageRateOfSubtotal { get; set; }+ public double PercentageRateOfSubtotal { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.RatePerWeightUnit")]- public decimal RatePerWeightUnit { get; set; }+ public double RatePerWeightUnit { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.LowerWeightLimit")]- public decimal LowerWeightLimit { get; set; }+ public double LowerWeightLimit { get; set; }[GrandResourceDisplayName("Plugins.Shipping.ByWeight.Fields.DataHtml")]public string DataHtml { get; set; }diff --git a/src/Plugins/Shipping.ByWeight/Services/IShippingByWeightService.cs b/src/Plugins/Shipping.ByWeight/Services/IShippingByWeightService.csindex 4334f9b55..29cc47ea0 100644--- a/src/Plugins/Shipping.ByWeight/Services/IShippingByWeightService.cs+++ b/src/Plugins/Shipping.ByWeight/Services/IShippingByWeightService.cs@@ -12,7 +12,7 @@ namespace Shipping.ByWeight.ServicesTask<ShippingByWeightRecord> FindRecord(string shippingMethodId,string storeId, string warehouseId,- string countryId, string stateProvinceId, string zip, decimal weight);+ string countryId, string stateProvinceId, string zip, double weight);Task<ShippingByWeightRecord> GetById(string shippingByWeightRecordId);diff --git a/src/Plugins/Shipping.ByWeight/Services/ShippingByWeightService.cs b/src/Plugins/Shipping.ByWeight/Services/ShippingByWeightService.csindex 4f76a1ef5..a0b177458 100644--- a/src/Plugins/Shipping.ByWeight/Services/ShippingByWeightService.cs+++ b/src/Plugins/Shipping.ByWeight/Services/ShippingByWeightService.cs@@ -61,7 +61,7 @@ namespace Shipping.ByWeight.Servicespublic virtual async Task<ShippingByWeightRecord> FindRecord(string shippingMethodId,string storeId, string warehouseId,- string countryId, string stateProvinceId, string zip, decimal weight)+ string countryId, string stateProvinceId, string zip, double weight){if (zip == null)zip = string.Empty;diff --git a/src/Plugins/Shipping.FixedRateShipping/Controllers/ShippingFixedRateController.cs b/src/Plugins/Shipping.FixedRateShipping/Controllers/ShippingFixedRateController.csindex ad0d8b91a..ca4d4e80f 100644--- a/src/Plugins/Shipping.FixedRateShipping/Controllers/ShippingFixedRateController.cs+++ b/src/Plugins/Shipping.FixedRateShipping/Controllers/ShippingFixedRateController.cs@@ -78,7 +78,7 @@ namespace Shipping.FixedRateShipping.Controllers}[NonAction]- protected decimal GetShippingRate(string shippingMethodId)+ protected double GetShippingRate(string shippingMethodId){var rate = _settingService.GetSettingByKey<FixedShippingRate>(string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId))?.Rate;return rate ?? 0;diff --git a/src/Plugins/Shipping.FixedRateShipping/FixedRateShippingProvider.cs b/src/Plugins/Shipping.FixedRateShipping/FixedRateShippingProvider.csindex 434472a45..b96ed1fe9 100644--- a/src/Plugins/Shipping.FixedRateShipping/FixedRateShippingProvider.cs+++ b/src/Plugins/Shipping.FixedRateShipping/FixedRateShippingProvider.cs@@ -41,7 +41,7 @@ namespace Shipping.FixedRateShipping}#region Utilities- private decimal GetRate(string shippingMethodId)+ private double GetRate(string shippingMethodId){string key = string.Format("ShippingRateComputationMethod.FixedRate.Rate.ShippingMethodId{0}", shippingMethodId);var rate = this._settingService.GetSettingByKey<FixedShippingRate>(key)?.Rate;@@ -90,7 +90,7 @@ namespace Shipping.FixedRateShipping/// </summary>/// <param name="getShippingOptionRequest">A request for getting shipping options</param>/// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>- public async Task<decimal?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest)+ public async Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest){if (getShippingOptionRequest == null)throw new ArgumentNullException(nameof(getShippingOptionRequest));@@ -98,10 +98,10 @@ namespace Shipping.FixedRateShippingstring restrictByCountryId = (getShippingOptionRequest.ShippingAddress != null && !String.IsNullOrEmpty(getShippingOptionRequest.ShippingAddress.CountryId)) ? getShippingOptionRequest.ShippingAddress.CountryId : "";var shippingMethods = await _shippingMethodService.GetAllShippingMethods(restrictByCountryId);- var rates = new List<decimal>();+ var rates = new List<double>();foreach (var shippingMethod in shippingMethods){- decimal rate = GetRate(shippingMethod.Id);+ double rate = GetRate(shippingMethod.Id);if (!rates.Contains(rate))rates.Add(rate);}diff --git a/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRate.cs b/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRate.csindex 48244ad30..6a12ccadb 100644--- a/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRate.cs+++ b/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRate.cs@@ -2,6 +2,6 @@{public class FixedShippingRate{- public decimal Rate { get; set; }+ public double Rate { get; set; }}}diff --git a/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRateModel.cs b/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRateModel.csindex d7da1ec39..321e33cdb 100644--- a/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRateModel.cs+++ b/src/Plugins/Shipping.FixedRateShipping/Models/FixedShippingRateModel.cs@@ -10,6 +10,6 @@ namespace Shipping.FixedRateShipping.Modelspublic string ShippingMethodName { get; set; }[GrandResourceDisplayName("Plugins.Shipping.FixedRateShipping.Fields.Rate")]- public decimal Rate { get; set; }+ public double Rate { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Shipping.FixedRateShipping/Views/ShippingFixedRate/Configure.cshtml b/src/Plugins/Shipping.FixedRateShipping/Views/ShippingFixedRate/Configure.cshtmlindex ad2c7e9d8..29cc37933 100644--- a/src/Plugins/Shipping.FixedRateShipping/Views/ShippingFixedRate/Configure.cshtml+++ b/src/Plugins/Shipping.FixedRateShipping/Views/ShippingFixedRate/Configure.cshtml@@ -83,7 +83,7 @@.appendTo(container).kendoNumericTextBox({format: "{0:n4}",- decimals: 4+ doubles: 4});}}, {diff --git a/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPointSerialization.cs b/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPointSerialization.csindex 9abbdd9d1..a1b17d6e4 100644--- a/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPointSerialization.cs+++ b/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPointSerialization.cs@@ -9,7 +9,7 @@public string City { get; set; }public string Address1 { get; set; }public string ZipPostalCode { get; set; }- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }public string OpeningHours { get; set; }public string StoreId { get; set; }}diff --git a/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPoints.cs b/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPoints.csindex 7d79c0b2d..06db70bd6 100644--- a/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPoints.cs+++ b/src/Plugins/Shipping.ShippingPoint/Domain/ShippingPoints.cs@@ -37,7 +37,7 @@ namespace Shipping.ShippingPoint.Domain/// <summary>/// Gets or sets a fee for the pickup/// </summary>- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }/// <summary>/// Gets or sets an oppening hoursdiff --git a/src/Plugins/Shipping.ShippingPoint/Models/ShippingPointModel.cs b/src/Plugins/Shipping.ShippingPoint/Models/ShippingPointModel.csindex 231ccb73a..c0b2fc2a1 100644--- a/src/Plugins/Shipping.ShippingPoint/Models/ShippingPointModel.cs+++ b/src/Plugins/Shipping.ShippingPoint/Models/ShippingPointModel.cs@@ -23,7 +23,7 @@ namespace Shipping.ShippingPoint.Modelspublic string OpeningHours { get; set; }[GrandResourceDisplayName("Shipping.ShippingPoint.Fields.PickupFee")]- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }public List<SelectListItem> AvailableStores { get; set; }[GrandResourceDisplayName("Shipping.ShippingPoint.Fields.Store")]diff --git a/src/Plugins/Shipping.ShippingPoint/ShippingPointRateProvider.cs b/src/Plugins/Shipping.ShippingPoint/ShippingPointRateProvider.csindex e32e695a0..e5dfd38bf 100644--- a/src/Plugins/Shipping.ShippingPoint/ShippingPointRateProvider.cs+++ b/src/Plugins/Shipping.ShippingPoint/ShippingPointRateProvider.cs@@ -86,9 +86,9 @@ namespace Shipping.ShippingPoint/// </summary>/// <param name="getShippingOptionRequest">A request for getting shipping options</param>/// <returns>Fixed shipping rate; or null in case there's no fixed shipping rate</returns>- public Task<decimal?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest)+ public Task<double?> GetFixedRate(GetShippingOptionRequest getShippingOptionRequest){- return Task.FromResult(default(decimal?));+ return Task.FromResult(default(double?));}public async Task<bool> HideShipmentMethods(IList<ShoppingCartItem> cart)diff --git a/src/Plugins/Tax.CountryStateZip/Domain/TaxRate.cs b/src/Plugins/Tax.CountryStateZip/Domain/TaxRate.csindex f75e1b8fc..0b73f5c83 100644--- a/src/Plugins/Tax.CountryStateZip/Domain/TaxRate.cs+++ b/src/Plugins/Tax.CountryStateZip/Domain/TaxRate.cs@@ -35,6 +35,6 @@ namespace Tax.CountryStateZip.Domain/// <summary>/// Gets or sets the percentage/// </summary>- public decimal Percentage { get; set; }+ public double Percentage { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Tax.CountryStateZip/Infrastructure/Cache/TaxRateForCaching.cs b/src/Plugins/Tax.CountryStateZip/Infrastructure/Cache/TaxRateForCaching.csindex 26eed0efc..dc23094d8 100644--- a/src/Plugins/Tax.CountryStateZip/Infrastructure/Cache/TaxRateForCaching.cs+++ b/src/Plugins/Tax.CountryStateZip/Infrastructure/Cache/TaxRateForCaching.cs@@ -11,6 +11,6 @@ namespace Tax.CountryStateZip.Infrastructure.Cachepublic string CountryId { get; set; }public string StateProvinceId { get; set; }public string Zip { get; set; }- public decimal Percentage { get; set; }+ public double Percentage { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Tax.CountryStateZip/Models/TaxRateListModel.cs b/src/Plugins/Tax.CountryStateZip/Models/TaxRateListModel.csindex 2c99ae373..15a287f4e 100644--- a/src/Plugins/Tax.CountryStateZip/Models/TaxRateListModel.cs+++ b/src/Plugins/Tax.CountryStateZip/Models/TaxRateListModel.cs@@ -27,7 +27,7 @@ namespace Tax.CountryStateZip.Models[GrandResourceDisplayName("Plugins.Tax.CountryStateZip.Fields.TaxCategory")]public string AddTaxCategoryId { get; set; }[GrandResourceDisplayName("Plugins.Tax.CountryStateZip.Fields.Percentage")]- public decimal AddPercentage { get; set; }+ public double AddPercentage { get; set; }public IList<SelectListItem> AvailableStores { get; set; }public IList<SelectListItem> AvailableCountries { get; set; }diff --git a/src/Plugins/Tax.CountryStateZip/Models/TaxRateModel.cs b/src/Plugins/Tax.CountryStateZip/Models/TaxRateModel.csindex b9ec03c24..e426a7db7 100644--- a/src/Plugins/Tax.CountryStateZip/Models/TaxRateModel.cs+++ b/src/Plugins/Tax.CountryStateZip/Models/TaxRateModel.cs@@ -29,6 +29,6 @@ namespace Tax.CountryStateZip.Modelspublic string Zip { get; set; }[GrandResourceDisplayName("Plugins.Tax.CountryStateZip.Fields.Percentage")]- public decimal Percentage { get; set; }+ public double Percentage { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Tax.CountryStateZip/Views/TaxCountryStateZip/Configure.cshtml b/src/Plugins/Tax.CountryStateZip/Views/TaxCountryStateZip/Configure.cshtmlindex 20e765c30..13706787a 100644--- a/src/Plugins/Tax.CountryStateZip/Views/TaxCountryStateZip/Configure.cshtml+++ b/src/Plugins/Tax.CountryStateZip/Views/TaxCountryStateZip/Configure.cshtml@@ -103,7 +103,7 @@.appendTo(container).kendoNumericTextBox({format: "{0:n4}",- decimals: 4+ doubles: 4});}}, {diff --git a/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs b/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.csindex 07f1167d4..f162ce81c 100644--- a/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs+++ b/src/Plugins/Tax.FixedRate/Controllers/TaxFixedRateController.cs@@ -56,7 +56,7 @@ namespace Tax.FixedRate.Controllerspublic async Task<IActionResult> TaxRateUpdate(FixedTaxRateModel model){string taxCategoryId = model.TaxCategoryId;- decimal rate = model.Rate;+ double rate = model.Rate;await _settingService.SetSetting(string.Format("Tax.TaxProvider.FixedRate.TaxCategoryId{0}", taxCategoryId), new FixedTaxRate() { Rate = rate });@@ -64,7 +64,7 @@ namespace Tax.FixedRate.Controllers}[NonAction]- protected decimal GetTaxRate(string taxCategoryId)+ protected double GetTaxRate(string taxCategoryId){var rate = _settingService.GetSettingByKey<FixedTaxRate>(string.Format("Tax.TaxProvider.FixedRate.TaxCategoryId{0}", taxCategoryId))?.Rate;return rate ?? 0;diff --git a/src/Plugins/Tax.FixedRate/FixedRateTaxProvider.cs b/src/Plugins/Tax.FixedRate/FixedRateTaxProvider.csindex f0dd2d770..13112111d 100644--- a/src/Plugins/Tax.FixedRate/FixedRateTaxProvider.cs+++ b/src/Plugins/Tax.FixedRate/FixedRateTaxProvider.cs@@ -50,7 +50,7 @@ namespace Tax.FixedRate/// </summary>/// <param name="taxCategoryId">The tax category identifier</param>/// <returns>Tax rate</returns>- protected decimal GetTaxRate(string taxCategoryId)+ protected double GetTaxRate(string taxCategoryId){var rate = _settingService.GetSettingByKey<FixedTaxRate>(string.Format("Tax.TaxProvider.FixedRate.TaxCategoryId{0}", taxCategoryId))?.Rate;return rate ?? 0;diff --git a/src/Plugins/Tax.FixedRate/Models/FixedTaxRate.cs b/src/Plugins/Tax.FixedRate/Models/FixedTaxRate.csindex fd1eae026..599333a20 100644--- a/src/Plugins/Tax.FixedRate/Models/FixedTaxRate.cs+++ b/src/Plugins/Tax.FixedRate/Models/FixedTaxRate.cs@@ -2,6 +2,6 @@{public class FixedTaxRate{- public decimal Rate { get; set; }+ public double Rate { get; set; }}}diff --git a/src/Plugins/Tax.FixedRate/Models/FixedTaxRateModel.cs b/src/Plugins/Tax.FixedRate/Models/FixedTaxRateModel.csindex 946a36f7a..53a52beeb 100644--- a/src/Plugins/Tax.FixedRate/Models/FixedTaxRateModel.cs+++ b/src/Plugins/Tax.FixedRate/Models/FixedTaxRateModel.cs@@ -10,6 +10,6 @@ namespace Tax.FixedRate.Modelspublic string TaxCategoryName { get; set; }[GrandResourceDisplayName("Plugins.Tax.FixedRate.Fields.Rate")]- public decimal Rate { get; set; }+ public double Rate { get; set; }}}\ No newline at end of filediff --git a/src/Plugins/Tax.FixedRate/Views/Configure.cshtml b/src/Plugins/Tax.FixedRate/Views/Configure.cshtmlindex f60d3aced..5645dff78 100644--- a/src/Plugins/Tax.FixedRate/Views/Configure.cshtml+++ b/src/Plugins/Tax.FixedRate/Views/Configure.cshtml@@ -80,7 +80,7 @@.appendTo(container).kendoNumericTextBox({format: "{0:n4}",- decimals: 4+ doubles: 4});}}, {diff --git a/src/Plugins/Widgets.FacebookPixel/Models/FacebookAddToCartModelModel.cs b/src/Plugins/Widgets.FacebookPixel/Models/FacebookAddToCartModelModel.csindex 3996923c5..039282844 100644--- a/src/Plugins/Widgets.FacebookPixel/Models/FacebookAddToCartModelModel.cs+++ b/src/Plugins/Widgets.FacebookPixel/Models/FacebookAddToCartModelModel.cs@@ -9,7 +9,7 @@ namespace Widgets.FacebookPixel.Modelspublic int Quantity { get; set; }public int ItemQuantity { get; set; }public string Price { get; set; }- public decimal DecimalPrice { get; set; }+ public double DecimalPrice { get; set; }public string TotalPrice { get; set; }diff --git a/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceFormatterTests.cs b/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceFormatterTests.csindex 863a45f75..7f49147a7 100644--- a/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceFormatterTests.cs+++ b/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceFormatterTests.cs@@ -133,7 +133,7 @@ namespace Grand.Business.Catalog.Tests.Service.PricesLanguageCulture = "en-US"};- Assert.AreEqual("€412.20", _priceFormatter.FormatPrice(412.2M, currency0111, language0111, false, false));+ Assert.AreEqual("€412.20", _priceFormatter.FormatPrice(412.2, currency0111, language0111, false, false));}[TestMethod()]@@ -167,8 +167,8 @@ namespace Grand.Business.Catalog.Tests.Service.PricesName = "English",LanguageCulture = "en-US"};- Assert.AreEqual("$1,234.50", _priceFormatter.FormatPrice(1234.5M, usd_currency, language, false, false));- Assert.AreEqual("£1,234.50", _priceFormatter.FormatPrice(1234.5M, gbp_currency, language, false, false));+ Assert.AreEqual("$1,234.50", _priceFormatter.FormatPrice(1234.5, usd_currency, language, false, false));+ Assert.AreEqual("£1,234.50", _priceFormatter.FormatPrice(1234.5, gbp_currency, language, false, false));}[TestMethod()]@@ -192,11 +192,11 @@ namespace Grand.Business.Catalog.Tests.Service.Prices};//- Assert.AreEqual("$18,888.10", _priceFormatter.FormatPrice(18888.1M, currency, language, false, false));+ Assert.AreEqual("$18,888.10", _priceFormatter.FormatPrice(18888.1, currency, language, false, false));//- Assert.AreEqual("$18,888.10 incl tax", _priceFormatter.FormatPrice(18888.1M, currency, language, true, true));+ Assert.AreEqual("$18,888.10 incl tax", _priceFormatter.FormatPrice(18888.1, currency, language, true, true));//- Assert.AreEqual("$18,888.10 excl tax", _priceFormatter.FormatPrice(18888.1M, currency, language, false, true));+ Assert.AreEqual("$18,888.10 excl tax", _priceFormatter.FormatPrice(18888.1, currency, language, false, true));}[TestMethod()]@@ -217,7 +217,7 @@ namespace Grand.Business.Catalog.Tests.Service.PricesLanguageCulture = "en-US"};- Assert.AreEqual("$18,888.10", _priceFormatter.FormatPrice(18888.1M, currency, language, false, false));+ Assert.AreEqual("$18,888.10", _priceFormatter.FormatPrice(18888.1, currency, language, false, false));}}diff --git a/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceServiceTests.cs b/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceServiceTests.csindex d6e18b534..d840290d7 100644--- a/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceServiceTests.cs+++ b/src/Tests/Grand.Business.Catalog.Tests/Service/Prices/PriceServiceTests.cs@@ -91,7 +91,7 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar tempCurrency = new Mock<ICurrencyService>();{tempCurrency.Setup(instance => instance.GetPrimaryStoreCurrency()).Returns(Task.FromResult(_currency));- //tempCurrency.Setup(instance => instance.ConvertToPrimaryStoreCurrency(It.IsAny<decimal>(), _currency)).ReturnsAsync(5);+ //tempCurrency.Setup(instance => instance.ConvertToPrimaryStoreCurrency(It.IsAny<double>(), _currency)).ReturnsAsync(5);//_currencyService = tempCurrency.Object;}var cacheManager = new Mock<ICacheBase>().Object;@@ -135,18 +135,18 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product = new Product {Id = "1",Name = "product name 01",- Price = 49.99M,+ Price = 49.99,EnteredPrice = false,Published = true,};- product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99M });+ product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99 });var currency = new Currency { Id = "1", CurrencyCode = "USD", Rate = 1, Published = true, MidpointRoundId = System.MidpointRounding.ToEven, RoundingTypeId = RoundingType.Rounding001 };var customer = new Customer();var pr = (await _pricingService.GetFinalPrice(product, customer, currency, 0, false, 1));- Assert.AreEqual(49.99M, pr.finalPrice);+ Assert.AreEqual(49.99, pr.finalPrice);//returned price FOR ONE UNIT should be the same, even if quantity is different than 1- Assert.AreEqual(49.99M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 10)).finalPrice);+ Assert.AreEqual(49.99, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 10)).finalPrice);}[TestMethod()]@@ -155,14 +155,14 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product = new Product {Id = "1",Name = "product name 01",- Price = 49.99M,+ Price = 49.99,EnteredPrice = false,Published = true,};- product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99M });+ product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99 });//TierPrice is simply "the more you buy, the less you pay"- product.TierPrices.Add(new TierPrice { Price = 10M, Quantity = 10, CurrencyCode = "USD" });- product.TierPrices.Add(new TierPrice { Price = 2M, Quantity = 200, CurrencyCode = "USD" });+ product.TierPrices.Add(new TierPrice { Price = 10, Quantity = 10, CurrencyCode = "USD" });+ product.TierPrices.Add(new TierPrice { Price = 2, Quantity = 200, CurrencyCode = "USD" });Customer customer = new Customer();@@ -172,9 +172,9 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesquantity: >=200 price: 2*/- Assert.AreEqual(49.99M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 1)).finalPrice);- Assert.AreEqual(49.99M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 5)).finalPrice);- Assert.AreEqual(49.99M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 9)).finalPrice);+ Assert.AreEqual(49.99, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 1)).finalPrice);+ Assert.AreEqual(49.99, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 5)).finalPrice);+ Assert.AreEqual(49.99, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 9)).finalPrice);Assert.AreEqual(10M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 10)).finalPrice);Assert.AreEqual(10M, (await _pricingService.GetFinalPrice(product, customer, _currency, 0, false, 11)).finalPrice);@@ -195,16 +195,16 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product = new Product {Id = "1",Name = "product name 01",- Price = 49.99M,+ Price = 49.99,EnteredPrice = false,Published = true};- product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99M });+ product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99 });var customer = new Customer();//additional charge +1000//==1049.99- Assert.AreEqual(1049.99M, (await _pricingService.GetFinalPrice(product, customer, _currency, 1000, false, 1)).finalPrice);+ Assert.AreEqual(1049.99, (await _pricingService.GetFinalPrice(product, customer, _currency, 1000, false, 1)).finalPrice);}[TestMethod()]@@ -213,11 +213,11 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product = new Product {Id = "1",Name = "product name 01",- Price = 49.99M,+ Price = 49.99,EnteredPrice = false,Published = true,};- product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99M });+ product.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99 });var customer = new Customer();var discount001 = new Discount {@@ -240,7 +240,7 @@ namespace Grand.Business.Catalog.Tests.Service.PricestempDiscountServiceMock.Setup(x => x.GetAllDiscounts(DiscountType.AssignedToSkus, "1", _currency.CurrencyCode, "", "", false)).ReturnsAsync(new List<Discount>() { discount001 });var discountAmount = discount001.DiscountAmount;- tempDiscountServiceMock.Setup(x => x.GetPreferredDiscount(It.IsAny<List<ApplyDiscount>>(), customer, _currency, product, 49.99M)).ReturnsAsync((new List<ApplyDiscount>(), 10));+ tempDiscountServiceMock.Setup(x => x.GetPreferredDiscount(It.IsAny<List<ApplyDiscount>>(), customer, _currency, product, 49.99)).ReturnsAsync((new List<ApplyDiscount>(), 10));//it should return 39.99 - price cheaper about 10var finalprice = await _pricingService.GetFinalPrice(product, customer, _currency, 0, true, 1);@@ -258,11 +258,11 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product001 = new Product {Id = "242422",Name = "product name 01",- Price = 49.99M,+ Price = 49.99,EnteredPrice = false,Published = true,};- product001.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99M });+ product001.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 49.99 });tempProductService.Setup(x => x.GetProductById("242422", false)).ReturnsAsync(product001);@@ -277,7 +277,7 @@ namespace Grand.Business.Catalog.Tests.Service.PricestempDiscountServiceMock.Setup(x => x.GetAllDiscounts(DiscountType.AssignedToCollections, "1", _currency.CurrencyCode, "", "", false)).ReturnsAsync(new List<Discount>());tempDiscountServiceMock.Setup(x => x.GetAllDiscounts(DiscountType.AssignedToAllProducts, "1", _currency.CurrencyCode, "", "", false)).ReturnsAsync(new List<Discount>());var pp = (await _pricingService.GetUnitPrice(shoppingCartItem, product001)).unitprice;- Assert.AreEqual(49.99M, pp);+ Assert.AreEqual(49.99, pp);}[TestMethod()]@@ -286,11 +286,11 @@ namespace Grand.Business.Catalog.Tests.Service.Pricesvar product001 = new Product {Id = "242422",Name = "product name 01",- Price = 55.11M,+ Price = 55.11,EnteredPrice = false,Published = true,};- product001.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 55.11M });+ product001.ProductPrices.Add(new ProductPrice() { CurrencyCode = "USD", Price = 55.11 });tempProductService.Setup(x => x.GetProductById("242422", false)).ReturnsAsync(product001);var customer001 = new Customer { Id = "98767" };diff --git a/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/FixedRateTestTaxProvider.cs b/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/FixedRateTestTaxProvider.csindex 323b58259..9f7386378 100644--- a/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/FixedRateTestTaxProvider.cs+++ b/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/FixedRateTestTaxProvider.cs@@ -30,12 +30,12 @@ namespace Grand.Business.Catalog.Tests.Service.Tax/// </summary>/// <param name="taxCategoryId">The tax category identifier</param>/// <returns>Tax rate</returns>- protected decimal GetTaxRate(string taxCategoryId)+ protected double GetTaxRate(string taxCategoryId){if (string.IsNullOrEmpty(taxCategoryId))return 0;- decimal rate = 10;+ double rate = 10;return rate;}diff --git a/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/TaxServiceTests.cs b/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/TaxServiceTests.csindex 74090ef4d..b9bfcfa7c 100644--- a/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/TaxServiceTests.cs+++ b/src/Tests/Grand.Business.Catalog.Tests/Service/Tax/TaxServiceTests.cs@@ -112,7 +112,7 @@ namespace Grand.Business.Catalog.Tests.Service.Taxvar customer = new Customer();var product = new Product();_groupServiceMock.Setup(c => c.GetAllByIds(It.IsAny<string[]>())).Returns(Task.FromResult<IList<CustomerGroup>>(new List<CustomerGroup>()));- var pp = await _taxService.GetProductPrice(product, "0", 1000M, true, customer, true);+ var pp = await _taxService.GetProductPrice(product, "0", 1000, true, customer, true);var price = pp.productprice;Assert.AreEqual(1000, price);}@@ -124,10 +124,10 @@ namespace Grand.Business.Catalog.Tests.Service.Taxvar customer = new Customer { IsTaxExempt = true }; //not taxablevar product = new Product();- Assert.AreEqual(Math.Round(909.0909090909090909090909091M, 2), (await _taxService.GetProductPrice(product, "0", 1000M, true, customer, true)).productprice);- Assert.AreEqual(1000M, (await _taxService.GetProductPrice(product, "0", 1000M, true, customer, false)).productprice);- Assert.AreEqual(Math.Round(909.0909090909090909090909091M, 2), (await _taxService.GetProductPrice(product, "0", 1000M, false, customer, true)).productprice);- Assert.AreEqual(1000, (await _taxService.GetProductPrice(product, "0", 1000M, false, customer, false)).productprice);+ Assert.AreEqual(Math.Round(909.0909090909090909090909091M, 2), (await _taxService.GetProductPrice(product, "0", 1000, true, customer, true)).productprice);+ Assert.AreEqual(1000, (await _taxService.GetProductPrice(product, "0", 1000, true, customer, false)).productprice);+ Assert.AreEqual(Math.Round(909.0909090909090909090909091M, 2), (await _taxService.GetProductPrice(product, "0", 1000, false, customer, true)).productprice);+ Assert.AreEqual(1000, (await _taxService.GetProductPrice(product, "0", 1000, false, customer, false)).productprice);}[TestMethod()]@@ -147,10 +147,10 @@ namespace Grand.Business.Catalog.Tests.Service.Taxcustomer.IsTaxExempt = false;string taxCategoryId = ""; //as in code- decimal scUnitPriceWithoutDiscount = 1000.00M;- decimal scUnitPrice = 1000.00M;- decimal scSubTotal = 5000.00M;- decimal discountAmount = 7000.00M;+ double scUnitPriceWithoutDiscount = 1000.00;+ double scUnitPrice = 1000.00;+ double scSubTotal = 5000.00;+ double discountAmount = 7000.00;_groupServiceMock.Setup(c => c.GetAllByIds(It.IsAny<string[]>())).Returns(Task.FromResult<IList<CustomerGroup>>(new List<CustomerGroup>()));//these 6 methods..var scUnitPriceInclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, true, customer, true)).productprice;@@ -181,10 +181,10 @@ namespace Grand.Business.Catalog.Tests.Service.Taxcustomer.IsTaxExempt = false;string taxCategoryId = ""; //as in code_groupServiceMock.Setup(c => c.GetAllByIds(It.IsAny<string[]>())).Returns(Task.FromResult<IList<CustomerGroup>>(new List<CustomerGroup>()));- decimal scUnitPriceWithoutDiscount = 1000.00M;- decimal scUnitPrice = 1000.00M;- decimal scSubTotal = 5000.00M;- decimal discountAmount = 7000.00M;+ double scUnitPriceWithoutDiscount = 1000.00;+ double scUnitPrice = 1000.00;+ double scSubTotal = 5000.00;+ double discountAmount = 7000.00;var scUnitPriceInclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, true, customer, false)).productprice;var scUnitPriceExclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, false, customer, false)).productprice;@@ -214,10 +214,10 @@ namespace Grand.Business.Catalog.Tests.Service.Taxcustomer.IsTaxExempt = true;string taxCategoryId = "";- decimal scUnitPriceWithoutDiscount = 1000.00M;- decimal scUnitPrice = 1000.00M;- decimal scSubTotal = 5000.00M;- decimal discountAmount = 7000.00M;+ double scUnitPriceWithoutDiscount = 1000.00;+ double scUnitPrice = 1000.00;+ double scSubTotal = 5000.00;+ double discountAmount = 7000.00;var scUnitPriceInclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, true, customer, true)).productprice;var scUnitPriceExclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, false, customer, true)).productprice;@@ -247,10 +247,10 @@ namespace Grand.Business.Catalog.Tests.Service.Taxcustomer.IsTaxExempt = true;string taxCategoryId = "";- decimal scUnitPriceWithoutDiscount = 1000.00M;- decimal scUnitPrice = 1000.00M;- decimal scSubTotal = 5000.00M;- decimal discountAmount = 7000.00M;+ double scUnitPriceWithoutDiscount = 1000.00;+ double scUnitPrice = 1000.00;+ double scSubTotal = 5000.00;+ double discountAmount = 7000.00;var scUnitPriceInclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, true, customer, false)).productprice;var scUnitPriceExclTax = (await _taxService.GetProductPrice(product, taxCategoryId, scUnitPrice, false, customer, false)).productprice;diff --git a/src/Tests/Grand.Business.Checkout.Tests/Commands/Orders/CalculateLoyaltyPointsCommandHandlerTests.cs b/src/Tests/Grand.Business.Checkout.Tests/Commands/Orders/CalculateLoyaltyPointsCommandHandlerTests.csindex 4cff1615c..1462abb0b 100644--- a/src/Tests/Grand.Business.Checkout.Tests/Commands/Orders/CalculateLoyaltyPointsCommandHandlerTests.cs+++ b/src/Tests/Grand.Business.Checkout.Tests/Commands/Orders/CalculateLoyaltyPointsCommandHandlerTests.cs@@ -33,7 +33,7 @@ namespace Grand.Business.Checkout.Tests.Commands.OrdersCustomer = null};var result = await _handler.Handle(command, default);- Assert.AreEqual(decimal.Zero, result);+ Assert.AreEqual(0, result);}[TestMethod]@@ -46,7 +46,7 @@ namespace Grand.Business.Checkout.Tests.Commands.OrdersCustomer = new Domain.Customers.Customer()};var result = await _handler.Handle(command, default);- Assert.AreEqual(decimal.Zero, result);+ Assert.AreEqual(0, result);}[TestMethod]diff --git a/src/Tests/Grand.Business.Checkout.Tests/Services/Payments/PaymentServiceTests.cs b/src/Tests/Grand.Business.Checkout.Tests/Services/Payments/PaymentServiceTests.csindex ba121b4be..06a36fcc2 100644--- a/src/Tests/Grand.Business.Checkout.Tests/Services/Payments/PaymentServiceTests.cs+++ b/src/Tests/Grand.Business.Checkout.Tests/Services/Payments/PaymentServiceTests.cs@@ -84,7 +84,7 @@ namespace Grand.Business.Checkout.Tests.Services.Paymentspublic async Task ProcessPayment_OrderTotalZero_ReturnPaidPaymentStatus(){var request = new PaymentTransaction();- request.TransactionAmount = decimal.Zero;+ request.TransactionAmount = 0;var response = await _paymentService.ProcessPayment(request);Assert.IsTrue(response.NewPaymentTransactionStatus == TransactionStatus.Paid);}@@ -168,7 +168,7 @@ namespace Grand.Business.Checkout.Tests.Services.Paymentsnew ShoppingCartItem(),new ShoppingCartItem()};- Assert.AreEqual(decimal.Zero, await _paymentService.GetAdditionalHandlingFee(cart, null));+ Assert.AreEqual(0, await _paymentService.GetAdditionalHandlingFee(cart, null));}}}diff --git a/src/Tests/Grand.Business.Common.Tests/Services/Directory/CurrencyServiceTests.cs b/src/Tests/Grand.Business.Common.Tests/Services/Directory/CurrencyServiceTests.csindex a4b55cd24..105435223 100644--- a/src/Tests/Grand.Business.Common.Tests/Services/Directory/CurrencyServiceTests.cs+++ b/src/Tests/Grand.Business.Common.Tests/Services/Directory/CurrencyServiceTests.cs@@ -42,7 +42,7 @@ namespace Grand.Business.Common.Tests.Services.DirectoryId = "1",Name = "US Dollar",CurrencyCode = "USD",- Rate = 1.2M,+ Rate = 1.2,DisplayLocale = "en-US",CustomFormatting = "",Published = true,@@ -66,7 +66,7 @@ namespace Grand.Business.Common.Tests.Services.DirectoryId = "3",Name = "Russian Rouble",CurrencyCode = "RUB",- Rate = 34.5M,+ Rate = 34.5,DisplayLocale = "ru-RU",CustomFormatting = "",Published = true,@@ -115,10 +115,10 @@ namespace Grand.Business.Common.Tests.Services.Directory{//e.g.//10.1 * 1.5 = 15.15- Assert.AreEqual(15.15M, _currencyService.ConvertCurrency(10.1M, 1.5M));- Assert.AreEqual(10.122M, _currencyService.ConvertCurrency(10.122M, 1));- Assert.AreEqual(34.4148M, _currencyService.ConvertCurrency(10.122M, 3.4M));- Assert.AreEqual(0, _currencyService.ConvertCurrency(10.1M, 0));+ Assert.AreEqual(15.15, _currencyService.ConvertCurrency(10.1, 1.5));+ Assert.AreEqual(10.122, _currencyService.ConvertCurrency(10.122, 1));+ Assert.AreEqual(34.4148, _currencyService.ConvertCurrency(10.122, 3.4));+ Assert.AreEqual(0, _currencyService.ConvertCurrency(10.1, 0));Assert.AreEqual(0, _currencyService.ConvertCurrency(0, 5));}diff --git a/src/Tests/Grand.Business.System.Tests/Services/BackgroundService/EndAuctionsTaskTests.cs b/src/Tests/Grand.Business.System.Tests/Services/BackgroundService/EndAuctionsTaskTests.csindex 2750fce49..cc08895f0 100644--- a/src/Tests/Grand.Business.System.Tests/Services/BackgroundService/EndAuctionsTaskTests.cs+++ b/src/Tests/Grand.Business.System.Tests/Services/BackgroundService/EndAuctionsTaskTests.cs@@ -61,7 +61,7 @@ namespace Grand.Business.System.Tests.Services.BackgroundService_auctionMock.Setup(c => c.GetAuctionsToEnd()).ReturnsAsync(new List<Product>() { new Product() { Id = "id" } });_auctionMock.Setup(c => c.GetBidsByProductId(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>())).ReturnsAsync(() => new PagedList<Bid>() { new Bid()});_shoppingCartMock.Setup(c => c.AddToCart(It.IsAny<Customer>(), It.IsAny<string>(), It.IsAny<ShoppingCartType>(), It.IsAny<string>(),- It.IsAny<string>(), It.IsAny<IList<CustomAttribute>>(), It.IsAny<decimal?>(), It.IsAny<DateTime?>(),+ It.IsAny<string>(), It.IsAny<IList<CustomAttribute>>(), It.IsAny<double?>(), It.IsAny<DateTime?>(),It.IsAny<DateTime?>(), It.IsAny<int>(), It.IsAny<bool>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<bool>())).ReturnsAsync(new List<string>() { "warning" });await _task.Execute();@@ -75,7 +75,7 @@ namespace Grand.Business.System.Tests.Services.BackgroundService_auctionMock.Setup(c => c.GetAuctionsToEnd()).ReturnsAsync(new List<Product>() { new Product() { Id = "id" } });_auctionMock.Setup(c => c.GetBidsByProductId(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int>())).ReturnsAsync(() => new PagedList<Bid>() { new Bid() });_shoppingCartMock.Setup(c => c.AddToCart(It.IsAny<Customer>(), It.IsAny<string>(), It.IsAny<ShoppingCartType>(), It.IsAny<string>(),- It.IsAny<string>(), It.IsAny<IList<CustomAttribute>>(), It.IsAny<decimal?>(), It.IsAny<DateTime?>(),+ It.IsAny<string>(), It.IsAny<IList<CustomAttribute>>(), It.IsAny<double?>(), It.IsAny<DateTime?>(),It.IsAny<DateTime?>(), It.IsAny<int>(), It.IsAny<bool>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<bool>())).ReturnsAsync(new List<string>() );await _task.Execute();diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/Double.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/Double.cshtmlindex b1192125a..ad72ffa96 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/Double.cshtml+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/Double.cshtml@@ -1,4 +1,4 @@-@model double+@model Double@Html.TextBoxFor(model => model)<script>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleN4.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleN4.cshtmlnew file mode 100644index 000000000..5bb4794bf--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleN4.cshtml@@ -0,0 +1,12 @@+@model Double[email protected](model => model)+@using System.Globalization+<script>+ $(document).ready(function() {+ $("#@Html.IdForModel()").kendoNumericTextBox({+ culture: "@CultureInfo.CurrentCulture.Name",+ format: 'n4',+ decimals: 4+ });+ });+</script>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleNullable.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleNullable.cshtmlnew file mode 100644index 000000000..69a4be4f6--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shared/EditorTemplates/DoubleNullable.cshtml@@ -0,0 +1,11 @@+@model Double?[email protected](model => model)+@using System.Globalization+<script>+ $(document).ready(function () {+ $("#@Html.IdForModel()").kendoNumericTextBox({+ culture: "@CultureInfo.CurrentCulture.Name",+ format: "n2",+ });+ });+</script>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Controllers/CurrencyController.cs b/src/Web/Grand.Web.Admin/Controllers/CurrencyController.csindex b58de5bf9..c20d7a36c 100644--- a/src/Web/Grand.Web.Admin/Controllers/CurrencyController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/CurrencyController.cs@@ -141,7 +141,7 @@ namespace Grand.Web.Admin.Controllers[PermissionAuthorizeAction(PermissionActionName.Edit)]public async Task<IActionResult> ApplyRate(string currencyCode, string rate){- var _rate = decimal.Parse(rate, CultureInfo.InvariantCulture.NumberFormat);+ var _rate = double.Parse(rate, CultureInfo.InvariantCulture.NumberFormat);var currency = await _currencyService.GetCurrencyByCode(currencyCode);if (currency != null){diff --git a/src/Web/Grand.Web.Admin/Controllers/CustomerController.cs b/src/Web/Grand.Web.Admin/Controllers/CustomerController.csindex 4a185cf4d..b529826fa 100644--- a/src/Web/Grand.Web.Admin/Controllers/CustomerController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/CustomerController.cs@@ -896,7 +896,7 @@ namespace Grand.Web.Admin.Controllers}[PermissionAuthorizeAction(PermissionActionName.Edit)][HttpPost]- public async Task<IActionResult> UpdateCart(string id, string customerId, decimal? unitPriceValue)+ public async Task<IActionResult> UpdateCart(string id, string customerId, double? unitPriceValue){var customer = await _customerService.GetCustomerById(customerId);if (customer == null || customer.Deleted || await CheckSalesManager(customer))diff --git a/src/Web/Grand.Web.Admin/Controllers/OrderController.cs b/src/Web/Grand.Web.Admin/Controllers/OrderController.csindex 9b53ddfe6..41f5c6b06 100644--- a/src/Web/Grand.Web.Admin/Controllers/OrderController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/OrderController.cs@@ -698,7 +698,7 @@ namespace Grand.Web.Admin.Controllersif (orderItem == null)throw new ArgumentException("No order item found with the specified id");- if (!decimal.TryParse(form["pvUnitPriceExclTax" + orderItemId], out decimal unitPriceExclTax))+ if (!double.TryParse(form["pvUnitPriceExclTax" + orderItemId], out double unitPriceExclTax))unitPriceExclTax = orderItem.UnitPriceExclTax;if (!int.TryParse(form["pvQuantity" + orderItemId], out int quantity))quantity = orderItem.Quantity;diff --git a/src/Web/Grand.Web.Admin/Controllers/PaymentTransactionController.cs b/src/Web/Grand.Web.Admin/Controllers/PaymentTransactionController.csindex cafa3c5e2..553b14b6a 100644--- a/src/Web/Grand.Web.Admin/Controllers/PaymentTransactionController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/PaymentTransactionController.cs@@ -200,9 +200,9 @@ namespace Grand.Web.Admin.Controllersmodel.CanMarkAsPaid = await _mediator.Send(new CanMarkPaymentTransactionAsPaidQuery() { PaymentTransaction = paymentTransaction });model.CanRefund = await _mediator.Send(new CanRefundQuery() { PaymentTransaction = paymentTransaction });model.CanRefundOffline = await _mediator.Send(new CanRefundOfflineQuery() { PaymentTransaction = paymentTransaction });- model.CanPartiallyRefund = await _mediator.Send(new CanPartiallyRefundQuery() { PaymentTransaction = paymentTransaction, AmountToRefund = decimal.Zero });- model.CanPartiallyRefundOffline = await _mediator.Send(new CanPartiallyRefundOfflineQuery() { PaymentTransaction = paymentTransaction, AmountToRefund = decimal.Zero });- model.CanPartiallyPaidOffline = await _mediator.Send(new CanPartiallyPaidOfflineQuery() { PaymentTransaction = paymentTransaction, AmountToPaid = decimal.Zero });+ model.CanPartiallyRefund = await _mediator.Send(new CanPartiallyRefundQuery() { PaymentTransaction = paymentTransaction, AmountToRefund = 0 });+ model.CanPartiallyRefundOffline = await _mediator.Send(new CanPartiallyRefundOfflineQuery() { PaymentTransaction = paymentTransaction, AmountToRefund = 0 });+ model.CanPartiallyPaidOffline = await _mediator.Send(new CanPartiallyPaidOfflineQuery() { PaymentTransaction = paymentTransaction, AmountToPaid = 0 });model.CanVoid = await _mediator.Send(new CanVoidQuery() { PaymentTransaction = paymentTransaction });model.CanVoidOffline = await _mediator.Send(new CanVoidOfflineQuery() { PaymentTransaction = paymentTransaction });@@ -415,11 +415,11 @@ namespace Grand.Web.Admin.Controllerstry{- decimal amountToRefund = model.AmountToRefund;- if (amountToRefund <= decimal.Zero)+ double amountToRefund = model.AmountToRefund;+ if (amountToRefund <= 0)throw new GrandException("Enter amount to refund");- decimal maxAmountToRefund = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;+ double maxAmountToRefund = paymentTransaction.TransactionAmount - paymentTransaction.RefundedAmount;if (amountToRefund > maxAmountToRefund)amountToRefund = maxAmountToRefund;@@ -483,11 +483,11 @@ namespace Grand.Web.Admin.Controllerstry{- decimal amountToPaid = model.AmountToPaid;- if (amountToPaid <= decimal.Zero)+ double amountToPaid = model.AmountToPaid;+ if (amountToPaid <= 0)throw new GrandException("Enter amount to refund");- decimal maxAmountToPaid = paymentTransaction.TransactionAmount - paymentTransaction.PaidAmount;+ double maxAmountToPaid = paymentTransaction.TransactionAmount - paymentTransaction.PaidAmount;if (amountToPaid > maxAmountToPaid)amountToPaid = maxAmountToPaid;diff --git a/src/Web/Grand.Web.Admin/Interfaces/ICustomerViewModelService.cs b/src/Web/Grand.Web.Admin/Interfaces/ICustomerViewModelService.csindex 793f50d7d..5f3b6e8d9 100644--- a/src/Web/Grand.Web.Admin/Interfaces/ICustomerViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Interfaces/ICustomerViewModelService.cs@@ -32,7 +32,7 @@ namespace Grand.Web.Admin.InterfacesTask<Address> UpdateAddressModel(Customer customer, Address address, CustomerAddressModel model, List<CustomAttribute> customAttributes);Task<IList<ShoppingCartItemModel>> PrepareShoppingCartItemModel(string customerId, int cartTypeId);Task DeleteCart(Customer customer, string id);- Task<IList<string>> UpdateCart(Customer customer, string shoppingCartId, decimal? unitprice);+ Task<IList<string>> UpdateCart(Customer customer, string shoppingCartId, double? unitprice);Task<(IEnumerable<CustomerModel.ProductPriceModel> productPriceModels, int totalCount)> PrepareProductPriceModel(string customerId, int pageIndex, int pageSize);Task<(IEnumerable<CustomerModel.ProductModel> productModels, int totalCount)> PreparePersonalizedProducts(string customerId, int pageIndex, int pageSize);Task<CustomerModel.AddProductModel> PrepareCustomerModelAddProductModel();diff --git a/src/Web/Grand.Web.Admin/Interfaces/IShipmentViewModelService.cs b/src/Web/Grand.Web.Admin/Interfaces/IShipmentViewModelService.csindex 49a071878..5d7cc3747 100644--- a/src/Web/Grand.Web.Admin/Interfaces/IShipmentViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Interfaces/IShipmentViewModelService.cs@@ -19,7 +19,7 @@ namespace Grand.Web.Admin.InterfacesTask DeleteShipmentNote(Shipment shipment, string id);Task<ShipmentListModel> PrepareShipmentListModel();Task<ShipmentModel> PrepareShipmentModel(Order order);- Task<(Shipment shipment, decimal? totalWeight)> PrepareShipment(Order order, IList<OrderItem> orderItems, IFormCollection form);+ Task<(Shipment shipment, double? totalWeight)> PrepareShipment(Order order, IList<OrderItem> orderItems, IFormCollection form);Task<(bool valid, string message)> ValidStockShipment(Shipment shipment);Task<(IEnumerable<Shipment> shipments, int totalCount)> PrepareShipments(ShipmentListModel model, int pageIndex, int pageSize);}diff --git a/src/Web/Grand.Web.Admin/Models/Catalog/BulkEditProductModel.cs b/src/Web/Grand.Web.Admin/Models/Catalog/BulkEditProductModel.csindex 2ba294d7f..b2eee78e8 100644--- a/src/Web/Grand.Web.Admin/Models/Catalog/BulkEditProductModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Catalog/BulkEditProductModel.cs@@ -14,10 +14,10 @@ namespace Grand.Web.Admin.Models.Catalogpublic string Sku { get; set; }[GrandResourceDisplayName("Admin.Catalog.BulkEdit.Fields.Price")]- public decimal Price { get; set; }+ public double Price { get; set; }[GrandResourceDisplayName("Admin.Catalog.BulkEdit.Fields.OldPrice")]- public decimal OldPrice { get; set; }+ public double OldPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.BulkEdit.Fields.ManageInventoryMethod")]public string ManageInventoryMethod { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeCombinationModel.cs b/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeCombinationModel.csindex d55dca93a..b2d9445b3 100644--- a/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeCombinationModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeCombinationModel.cs@@ -40,8 +40,8 @@ namespace Grand.Web.Admin.Models.Catalogpublic string Gtin { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.OverriddenPrice")]- [UIHint("DecimalNullable")]- public decimal? OverriddenPrice { get; set; }+ [UIHint("DoubleNullable")]+ public double? OverriddenPrice { get; set; }public string PrimaryStoreCurrencyCode { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.NotifyAdminForQuantityBelow")]diff --git a/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeModel.cs b/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeModel.csindex a758b9e42..b6c7e4b3f 100644--- a/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Catalog/ProductAttributeModel.cs@@ -71,19 +71,19 @@ namespace Grand.Web.Admin.Models.Catalogpublic string Name { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.PriceAdjustment")]- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.PriceAdjustment")]//used only on the values list pagepublic string PriceAdjustmentStr { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.WeightAdjustment")]- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.WeightAdjustment")]//used only on the values list pagepublic string WeightAdjustmentStr { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.Cost")]- public decimal Cost { get; set; }+ public double Cost { get; set; }[GrandResourceDisplayName("Admin.Catalog.Attributes.ProductAttributes.PredefinedValues.Fields.IsPreSelected")]public bool IsPreSelected { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Catalog/ProductModel.cs b/src/Web/Grand.Web.Admin/Models/Catalog/ProductModel.csindex 90949cd2b..2a0bbffe5 100644--- a/src/Web/Grand.Web.Admin/Models/Catalog/ProductModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Catalog/ProductModel.cs@@ -127,8 +127,8 @@ namespace Grand.Web.Admin.Models.Catalogpublic int GiftVoucherTypeId { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.OverriddenGiftVoucherAmount")]- [UIHint("DecimalNullable")]- public decimal? OverGiftAmount { get; set; }+ [UIHint("DoubleNullable")]+ public double? OverGiftAmount { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.RequireOtherProducts")]public bool RequireOtherProducts { get; set; }@@ -198,7 +198,7 @@ namespace Grand.Web.Admin.Models.Catalogpublic bool ShipSeparately { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.AdditionalShippingCharge")]- public decimal AdditionalShippingCharge { get; set; }+ public double AdditionalShippingCharge { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.DeliveryDate")]public string DeliveryDateId { get; set; }@@ -282,38 +282,38 @@ namespace Grand.Web.Admin.Models.Catalogpublic bool CallForPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.Price")]- public decimal Price { get; set; }+ public double Price { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.OldPrice")]- public decimal OldPrice { get; set; }+ public double OldPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.CatalogPrice")]- public decimal CatalogPrice { get; set; }+ public double CatalogPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.StartPrice")]- public decimal StartPrice { get; set; }+ public double StartPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.ProductCost")]- public decimal ProductCost { get; set; }+ public double ProductCost { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.EnteredPrice")]public bool EnteredPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.MinEnteredPrice")]- public decimal MinEnteredPrice { get; set; }+ public double MinEnteredPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.MaxEnteredPrice")]- public decimal MaxEnteredPrice { get; set; }+ public double MaxEnteredPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.BasepriceEnabled")]public bool BasepriceEnabled { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.BasepriceAmount")]- public decimal BasepriceAmount { get; set; }+ public double BasepriceAmount { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.BasepriceUnit")]public string BasepriceUnitId { get; set; }public IList<SelectListItem> AvailableBasepriceUnits { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.BasepriceBaseAmount")]- public decimal BasepriceBaseAmount { get; set; }+ public double BasepriceBaseAmount { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.BasepriceBaseUnit")]public string BasepriceBaseUnitId { get; set; }public IList<SelectListItem> AvailableBasepriceBaseUnits { get; set; }@@ -332,16 +332,16 @@ namespace Grand.Web.Admin.Models.Catalogpublic IList<SelectListItem> AvailableUnits { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.Weight")]- public decimal Weight { get; set; }+ public double Weight { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.Length")]- public decimal Length { get; set; }+ public double Length { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.Width")]- public decimal Width { get; set; }+ public double Width { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.Height")]- public decimal Height { get; set; }+ public double Height { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.Fields.AvailableStartDateTime")][UIHint("DateTimeNullable")]@@ -794,7 +794,7 @@ namespace Grand.Web.Admin.Models.Catalog{public string CurrencyCode { get; set; }- public decimal Price { get; set; }+ public double Price { get; set; }}public partial class TierPriceModel : BaseEntityModel@@ -826,7 +826,7 @@ namespace Grand.Web.Admin.Models.Catalogpublic int Quantity { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.TierPrices.Fields.Price")]- public decimal Price { get; set; }+ public double Price { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.TierPrices.Fields.StartDateTime")][UIHint("DateTimeNullable")]@@ -1052,19 +1052,19 @@ namespace Grand.Web.Admin.Models.Catalogpublic bool DisplayImageSquaresPicture { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.PriceAdjustment")]- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.PriceAdjustment")]//used only on the values list pagepublic string PriceAdjustmentStr { get; set; }public string PrimaryStoreCurrencyCode { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.WeightAdjustment")]- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.WeightAdjustment")]//used only on the values list pagepublic string WeightAdjustmentStr { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.Cost")]- public decimal Cost { get; set; }+ public double Cost { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.Attributes.Values.Fields.Quantity")]public int Quantity { get; set; }@@ -1172,8 +1172,8 @@ namespace Grand.Web.Admin.Models.Catalogpublic string Gtin { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.OverriddenPrice")]- [UIHint("DecimalNullable")]- public decimal? OverriddenPrice { get; set; }+ [UIHint("DoubleNullable")]+ public double? OverriddenPrice { get; set; }[GrandResourceDisplayName("Admin.Catalog.Products.ProductAttributes.AttributeCombinations.Fields.NotifyAdminForQuantityBelow")]public int NotifyAdminForQuantityBelow { get; set; }@@ -1198,7 +1198,7 @@ namespace Grand.Web.Admin.Models.Catalog/// <summary>/// Gets or sets the price/// </summary>- public decimal Price { get; set; }+ public double Price { get; set; }}#endregiondiff --git a/src/Web/Grand.Web.Admin/Models/Customers/BestCustomerReportLineModel.cs b/src/Web/Grand.Web.Admin/Models/Customers/BestCustomerReportLineModel.csindex 8cfdea3d2..ab028b2be 100644--- a/src/Web/Grand.Web.Admin/Models/Customers/BestCustomerReportLineModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Customers/BestCustomerReportLineModel.cs@@ -13,6 +13,6 @@ namespace Grand.Web.Admin.Models.Customerspublic string OrderTotal { get; set; }[GrandResourceDisplayName("Admin.Reports.Customers.BestBy.Fields.OrderCount")]- public decimal OrderCount { get; set; }+ public double OrderCount { get; set; }}}\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Models/Customers/CustomerGroupModel.cs b/src/Web/Grand.Web.Admin/Models/Customers/CustomerGroupModel.csindex f9ecc2e5b..465aaad16 100644--- a/src/Web/Grand.Web.Admin/Models/Customers/CustomerGroupModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Customers/CustomerGroupModel.cs@@ -30,12 +30,12 @@ namespace Grand.Web.Admin.Models.Customerspublic bool EnablePasswordLifetime { get; set; }[GrandResourceDisplayName("Admin.Customers.CustomerGroups.Fields.MinOrderAmount")]- [UIHint("DecimalNullable")]- public decimal? MinOrderAmount { get; set; }+ [UIHint("DoubleNullable")]+ public double? MinOrderAmount { get; set; }[GrandResourceDisplayName("Admin.Customers.CustomerGroups.Fields.MaxOrderAmount")]- [UIHint("DecimalNullable")]- public decimal? MaxOrderAmount { get; set; }+ [UIHint("DoubleNullable")]+ public double? MaxOrderAmount { get; set; }}}\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Models/Customers/CustomerModel.cs b/src/Web/Grand.Web.Admin/Models/Customers/CustomerModel.csindex f8e0e9c8b..4a5cf9a46 100644--- a/src/Web/Grand.Web.Admin/Models/Customers/CustomerModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Customers/CustomerModel.cs@@ -323,7 +323,7 @@ namespace Grand.Web.Admin.Models.Customers[GrandResourceDisplayName("Admin.Customers.Customers.ProductPrice.ProductName")]public string ProductName { get; set; }[GrandResourceDisplayName("Admin.Customers.Customers.ProductPrice.Price")]- public decimal Price { get; set; }+ public double Price { get; set; }public string ProductId { get; set; }}public partial class AddProductModel : BaseModeldiff --git a/src/Web/Grand.Web.Admin/Models/Customers/SalesEmployeeModel.cs b/src/Web/Grand.Web.Admin/Models/Customers/SalesEmployeeModel.csindex 558229686..bd92f0c4e 100644--- a/src/Web/Grand.Web.Admin/Models/Customers/SalesEmployeeModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Customers/SalesEmployeeModel.cs@@ -18,7 +18,7 @@ namespace Grand.Web.Admin.Models.Customerspublic bool Active { get; set; }[GrandResourceDisplayName("Admin.Customers.SalesEmployee.Fields.Commission")]- public decimal? Commission { get; set; }+ public double? Commission { get; set; }[GrandResourceDisplayName("Admin.Customers.SalesEmployee.Fields.DisplayOrder")]public int DisplayOrder { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Directory/CurrencyModel.cs b/src/Web/Grand.Web.Admin/Models/Directory/CurrencyModel.csindex ab7666b02..18f2af401 100644--- a/src/Web/Grand.Web.Admin/Models/Directory/CurrencyModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Directory/CurrencyModel.cs@@ -26,9 +26,9 @@ namespace Grand.Web.Admin.Models.Directorypublic string DisplayLocale { get; set; }- [UIHint("DecimalN4")]+ [UIHint("DoubleN4")][GrandResourceDisplayName("Admin.Configuration.Currencies.Fields.Rate")]- public decimal Rate { get; set; }+ public double Rate { get; set; }[GrandResourceDisplayName("Admin.Configuration.Currencies.Fields.CustomFormatting")]public string CustomFormatting { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Directory/MeasureDimensionModel.cs b/src/Web/Grand.Web.Admin/Models/Directory/MeasureDimensionModel.csindex 3e1a32424..387c03c95 100644--- a/src/Web/Grand.Web.Admin/Models/Directory/MeasureDimensionModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Directory/MeasureDimensionModel.cs@@ -14,7 +14,7 @@ namespace Grand.Web.Admin.Models.Directorypublic string SystemKeyword { get; set; }[GrandResourceDisplayName("Admin.Configuration.Measures.Dimensions.Fields.Ratio")]- public decimal Ratio { get; set; }+ public double Ratio { get; set; }[GrandResourceDisplayName("Admin.Configuration.Measures.Dimensions.Fields.DisplayOrder")]public int DisplayOrder { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Directory/MeasureWeightModel.cs b/src/Web/Grand.Web.Admin/Models/Directory/MeasureWeightModel.csindex 073b6230e..ffbc8b8a5 100644--- a/src/Web/Grand.Web.Admin/Models/Directory/MeasureWeightModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Directory/MeasureWeightModel.cs@@ -12,7 +12,7 @@ namespace Grand.Web.Admin.Models.Directorypublic string SystemKeyword { get; set; }[GrandResourceDisplayName("Admin.Configuration.Measures.Weights.Fields.Ratio")]- public decimal Ratio { get; set; }+ public double Ratio { get; set; }[GrandResourceDisplayName("Admin.Configuration.Measures.Weights.Fields.DisplayOrder")]public int DisplayOrder { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Discounts/DiscountModel.cs b/src/Web/Grand.Web.Admin/Models/Discounts/DiscountModel.csindex 34e20e8a2..05de4abe4 100644--- a/src/Web/Grand.Web.Admin/Models/Discounts/DiscountModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Discounts/DiscountModel.cs@@ -34,10 +34,10 @@ namespace Grand.Web.Admin.Models.Discountspublic bool UsePercentage { get; set; }[GrandResourceDisplayName("admin.marketing.Discounts.Fields.DiscountPercentage")]- public decimal DiscountPercentage { get; set; }+ public double DiscountPercentage { get; set; }[GrandResourceDisplayName("admin.marketing.Discounts.Fields.DiscountAmount")]- public decimal DiscountAmount { get; set; }+ public double DiscountAmount { get; set; }[GrandResourceDisplayName("admin.marketing.Discounts.Fields.CurrencyCode")]public string CurrencyCode { get; set; }@@ -50,8 +50,8 @@ namespace Grand.Web.Admin.Models.Discountspublic string DiscountPluginName { get; set; }[GrandResourceDisplayName("admin.marketing.Discounts.Fields.MaximumDiscountAmount")]- [UIHint("DecimalNullable")]- public decimal? MaximumDiscountAmount { get; set; }+ [UIHint("DoubleNullable")]+ public double? MaximumDiscountAmount { get; set; }[GrandResourceDisplayName("admin.marketing.Discounts.Fields.StartDate")][UIHint("DateTimeNullable")]diff --git a/src/Web/Grand.Web.Admin/Models/Documents/DocumentModel.cs b/src/Web/Grand.Web.Admin/Models/Documents/DocumentModel.csindex 0ac46e8c1..22def0554 100644--- a/src/Web/Grand.Web.Admin/Models/Documents/DocumentModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Documents/DocumentModel.cs@@ -77,10 +77,10 @@ namespace Grand.Web.Admin.Models.Documentspublic string CurrencyCode { get; set; }[GrandResourceDisplayName("Admin.Documents.Document.Fields.TotalAmount")]- public decimal TotalAmount { get; set; }+ public double TotalAmount { get; set; }[GrandResourceDisplayName("Admin.Documents.Document.Fields.OutstandAmount")]- public decimal OutstandAmount { get; set; }+ public double OutstandAmount { get; set; }[GrandResourceDisplayName("Admin.Documents.Document.Fields.Quantity")]public int Quantity { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Orders/BestsellersReportLineModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/BestsellersReportLineModel.csindex 9086754b5..10b37e918 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/BestsellersReportLineModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/BestsellersReportLineModel.cs@@ -13,6 +13,6 @@ namespace Grand.Web.Admin.Models.Orderspublic string TotalAmount { get; set; }[GrandResourceDisplayName("Admin.Reports.Bestsellers.Fields.TotalQuantity")]- public decimal TotalQuantity { get; set; }+ public double TotalQuantity { get; set; }}}\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Models/Orders/CheckoutAttributeValueModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/CheckoutAttributeValueModel.csindex 7dda497c5..2792879d9 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/CheckoutAttributeValueModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/CheckoutAttributeValueModel.cs@@ -24,11 +24,11 @@ namespace Grand.Web.Admin.Models.Orderspublic bool DisplayColorSquaresRgb { get; set; }[GrandResourceDisplayName("Admin.Orders.CheckoutAttributes.Values.Fields.PriceAdjustment")]- public decimal PriceAdjustment { get; set; }+ public double PriceAdjustment { get; set; }public string PrimaryStoreCurrencyCode { get; set; }[GrandResourceDisplayName("Admin.Orders.CheckoutAttributes.Values.Fields.WeightAdjustment")]- public decimal WeightAdjustment { get; set; }+ public double WeightAdjustment { get; set; }public string BaseWeightIn { get; set; }[GrandResourceDisplayName("Admin.Orders.CheckoutAttributes.Values.Fields.IsPreSelected")]diff --git a/src/Web/Grand.Web.Admin/Models/Orders/GiftVoucherModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/GiftVoucherModel.csindex 1cc688dd9..9fadc7494 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/GiftVoucherModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/GiftVoucherModel.cs@@ -21,7 +21,7 @@ namespace Grand.Web.Admin.Models.Orderspublic int PurchasedWithOrderNumber { get; set; }[GrandResourceDisplayName("Admin.GiftVouchers.Fields.Amount")]- public decimal Amount { get; set; }+ public double Amount { get; set; }[GrandResourceDisplayName("Admin.GiftVouchers.Fields.CurrencyCode")]public string CurrencyCode { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Orders/OrderModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/OrderModel.csindex 6e5aa868a..b912d006d 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/OrderModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/OrderModel.cs@@ -113,33 +113,33 @@ namespace Grand.Web.Admin.Models.Orderspublic string CurrencyCode { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.CurrencyRate")]- [UIHint("DecimalN4")]- public decimal CurrencyRate { get; set; }+ [UIHint("DoubleN4")]+ public double CurrencyRate { get; set; }//edit totals[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderSubtotal")]- public decimal OrderSubtotalInclTaxValue { get; set; }+ public double OrderSubtotalInclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderSubtotal")]- public decimal OrderSubtotalExclTaxValue { get; set; }+ public double OrderSubtotalExclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderSubTotalDiscount")]- public decimal OrderSubTotalDiscountInclTaxValue { get; set; }+ public double OrderSubTotalDiscountInclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderSubTotalDiscount")]- public decimal OrderSubTotalDiscountExclTaxValue { get; set; }+ public double OrderSubTotalDiscountExclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderShipping")]- public decimal OrderShippingInclTaxValue { get; set; }+ public double OrderShippingInclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderShipping")]- public decimal OrderShippingExclTaxValue { get; set; }+ public double OrderShippingExclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.PaymentMethodAdditionalFee")]- public decimal PaymentMethodAdditionalFeeInclTaxValue { get; set; }+ public double PaymentMethodAdditionalFeeInclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.PaymentMethodAdditionalFee")]- public decimal PaymentMethodAdditionalFeeExclTaxValue { get; set; }+ public double PaymentMethodAdditionalFeeExclTaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.Tax")]- public decimal TaxValue { get; set; }+ public double TaxValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.TaxRates")]public string TaxRatesValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderTotalDiscount")]- public decimal OrderTotalDiscountValue { get; set; }+ public double OrderTotalDiscountValue { get; set; }[GrandResourceDisplayName("Admin.Orders.Fields.Edit.OrderTotal")]- public decimal OrderTotalValue { get; set; }+ public double OrderTotalValue { get; set; }//order status[GrandResourceDisplayName("Admin.Orders.Fields.OrderStatus")]@@ -206,8 +206,8 @@ namespace Grand.Web.Admin.Models.Orders//refund info[GrandResourceDisplayName("Admin.Orders.Fields.PartialRefund.AmountToRefund")]- public decimal AmountToRefund { get; set; }- public decimal MaxAmountToRefund { get; set; }+ public double AmountToRefund { get; set; }+ public double MaxAmountToRefund { get; set; }public string PrimaryStoreCurrencyCode { get; set; }//workflow info@@ -236,8 +236,8 @@ namespace Grand.Web.Admin.Models.Orderspublic string UnitPriceInclTax { get; set; }public string UnitPriceExclTax { get; set; }- public decimal UnitPriceInclTaxValue { get; set; }- public decimal UnitPriceExclTaxValue { get; set; }+ public double UnitPriceInclTaxValue { get; set; }+ public double UnitPriceExclTaxValue { get; set; }public int Quantity { get; set; }public int OpenQty { get; set; }@@ -247,13 +247,13 @@ namespace Grand.Web.Admin.Models.Orderspublic string DiscountInclTax { get; set; }public string DiscountExclTax { get; set; }- public decimal DiscountInclTaxValue { get; set; }- public decimal DiscountExclTaxValue { get; set; }+ public double DiscountInclTaxValue { get; set; }+ public double DiscountExclTaxValue { get; set; }public string SubTotalInclTax { get; set; }public string SubTotalExclTax { get; set; }- public decimal SubTotalInclTaxValue { get; set; }- public decimal SubTotalExclTaxValue { get; set; }+ public double SubTotalInclTaxValue { get; set; }+ public double SubTotalExclTaxValue { get; set; }public string AttributeInfo { get; set; }public string RecurringInfo { get; set; }@@ -268,7 +268,7 @@ namespace Grand.Web.Admin.Models.Orderspublic Guid LicenseDownloadGuid { get; set; }public string Commission { get; set; }- public decimal CommissionValue { get; set; }+ public double CommissionValue { get; set; }}public partial class TaxRate : BaseModel@@ -371,15 +371,15 @@ namespace Grand.Web.Admin.Models.Orderspublic string Name { get; set; }[GrandResourceDisplayName("Admin.Orders.Products.AddNew.UnitPriceInclTax")]- public decimal UnitPriceInclTax { get; set; }+ public double UnitPriceInclTax { get; set; }[GrandResourceDisplayName("Admin.Orders.Products.AddNew.UnitPriceExclTax")]- public decimal UnitPriceExclTax { get; set; }+ public double UnitPriceExclTax { get; set; }[GrandResourceDisplayName("Admin.Orders.Products.AddNew.Quantity")]public int Quantity { get; set; }[GrandResourceDisplayName("Admin.Orders.Products.AddNew.TaxRate")]- public decimal TaxRate { get; set; }+ public double TaxRate { get; set; }//product attributespublic IList<ProductAttributeModel> ProductAttributes { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Orders/OrderPeriodReportLineModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/OrderPeriodReportLineModel.csindex 0a4e4c810..35af59c7d 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/OrderPeriodReportLineModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/OrderPeriodReportLineModel.cs@@ -13,7 +13,7 @@ namespace Grand.Web.Admin.Models.Orderspublic int Count { get; set; }[GrandResourceDisplayName("Admin.Reports.Period.Amount")]- public decimal Amount { get; set; }+ public double Amount { get; set; }}}\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Models/Orders/PaymentTransactionModel.cs b/src/Web/Grand.Web.Admin/Models/Orders/PaymentTransactionModel.csindex d16792670..c0d1529d6 100644--- a/src/Web/Grand.Web.Admin/Models/Orders/PaymentTransactionModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Orders/PaymentTransactionModel.cs@@ -34,16 +34,16 @@ namespace Grand.Web.Admin.Models.Orderspublic string CurrencyCode { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.CurrencyRate")]- public decimal CurrencyRate { get; set; }+ public double CurrencyRate { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.TransactionAmount")]- public decimal TransactionAmount { get; set; }+ public double TransactionAmount { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.PaidAmount")]- public decimal PaidAmount { get; set; }+ public double PaidAmount { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.RefundedAmount")]- public decimal RefundedAmount { get; set; }+ public double RefundedAmount { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.IPAddress")]public string IPAddress { get; set; }@@ -72,10 +72,10 @@ namespace Grand.Web.Admin.Models.Orderspublic DateTime CreatedOn { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.PartialRefund.MaxAmountToRefund")]- public decimal MaxAmountToRefund { get; set; }+ public double MaxAmountToRefund { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.PartialRefund.MaxAmountToPaid")]- public decimal MaxAmountToPaid { get; set; }+ public double MaxAmountToPaid { get; set; }public bool CanCapture { get; set; }public bool CanMarkAsPaid { get; set; }@@ -88,9 +88,9 @@ namespace Grand.Web.Admin.Models.Orderspublic bool CanVoidOffline { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.PartialRefund.AmountToRefund")]- public decimal AmountToRefund { get; set; }+ public double AmountToRefund { get; set; }[GrandResourceDisplayName("Admin.PaymentTransaction.Fields.PartialRefund.AmountToPaid")]- public decimal AmountToPaid { get; set; }+ public double AmountToPaid { get; set; }}}diff --git a/src/Web/Grand.Web.Admin/Models/Settings/SalesSettingsModel.cs b/src/Web/Grand.Web.Admin/Models/Settings/SalesSettingsModel.csindex 711a24890..a60e89f81 100644--- a/src/Web/Grand.Web.Admin/Models/Settings/SalesSettingsModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Settings/SalesSettingsModel.cs@@ -30,7 +30,7 @@ namespace Grand.Web.Admin.Models.Settingspublic bool IsReOrderAllowed { get; set; }[GrandResourceDisplayName("Admin.Settings.Order.MinOrderSubtotalAmount")]- public decimal MinOrderSubtotalAmount { get; set; }+ public double MinOrderSubtotalAmount { get; set; }[GrandResourceDisplayName("Admin.Settings.Order.MinOrderSubtotalAmountIncludingTax")]public bool MinOrderSubtotalAmountIncludingTax { get; set; }@@ -96,7 +96,7 @@ namespace Grand.Web.Admin.Models.Settingspublic bool MerchandiseReturns_PickupDateRequired { get; set; }[GrandResourceDisplayName("Admin.Settings.Order.MinOrderTotalAmount")]- public decimal MinOrderTotalAmount { get; set; }+ public double MinOrderTotalAmount { get; set; }[GrandResourceDisplayName("Admin.Settings.Order.MinimumOrderPlacementInterval")]public int MinimumOrderPlacementInterval { get; set; }@@ -195,7 +195,7 @@ namespace Grand.Web.Admin.Models.Settingspublic bool Enabled { get; set; }[GrandResourceDisplayName("Admin.Settings.LoyaltyPoints.ExchangeRate")]- public decimal ExchangeRate { get; set; }+ public double ExchangeRate { get; set; }[GrandResourceDisplayName("Admin.Settings.LoyaltyPoints.MinimumLoyaltyPointsToUse")]public int MinimumLoyaltyPointsToUse { get; set; }@@ -204,7 +204,7 @@ namespace Grand.Web.Admin.Models.Settingspublic int PointsForRegistration { get; set; }[GrandResourceDisplayName("Admin.Settings.LoyaltyPoints.PointsForPurchases_Amount")]- public decimal PointsForPurchases_Amount { get; set; }+ public double PointsForPurchases_Amount { get; set; }public int PointsForPurchases_Points { get; set; }[GrandResourceDisplayName("Admin.Settings.LoyaltyPoints.PointsForPurchases_Awarded")]diff --git a/src/Web/Grand.Web.Admin/Models/Shipping/PickupPointModel.cs b/src/Web/Grand.Web.Admin/Models/Shipping/PickupPointModel.csindex 44d14bfbe..0bdf56364 100644--- a/src/Web/Grand.Web.Admin/Models/Shipping/PickupPointModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Shipping/PickupPointModel.cs@@ -43,7 +43,7 @@ namespace Grand.Web.Admin.Models.Shippingpublic string StoreId { get; set; }[GrandResourceDisplayName("Admin.Configuration.Shipping.PickupPoint.Fields.PickupFee")]- public decimal PickupFee { get; set; }+ public double PickupFee { get; set; }[GrandResourceDisplayName("Admin.Configuration.Shipping.PickupPoint.Fields.Latitude")]public double? Latitude { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/Shipping/ShippingSettingsModel.cs b/src/Web/Grand.Web.Admin/Models/Shipping/ShippingSettingsModel.csindex e635db91b..251419587 100644--- a/src/Web/Grand.Web.Admin/Models/Shipping/ShippingSettingsModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Shipping/ShippingSettingsModel.cs@@ -15,7 +15,7 @@ namespace Grand.Web.Admin.Models.Shippingpublic bool FreeShippingOverXEnabled { get; set; }[GrandResourceDisplayName("Admin.Configuration.Shipping.Settings.FreeShippingOverXValue")]- public decimal FreeShippingOverXValue { get; set; }+ public double FreeShippingOverXValue { get; set; }[GrandResourceDisplayName("Admin.Configuration.Shipping.Settings.FreeShippingOverXIncludingTax")]public bool FreeShippingOverXIncludingTax { get; set; }diff --git a/src/Web/Grand.Web.Admin/Models/ShoppingCart/ShoppingCartItemModel.cs b/src/Web/Grand.Web.Admin/Models/ShoppingCart/ShoppingCartItemModel.csindex da904b986..198d9a646 100644--- a/src/Web/Grand.Web.Admin/Models/ShoppingCart/ShoppingCartItemModel.cs+++ b/src/Web/Grand.Web.Admin/Models/ShoppingCart/ShoppingCartItemModel.cs@@ -16,7 +16,7 @@ namespace Grand.Web.Admin.Models.ShoppingCart[GrandResourceDisplayName("Admin.CurrentCarts.UnitPrice")]public string UnitPrice { get; set; }- public decimal UnitPriceValue { get; set; }+ public double UnitPriceValue { get; set; }[GrandResourceDisplayName("Admin.CurrentCarts.Quantity")]public int Quantity { get; set; }[GrandResourceDisplayName("Admin.CurrentCarts.Total")]diff --git a/src/Web/Grand.Web.Admin/Models/Vendors/VendorModel.cs b/src/Web/Grand.Web.Admin/Models/Vendors/VendorModel.csindex 134044884..49a04b609 100644--- a/src/Web/Grand.Web.Admin/Models/Vendors/VendorModel.cs+++ b/src/Web/Grand.Web.Admin/Models/Vendors/VendorModel.cs@@ -98,7 +98,7 @@ namespace Grand.Web.Admin.Models.Vendorspublic string[] SelectedDiscountIds { get; set; }[GrandResourceDisplayName("Admin.Vendors.Fields.Commission")]- public decimal? Commission { get; set; }+ public double? Commission { get; set; }#region Nested classesdiff --git a/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs b/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.csindex 981f9ab01..d24aa2a41 100644--- a/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Services/CustomerViewModelService.cs@@ -1266,7 +1266,7 @@ namespace Grand.Web.Admin.Services}}- public virtual async Task<IList<string>> UpdateCart(Customer customer, string shoppingCartId, decimal? unitprice)+ public virtual async Task<IList<string>> UpdateCart(Customer customer, string shoppingCartId, double? unitprice){var cart = customer.ShoppingCartItems.FirstOrDefault(a => a.Id == shoppingCartId);if (cart != null)diff --git a/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs b/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.csindex 15f2cdb4b..96874e025 100644--- a/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Services/MerchandiseReturnViewModelService.cs@@ -102,7 +102,7 @@ namespace Grand.Web.Admin.Servicesthrow new ArgumentNullException(nameof(merchandiseReturn));var order = await _orderService.GetOrderById(merchandiseReturn.OrderId);- decimal unitPriceInclTaxInCustomerCurrency = 0;+ double unitPriceInclTaxInCustomerCurrency = 0;foreach (var item in merchandiseReturn.MerchandiseReturnItems){var orderItem = order.OrderItems.Where(x => x.Id == item.OrderItemId).First();diff --git a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.csindex 88ab6ebff..7e900ba74 100644--- a/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Services/OrderViewModelService.cs@@ -498,9 +498,9 @@ namespace Grand.Web.Admin.Services//discount (applied to order subtotal)string orderSubtotalDiscountInclTaxStr = _priceFormatter.FormatPrice(order.OrderSubTotalDiscountInclTax, orderCurrency, _workContext.WorkingLanguage, true);string orderSubtotalDiscountExclTaxStr = _priceFormatter.FormatPrice(order.OrderSubTotalDiscountExclTax, orderCurrency, _workContext.WorkingLanguage, false);- if (order.OrderSubTotalDiscountInclTax > decimal.Zero)+ if (order.OrderSubTotalDiscountInclTax > 0)model.OrderSubTotalDiscountInclTax = orderSubtotalDiscountInclTaxStr;- if (order.OrderSubTotalDiscountExclTax > decimal.Zero)+ if (order.OrderSubTotalDiscountExclTax > 0)model.OrderSubTotalDiscountExclTax = orderSubtotalDiscountExclTaxStr;model.OrderSubTotalDiscountInclTaxValue = order.OrderSubTotalDiscountInclTax;model.OrderSubTotalDiscountExclTaxValue = order.OrderSubTotalDiscountExclTax;@@ -512,7 +512,7 @@ namespace Grand.Web.Admin.Servicesmodel.OrderShippingExclTaxValue = order.OrderShippingExclTax;//payment method additional fee- if (order.PaymentMethodAdditionalFeeInclTax > decimal.Zero)+ if (order.PaymentMethodAdditionalFeeInclTax > 0){model.PaymentMethodAdditionalFeeInclTax = _priceFormatter.FormatPaymentMethodAdditionalFee(order.PaymentMethodAdditionalFeeInclTax, orderCurrency, _workContext.WorkingLanguage, true);model.PaymentMethodAdditionalFeeExclTax = _priceFormatter.FormatPaymentMethodAdditionalFee(order.PaymentMethodAdditionalFeeExclTax, orderCurrency, _workContext.WorkingLanguage, false);@@ -570,11 +570,11 @@ namespace Grand.Web.Admin.Servicesmodel.CurrencyCode = order.CustomerCurrencyCode;//refunded amount- if (order.RefundedAmount > decimal.Zero)+ if (order.RefundedAmount > 0)model.RefundedAmount = await _priceFormatter.FormatPrice(order.RefundedAmount, order.CustomerCurrencyCode, false, _workContext.WorkingLanguage);var suggestedRefundedAmount = order.OrderItems.Sum(x => x.CancelAmount);- if (suggestedRefundedAmount > decimal.Zero)+ if (suggestedRefundedAmount > 0)model.SuggestedRefundedAmount = await _priceFormatter.FormatPrice(suggestedRefundedAmount, order.CustomerCurrencyCode, false, _workContext.WorkingLanguage);//used discounts@@ -606,9 +606,9 @@ namespace Grand.Web.Admin.Servicesmodel.OrderSubtotalExclTax += $" ({await _priceFormatter.FormatPrice(order.OrderSubtotalExclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, false)})";//discount (applied to order subtotal)- if (order.OrderSubTotalDiscountInclTax > decimal.Zero)+ if (order.OrderSubTotalDiscountInclTax > 0)model.OrderSubTotalDiscountInclTax += $" ({await _priceFormatter.FormatPrice(order.OrderSubTotalDiscountInclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, true)})";- if (order.OrderSubTotalDiscountExclTax > decimal.Zero)+ if (order.OrderSubTotalDiscountExclTax > 0)model.OrderSubTotalDiscountExclTax += $" ({await _priceFormatter.FormatPrice(order.OrderSubTotalDiscountExclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, false)})";//shipping@@ -616,7 +616,7 @@ namespace Grand.Web.Admin.Servicesmodel.OrderShippingExclTax += $" ({await _priceFormatter.FormatShippingPrice(order.OrderShippingExclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, false)})";//payment method additional fee- if (order.PaymentMethodAdditionalFeeInclTax > decimal.Zero)+ if (order.PaymentMethodAdditionalFeeInclTax > 0){model.PaymentMethodAdditionalFeeInclTax += $" ({await _priceFormatter.FormatPaymentMethodAdditionalFee(order.PaymentMethodAdditionalFeeInclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, true)})";model.PaymentMethodAdditionalFeeExclTax += $" ({await _priceFormatter.FormatPaymentMethodAdditionalFee(order.PaymentMethodAdditionalFeeExclTax / order.CurrencyRate, order.PrimaryCurrencyCode, _workContext.WorkingLanguage, false)})";@@ -624,7 +624,7 @@ namespace Grand.Web.Admin.Servicesmodel.Tax += $" ({await _priceFormatter.FormatPrice(order.OrderTax / order.CurrencyRate, order.PrimaryCurrencyCode, false, _workContext.WorkingLanguage)})";//refunded amount- if (order.RefundedAmount > decimal.Zero)+ if (order.RefundedAmount > 0)model.RefundedAmount += $" ({await _priceFormatter.FormatPrice(order.RefundedAmount / order.CurrencyRate, order.PrimaryCurrencyCode, false, _workContext.WorkingLanguage)})";}@@ -877,10 +877,10 @@ namespace Grand.Web.Admin.Servicesvar customer = await _customerService.GetCustomerById(order.CustomerId);var currency = await _currencyService.GetCurrencyByCode(order.CustomerCurrencyCode);var presetQty = 1;- var presetPrice = (await _pricingService.GetFinalPrice(product, customer, currency, decimal.Zero, true, presetQty)).finalPrice;+ var presetPrice = (await _pricingService.GetFinalPrice(product, customer, currency, 0, true, presetQty)).finalPrice;var productPrice = await _taxService.GetProductPrice(product, presetPrice, true, customer);- decimal presetPriceInclTax = productPrice.productprice;- decimal presetPriceExclTax = (await _taxService.GetProductPrice(product, presetPrice, false, customer)).productprice;+ double presetPriceInclTax = productPrice.productprice;+ double presetPriceExclTax = (await _taxService.GetProductPrice(product, presetPrice, false, customer)).productprice;var model = new OrderModel.AddOrderProductModel.ProductDetailsModel{@@ -1070,8 +1070,8 @@ namespace Grand.Web.Admin.Services//save order item//basic properties- decimal.TryParse(form["UnitPriceInclTax"], out decimal unitPriceInclTax);- decimal.TryParse(form["UnitPriceExclTax"], out decimal unitPriceExclTax);+ double.TryParse(form["UnitPriceInclTax"], out double unitPriceInclTax);+ double.TryParse(form["UnitPriceExclTax"], out double unitPriceExclTax);int.TryParse(form["Quantity"], out int quantity);int.TryParse(form["TaxRate"], out int taxRate);@@ -1268,8 +1268,8 @@ namespace Grand.Web.Admin.ServicesAttributes = customattributes,Quantity = quantity,OpenQty = quantity,- DiscountAmountInclTax = decimal.Zero,- DiscountAmountExclTax = decimal.Zero,+ DiscountAmountInclTax = 0,+ DiscountAmountExclTax = 0,DownloadCount = 0,IsDownloadActivated = false,LicenseDownloadId = "",diff --git a/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.csindex 5fff0372e..bcb441fab 100644--- a/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs+++ b/src/Web/Grand.Web.Admin/Services/ShipmentViewModelService.cs@@ -525,10 +525,10 @@ namespace Grand.Web.Admin.Servicesreturn (true, string.Empty);}- public virtual async Task<(Shipment shipment, decimal? totalWeight)> PrepareShipment(Order order, IList<OrderItem> orderItems, IFormCollection form)+ public virtual async Task<(Shipment shipment, double? totalWeight)> PrepareShipment(Order order, IList<OrderItem> orderItems, IFormCollection form){Shipment shipment = null;- decimal? totalWeight = null;+ double? totalWeight = null;foreach (var orderItem in orderItems){//is shippablediff --git a/src/Web/Grand.Web.Admin/Validators/Common/CommonValid.cs b/src/Web/Grand.Web.Admin/Validators/Common/CommonValid.csindex d145b988d..bd0b9c8c5 100644--- a/src/Web/Grand.Web.Admin/Validators/Common/CommonValid.cs+++ b/src/Web/Grand.Web.Admin/Validators/Common/CommonValid.cs@@ -2,7 +2,7 @@{public static class CommonValid{- public static bool IsCommissionValid(decimal? commission)+ public static bool IsCommissionValid(double? commission){if (!commission.HasValue)return true;diff --git a/src/Web/Grand.Web.Common/TagHelpers/Admin/Extend/TemplateRenderer.cs b/src/Web/Grand.Web.Common/TagHelpers/Admin/Extend/TemplateRenderer.csindex 983eb73a8..305de640b 100644--- a/src/Web/Grand.Web.Common/TagHelpers/Admin/Extend/TemplateRenderer.cs+++ b/src/Web/Grand.Web.Common/TagHelpers/Admin/Extend/TemplateRenderer.cs@@ -35,7 +35,7 @@ namespace Grand.Web.Common.TagHelpers.Admin{ "Text", DefaultDisplayTemplates.StringTemplate },{ "Url", DefaultDisplayTemplates.UrlTemplate },{ typeof(bool).Name, DefaultDisplayTemplates.BooleanTemplate },- { typeof(decimal).Name, DefaultDisplayTemplates.DecimalTemplate },+ { typeof(double).Name, DefaultDisplayTemplates.DecimalTemplate },{ typeof(string).Name, DefaultDisplayTemplates.StringTemplate },{ typeof(object).Name, DefaultDisplayTemplates.ObjectTemplate },};@@ -67,7 +67,7 @@ namespace Grand.Web.Common.TagHelpers.Admin{ typeof(long).Name, DefaultEditorTemplates.NumberInputTemplate },{ typeof(ulong).Name, DefaultEditorTemplates.NumberInputTemplate },{ typeof(bool).Name, DefaultEditorTemplates.BooleanTemplate },- { typeof(decimal).Name, DefaultEditorTemplates.DecimalTemplate },+ { typeof(double).Name, DefaultEditorTemplates.DecimalTemplate },{ typeof(string).Name, DefaultEditorTemplates.StringTemplate },{ typeof(object).Name, DefaultEditorTemplates.ObjectTemplate },{ typeof(IFormFile).Name, DefaultEditorTemplates.FileInputTemplate },diff --git a/src/Web/Grand.Web/Controllers/ActionCartController.cs b/src/Web/Grand.Web/Controllers/ActionCartController.csindex a5a4b5307..744fbf542 100644--- a/src/Web/Grand.Web/Controllers/ActionCartController.cs+++ b/src/Web/Grand.Web/Controllers/ActionCartController.cs@@ -353,14 +353,14 @@ namespace Grand.Web.Controllers#endregion#region Customer entered price- decimal? customerEnteredPriceConverted = null;+ double? customerEnteredPriceConverted = null;if (product.EnteredPrice){foreach (string formKey in form.Keys){if (formKey.Equals(string.Format("addtocart_{0}.CustomerEnteredPrice", productId), StringComparison.OrdinalIgnoreCase)){- if (decimal.TryParse(form[formKey], out decimal customerEnteredPrice))+ if (double.TryParse(form[formKey], out double customerEnteredPrice))customerEnteredPriceConverted = await _currencyService.ConvertToPrimaryStoreCurrency(customerEnteredPrice, _workContext.WorkingCurrency);break;}@@ -632,14 +632,14 @@ namespace Grand.Web.Controllersmessage = _translationService.GetResource("ShoppingCart.Mustberegisteredtobid")});}- decimal bid = 0;+ double bid = 0;foreach (string formKey in form.Keys){if (formKey.Equals(string.Format("auction_{0}.HighestBidValue", productId), StringComparison.OrdinalIgnoreCase)){- decimal.TryParse(form[formKey], out bid);+ double.TryParse(form[formKey], out bid);if (bid == 0)- decimal.TryParse(form[formKey], NumberStyles.AllowDecimalPoint, CultureInfo.GetCultureInfo("en-US").NumberFormat, out bid);+ double.TryParse(form[formKey], NumberStyles.AllowDecimalPoint, CultureInfo.GetCultureInfo("en-US").NumberFormat, out bid);bid = Math.Round(bid, 2);break;diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetFormatBasePriceHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetFormatBasePriceHandler.csindex aed553284..e3ebedbe5 100644--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetFormatBasePriceHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetFormatBasePriceHandler.cs@@ -49,7 +49,7 @@ namespace Grand.Web.Features.Handlers.Catalogrequest.ProductPrice = request.ProductPrice.HasValue ? request.ProductPrice.Value : request.Product.Price;- decimal basePrice = request.ProductPrice.Value /+ double basePrice = request.ProductPrice.Value ///do not round. otherwise, it can cause issuesawait _measureService.ConvertWeight(productAmount, productUnit, referenceUnit, false) *referenceAmount;diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.csindex 3fe4d4fb6..e9cbba890 100644--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs@@ -253,7 +253,7 @@ namespace Grand.Web.Features.Handlers.Catalog{string price, priceWithDiscount;- decimal finalPriceWithoutDiscount =+ double finalPriceWithoutDiscount =(await (_taxService.GetProductPrice(product,(await _pricingService.GetFinalPrice(product, request.Customer, request.Currency, includeDiscounts: false)).finalPrice))).productprice;diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.csindex aec2d47e6..4cc9da209 100644--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs@@ -198,8 +198,8 @@ namespace Grand.Web.Features.Handlers.Catalog{var categoryIds = new List<string>();string collectionId = "";- decimal? minPriceConverted = null;- decimal? maxPriceConverted = null;+ double? minPriceConverted = null;+ double? maxPriceConverted = null;bool searchInDescriptions = false;string vendorId = "";if (request.Model.adv)@@ -217,15 +217,15 @@ namespace Grand.Web.Features.Handlers.Catalog//min priceif (!string.IsNullOrEmpty(request.Model.pf)){- decimal minPrice;- if (decimal.TryParse(request.Model.pf, out minPrice))+ double minPrice;+ if (double.TryParse(request.Model.pf, out minPrice))minPriceConverted = await _currencyService.ConvertToPrimaryStoreCurrency(minPrice, request.Currency);}//max priceif (!string.IsNullOrEmpty(request.Model.pt)){- decimal maxPrice;- if (decimal.TryParse(request.Model.pt, out maxPrice))+ double maxPrice;+ if (double.TryParse(request.Model.pt, out maxPrice))maxPriceConverted = await _currencyService.ConvertToPrimaryStoreCurrency(maxPrice, request.Currency);}diff --git a/src/Web/Grand.Web/Features/Handlers/Checkout/GetIsPaymentWorkflowRequiredHandler.cs b/src/Web/Grand.Web/Features/Handlers/Checkout/GetIsPaymentWorkflowRequiredHandler.csindex fa120f420..7cdf35c6b 100644--- a/src/Web/Grand.Web/Features/Handlers/Checkout/GetIsPaymentWorkflowRequiredHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Checkout/GetIsPaymentWorkflowRequiredHandler.cs@@ -21,8 +21,8 @@ namespace Grand.Web.Features.Handlers.Checkout{bool result = true;//check whether order total equals zero- decimal? shoppingCartTotalBase = (await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart, useLoyaltyPoints: request.UseLoyaltyPoints)).shoppingCartTotal;- if (shoppingCartTotalBase.HasValue && shoppingCartTotalBase.Value == decimal.Zero && !_paymentSettings.ShowPaymentIfCartIsZero)+ double? shoppingCartTotalBase = (await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart, useLoyaltyPoints: request.UseLoyaltyPoints)).shoppingCartTotal;+ if (shoppingCartTotalBase.HasValue && shoppingCartTotalBase.Value == 0 && !_paymentSettings.ShowPaymentIfCartIsZero)result = false;return result;}diff --git a/src/Web/Grand.Web/Features/Handlers/Checkout/GetPaymentMethodHandler.cs b/src/Web/Grand.Web/Features/Handlers/Checkout/GetPaymentMethodHandler.csindex 42d788086..028c4f0e5 100644--- a/src/Web/Grand.Web/Features/Handlers/Checkout/GetPaymentMethodHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Checkout/GetPaymentMethodHandler.cs@@ -58,15 +58,15 @@ namespace Grand.Web.Features.Handlers.Checkoutif (_loyaltyPointsSettings.Enabled){int loyaltyPointsBalance = await _loyaltyPointsService.GetLoyaltyPointsBalance(request.Customer.Id, request.Store.Id);- decimal loyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(loyaltyPointsBalance), request.Currency);- if (loyaltyPointsAmount > decimal.Zero &&+ double loyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(loyaltyPointsBalance), request.Currency);+ if (loyaltyPointsAmount > 0 &&_orderTotalCalculationService.CheckMinimumLoyaltyPointsToUseRequirement(loyaltyPointsBalance)){model.DisplayLoyaltyPoints = true;model.LoyaltyPointsAmount = _priceFormatter.FormatPrice(loyaltyPointsAmount, false);model.LoyaltyPointsBalance = loyaltyPointsBalance;var shoppingCartTotalBase = (await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart, useLoyaltyPoints: true)).shoppingCartTotal;- model.LoyaltyPointsEnoughToPayForOrder = (shoppingCartTotalBase.HasValue && shoppingCartTotalBase.Value == decimal.Zero);+ model.LoyaltyPointsEnoughToPayForOrder = (shoppingCartTotalBase.HasValue && shoppingCartTotalBase.Value == 0);}}@@ -91,9 +91,9 @@ namespace Grand.Web.Features.Handlers.CheckoutLogoUrl = pm.LogoURL};//payment method additional fee- decimal paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(request.Cart, pm.SystemName);- decimal rate = (await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, request.Customer)).paymentPrice;- if (rate > decimal.Zero)+ double paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(request.Cart, pm.SystemName);+ double rate = (await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, request.Customer)).paymentPrice;+ if (rate > 0)pmModel.Fee = _priceFormatter.FormatPaymentMethodAdditionalFee(rate);model.PaymentMethods.Add(pmModel);diff --git a/src/Web/Grand.Web/Features/Handlers/Checkout/GetShippingMethodHandler.cs b/src/Web/Grand.Web/Features/Handlers/Checkout/GetShippingMethodHandler.csindex edb738d60..893c1f1cc 100644--- a/src/Web/Grand.Web/Features/Handlers/Checkout/GetShippingMethodHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Checkout/GetShippingMethodHandler.cs@@ -75,7 +75,7 @@ namespace Grand.Web.Features.Handlers.Checkoutvar shippingTotal = (await _orderTotalCalculationService.AdjustShippingRate(shippingOption.Rate, request.Cart)).shippingRate;- decimal rateBase = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;+ double rateBase = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;soModel.Fee = _priceFormatter.FormatShippingPrice(rateBase);model.ShippingMethods.Add(soModel);diff --git a/src/Web/Grand.Web/Features/Handlers/Orders/GetCustomerLoyaltyPointsHandler.cs b/src/Web/Grand.Web/Features/Handlers/Orders/GetCustomerLoyaltyPointsHandler.csindex aaffcde38..ea9eb01ee 100644--- a/src/Web/Grand.Web/Features/Handlers/Orders/GetCustomerLoyaltyPointsHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Orders/GetCustomerLoyaltyPointsHandler.cs@@ -47,14 +47,14 @@ namespace Grand.Web.Features.Handlers.Newsletter}//current amount/balanceint loyaltyPointsBalance = await _loyaltyPointsService.GetLoyaltyPointsBalance(request.Customer.Id, request.Store.Id);- decimal loyaltyPointsAmountBase = await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(loyaltyPointsBalance);- decimal loyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(loyaltyPointsAmountBase, request.Currency);+ double loyaltyPointsAmountBase = await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(loyaltyPointsBalance);+ double loyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(loyaltyPointsAmountBase, request.Currency);model.LoyaltyPointsBalance = loyaltyPointsBalance;model.LoyaltyPointsAmount = _priceFormatter.FormatPrice(loyaltyPointsAmount, false);//minimum amount/balanceint minimumLoyaltyPointsBalance = _loyaltyPointsSettings.MinimumLoyaltyPointsToUse;- decimal minimumLoyaltyPointsAmountBase = await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(minimumLoyaltyPointsBalance);- decimal minimumLoyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(minimumLoyaltyPointsAmountBase, request.Currency);+ double minimumLoyaltyPointsAmountBase = await _orderTotalCalculationService.ConvertLoyaltyPointsToAmount(minimumLoyaltyPointsBalance);+ double minimumLoyaltyPointsAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(minimumLoyaltyPointsAmountBase, request.Currency);model.MinimumLoyaltyPointsBalance = minimumLoyaltyPointsBalance;model.MinimumLoyaltyPointsAmount = _priceFormatter.FormatPrice(minimumLoyaltyPointsAmount, false);diff --git a/src/Web/Grand.Web/Features/Handlers/Orders/GetMerchandiseReturnsHandler.cs b/src/Web/Grand.Web/Features/Handlers/Orders/GetMerchandiseReturnsHandler.csindex 9e5821e7f..afb82cfbd 100644--- a/src/Web/Grand.Web/Features/Handlers/Orders/GetMerchandiseReturnsHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Orders/GetMerchandiseReturnsHandler.cs@@ -60,7 +60,7 @@ namespace Grand.Web.Features.Handlers.Ordersforeach (var merchandiseReturn in merchandiseReturns){var order = await _orderService.GetOrderById(merchandiseReturn.OrderId);- decimal total = 0;+ double total = 0;foreach (var rrItem in merchandiseReturn.MerchandiseReturnItems){var orderItem = order.OrderItems.Where(x => x.Id == rrItem.OrderItemId).First();diff --git a/src/Web/Grand.Web/Features/Handlers/Orders/GetOrderDetailsHandler.cs b/src/Web/Grand.Web/Features/Handlers/Orders/GetOrderDetailsHandler.csindex 0766a69ba..d463fa864 100644--- a/src/Web/Grand.Web/Features/Handlers/Orders/GetOrderDetailsHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Orders/GetOrderDetailsHandler.cs@@ -229,7 +229,7 @@ namespace Grand.Web.Features.Handlers.Orders//order subtotalmodel.OrderSubtotal = await _priceFormatter.FormatPrice(request.Order.OrderSubtotalInclTax, request.Order.CustomerCurrencyCode, request.Language, true);//discount (applied to order subtotal)- if (request.Order.OrderSubTotalDiscountInclTax > decimal.Zero)+ if (request.Order.OrderSubTotalDiscountInclTax > 0)model.OrderSubTotalDiscount = await _priceFormatter.FormatPrice(-request.Order.OrderSubTotalDiscountInclTax, request.Order.CustomerCurrencyCode, request.Language, true);}else@@ -239,7 +239,7 @@ namespace Grand.Web.Features.Handlers.Orders//order subtotalmodel.OrderSubtotal = await _priceFormatter.FormatPrice(request.Order.OrderSubtotalExclTax, request.Order.CustomerCurrencyCode, request.Language, false);//discount (applied to order subtotal)- if (request.Order.OrderSubTotalDiscountExclTax > decimal.Zero)+ if (request.Order.OrderSubTotalDiscountExclTax > 0)model.OrderSubTotalDiscount = await _priceFormatter.FormatPrice(-request.Order.OrderSubTotalDiscountExclTax, request.Order.CustomerCurrencyCode, request.Language, false);}@@ -250,7 +250,7 @@ namespace Grand.Web.Features.Handlers.Orders//order shippingmodel.OrderShipping = await _priceFormatter.FormatShippingPrice(request.Order.OrderShippingInclTax, request.Order.CustomerCurrencyCode, request.Language, true);//payment method additional fee- if (request.Order.PaymentMethodAdditionalFeeInclTax > decimal.Zero)+ if (request.Order.PaymentMethodAdditionalFeeInclTax > 0)model.PaymentMethodAdditionalFee = await _priceFormatter.FormatPaymentMethodAdditionalFee(request.Order.PaymentMethodAdditionalFeeInclTax, request.Order.CustomerCurrencyCode, request.Language, true);}else@@ -260,7 +260,7 @@ namespace Grand.Web.Features.Handlers.Orders//order shippingmodel.OrderShipping = await _priceFormatter.FormatShippingPrice(request.Order.OrderShippingExclTax, request.Order.CustomerCurrencyCode, request.Language, false);//payment method additional fee- if (request.Order.PaymentMethodAdditionalFeeExclTax > decimal.Zero)+ if (request.Order.PaymentMethodAdditionalFeeExclTax > 0)model.PaymentMethodAdditionalFee = await _priceFormatter.FormatPaymentMethodAdditionalFee(request.Order.PaymentMethodAdditionalFeeExclTax, request.Order.CustomerCurrencyCode, request.Language, false);}@@ -310,7 +310,7 @@ namespace Grand.Web.Features.Handlers.Ordersprivate async Task PrepareDiscount(GetOrderDetails request, OrderDetailsModel model){- if (request.Order.OrderDiscount > decimal.Zero)+ if (request.Order.OrderDiscount > 0)model.OrderTotalDiscount = await _priceFormatter.FormatPrice(-request.Order.OrderDiscount, request.Order.CustomerCurrencyCode, false, request.Language);}diff --git a/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsAttributeChangeHandler.cs b/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsAttributeChangeHandler.csindex d8918eefe..245b67b0f 100644--- a/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsAttributeChangeHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsAttributeChangeHandler.cs@@ -98,16 +98,16 @@ namespace Grand.Web.Features.Handlers.Productsrequest.Customer,request.Currency,ShoppingCartType.ShoppingCart,- 1, customAttributes, (decimal?)default,+ 1, customAttributes, (double?)default,rentalStartDate, rentalEndDate,true);- decimal discountAmount = unitprice.discountAmount;+ double discountAmount = unitprice.discountAmount;List<ApplyDiscount> scDiscounts = unitprice.appliedDiscounts;- decimal finalPrice = unitprice.unitprice;+ double finalPrice = unitprice.unitprice;var productprice = await _taxService.GetProductPrice(request.Product, finalPrice);- decimal finalPriceWithDiscount = productprice.productprice;- decimal taxRate = productprice.taxRate;+ double finalPriceWithDiscount = productprice.productprice;+ double taxRate = productprice.taxRate;model.Price = _priceFormatter.FormatPrice(finalPriceWithDiscount);}//stockdiff --git a/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsPageHandler.cs b/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsPageHandler.csindex 908ab0d8d..e60d63801 100644--- a/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsPageHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Products/GetProductDetailsPageHandler.cs@@ -642,14 +642,14 @@ namespace Grand.Web.Features.Handlers.Productselse{var oldproductprice = await _taxService.GetProductPrice(product, product.OldPrice);- decimal oldPriceBase = oldproductprice.productprice;- decimal finalPriceWithoutDiscount = (await (_taxService.GetProductPrice(product, (await _pricingService.GetFinalPrice(product, _workContext.CurrentCustomer, _workContext.WorkingCurrency, includeDiscounts: false)).finalPrice))).productprice;+ double oldPriceBase = oldproductprice.productprice;+ double finalPriceWithoutDiscount = (await (_taxService.GetProductPrice(product, (await _pricingService.GetFinalPrice(product, _workContext.CurrentCustomer, _workContext.WorkingCurrency, includeDiscounts: false)).finalPrice))).productprice;var appliedPrice = (await _pricingService.GetFinalPrice(product, _workContext.CurrentCustomer, _workContext.WorkingCurrency, includeDiscounts: true));- decimal finalPriceWithDiscount = (await _taxService.GetProductPrice(product, appliedPrice.finalPrice)).productprice;- decimal oldPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(oldPriceBase, _workContext.WorkingCurrency);+ double finalPriceWithDiscount = (await _taxService.GetProductPrice(product, appliedPrice.finalPrice)).productprice;+ double oldPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(oldPriceBase, _workContext.WorkingCurrency);- if (finalPriceWithoutDiscount != oldPrice && oldPrice > decimal.Zero)+ if (finalPriceWithoutDiscount != oldPrice && oldPrice > 0)model.OldPrice = _priceFormatter.FormatPrice(oldPrice);model.Price = _priceFormatter.FormatPrice(finalPriceWithoutDiscount);@@ -686,11 +686,11 @@ namespace Grand.Web.Features.Handlers.Productsif (product.ProductTypeId == ProductType.Auction){model.IsAuction = true;- decimal highestBid = await _currencyService.ConvertFromPrimaryStoreCurrency(product.HighestBid, _workContext.WorkingCurrency);+ double highestBid = await _currencyService.ConvertFromPrimaryStoreCurrency(product.HighestBid, _workContext.WorkingCurrency);model.HighestBid = _priceFormatter.FormatPrice(highestBid);model.HighestBidValue = highestBid;model.DisableBuyButton = product.DisableBuyButton;- decimal startPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.StartPrice, _workContext.WorkingCurrency);+ double startPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.StartPrice, _workContext.WorkingCurrency);model.StartPrice = _priceFormatter.FormatPrice(startPrice);model.StartPriceValue = startPrice;}@@ -757,8 +757,8 @@ namespace Grand.Web.Features.Handlers.Productsmodel.EnteredPrice = product.EnteredPrice;if (model.EnteredPrice){- decimal minimumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MinEnteredPrice, _workContext.WorkingCurrency);- decimal maximumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MaxEnteredPrice, _workContext.WorkingCurrency);+ double minimumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MinEnteredPrice, _workContext.WorkingCurrency);+ double maximumCustomerEnteredPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.MaxEnteredPrice, _workContext.WorkingCurrency);model.CustomerEnteredPrice = updatecartitem != null && updatecartitem.EnteredPrice.HasValue ? updatecartitem.EnteredPrice.Value : minimumCustomerEnteredPrice;model.CustomerEnteredPriceRange = string.Format(_translationService.GetResource("Products.EnterProductPrice.Range"),@@ -867,12 +867,12 @@ namespace Grand.Web.Features.Handlers.Productsvar displayPrices = await _permissionService.Authorize(StandardPermission.DisplayPrices);if (displayPrices){- decimal attributeValuePriceAdjustment = await _pricingService.GetProductAttributeValuePriceAdjustment(attributeValue);+ double attributeValuePriceAdjustment = await _pricingService.GetProductAttributeValuePriceAdjustment(attributeValue);var productprice = await _taxService.GetProductPrice(product, attributeValuePriceAdjustment);- decimal taxRate = productprice.taxRate;- if (productprice.productprice > decimal.Zero)+ double taxRate = productprice.taxRate;+ if (productprice.productprice > 0)valueModel.PriceAdjustment = "+" + _priceFormatter.FormatPrice(productprice.productprice, false);- else if (productprice.productprice < decimal.Zero)+ else if (productprice.productprice < 0)valueModel.PriceAdjustment = "-" + _priceFormatter.FormatPrice(-productprice.productprice, false);valueModel.PriceAdjustmentValue = productprice.productprice;@@ -1011,7 +1011,7 @@ namespace Grand.Web.Features.Handlers.Productsvar tier = new ProductDetailsModel.TierPriceModel();var priceBase = await _taxService.GetProductPrice(product, (await _pricingService.GetFinalPrice(product,_workContext.CurrentCustomer, _workContext.WorkingCurrency,- decimal.Zero, _catalogSettings.DisplayTierPricesWithDiscounts, tierPrice.Quantity)).finalPrice);+ 0, _catalogSettings.DisplayTierPricesWithDiscounts, tierPrice.Quantity)).finalPrice);tier.Quantity = tierPrice.Quantity;tier.Price = _priceFormatter.FormatPrice(priceBase.productprice, false);model.Add(tier);@@ -1093,8 +1093,8 @@ namespace Grand.Web.Features.Handlers.Productsif (displayPrices){var productprice = await _taxService.GetProductPrice(p1, (await _pricingService.GetFinalPrice(p1, _workContext.CurrentCustomer, _workContext.WorkingCurrency, includeDiscounts: true)).finalPrice);- decimal taxRateBundle = productprice.taxRate;- decimal finalPriceWithDiscountBase = productprice.productprice;+ double taxRateBundle = productprice.taxRate;+ double finalPriceWithDiscountBase = productprice.productprice;bundleProduct.Price = _priceFormatter.FormatPrice(productprice.productprice);bundleProduct.PriceValue = productprice.productprice;}diff --git a/src/Web/Grand.Web/Features/Handlers/Products/GetProductOverviewHandler.cs b/src/Web/Grand.Web/Features/Handlers/Products/GetProductOverviewHandler.csindex 50885e72e..066d7f99b 100644--- a/src/Web/Grand.Web/Features/Handlers/Products/GetProductOverviewHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Products/GetProductOverviewHandler.cs@@ -206,7 +206,7 @@ namespace Grand.Web.Features.Handlers.Products//catalog price, not used in views, but it's for front developerif (product.CatalogPrice > 0){- decimal catalogPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.CatalogPrice, _workContext.WorkingCurrency);+ double catalogPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.CatalogPrice, _workContext.WorkingCurrency);priceModel.CatalogPrice = _priceFormatter.FormatPrice(catalogPrice, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);}@@ -225,13 +225,13 @@ namespace Grand.Web.Features.Handlers.Productsif (displayPrices){//find a minimum possible price- decimal? minPossiblePrice = null;+ double? minPossiblePrice = null;Product minPriceProduct = null;foreach (var associatedProduct in associatedProducts){//calculate for the maximum quantity (in case if we have tier prices)var tmpPrice = (await _pricingService.GetFinalPrice(associatedProduct,- _workContext.CurrentCustomer, _workContext.WorkingCurrency, decimal.Zero, true, int.MaxValue)).finalPrice;+ _workContext.CurrentCustomer, _workContext.WorkingCurrency, 0, true, int.MaxValue)).finalPrice;if (!minPossiblePrice.HasValue || tmpPrice < minPossiblePrice.Value){minPriceProduct = associatedProduct;@@ -248,7 +248,7 @@ namespace Grand.Web.Features.Handlers.Productselse if (minPossiblePrice.HasValue){//calculate prices- decimal finalPrice = (await _taxService.GetProductPrice(minPriceProduct, minPossiblePrice.Value, priceIncludesTax, _workContext.CurrentCustomer)).productprice;+ double finalPrice = (await _taxService.GetProductPrice(minPriceProduct, minPossiblePrice.Value, priceIncludesTax, _workContext.CurrentCustomer)).productprice;priceModel.OldPrice = null;priceModel.Price = string.Format(res["Products.PriceRangeFrom"], _priceFormatter.FormatPrice(finalPrice, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax));@@ -304,14 +304,14 @@ namespace Grand.Web.Features.Handlers.Products//catalog price, not used in views, but it's for front developerif (product.CatalogPrice > 0){- decimal catalogPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.CatalogPrice, _workContext.WorkingCurrency);+ double catalogPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.CatalogPrice, _workContext.WorkingCurrency);priceModel.CatalogPrice = _priceFormatter.FormatPrice(catalogPrice, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);}//start price for product auctionif (product.StartPrice > 0){- decimal startPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.StartPrice, _workContext.WorkingCurrency);+ double startPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(product.StartPrice, _workContext.WorkingCurrency);priceModel.StartPrice = _priceFormatter.FormatPrice(startPrice, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);priceModel.StartPriceValue = startPrice;}@@ -319,7 +319,7 @@ namespace Grand.Web.Features.Handlers.Products//highest bid for product auctionif (product.HighestBid > 0){- decimal highestBid = await _currencyService.ConvertFromPrimaryStoreCurrency(product.HighestBid, _workContext.WorkingCurrency);+ double highestBid = await _currencyService.ConvertFromPrimaryStoreCurrency(product.HighestBid, _workContext.WorkingCurrency);priceModel.HighestBid = _priceFormatter.FormatPrice(highestBid, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);priceModel.HighestBidValue = highestBid;}@@ -341,17 +341,17 @@ namespace Grand.Web.Features.Handlers.Products//calculate for the maximum quantity (in case if we have tier prices)var infoprice = (await _pricingService.GetFinalPrice(product,- _workContext.CurrentCustomer, _workContext.WorkingCurrency, decimal.Zero, true, int.MaxValue));+ _workContext.CurrentCustomer, _workContext.WorkingCurrency, 0, true, int.MaxValue));priceModel.AppliedDiscounts = infoprice.appliedDiscounts;priceModel.PreferredTierPrice = infoprice.preferredTierPrice;- decimal minPossiblePrice = infoprice.finalPrice;+ double minPossiblePrice = infoprice.finalPrice;- decimal oldPriceBase = (await _taxService.GetProductPrice(product, product.OldPrice, priceIncludesTax, _workContext.CurrentCustomer)).productprice;- decimal finalPrice = (await _taxService.GetProductPrice(product, minPossiblePrice, priceIncludesTax, _workContext.CurrentCustomer)).productprice;+ double oldPriceBase = (await _taxService.GetProductPrice(product, product.OldPrice, priceIncludesTax, _workContext.CurrentCustomer)).productprice;+ double finalPrice = (await _taxService.GetProductPrice(product, minPossiblePrice, priceIncludesTax, _workContext.CurrentCustomer)).productprice;- decimal oldPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(oldPriceBase, _workContext.WorkingCurrency);+ double oldPrice = await _currencyService.ConvertFromPrimaryStoreCurrency(oldPriceBase, _workContext.WorkingCurrency);//do we have tier prices configured?var tierPrices = new List<TierPrice>();@@ -375,7 +375,7 @@ namespace Grand.Web.Features.Handlers.Products}else{- if (finalPrice != oldPriceBase && oldPriceBase != decimal.Zero)+ if (finalPrice != oldPriceBase && oldPriceBase != 0){priceModel.OldPrice = _priceFormatter.FormatPrice(oldPrice, _workContext.WorkingCurrency, _workContext.WorkingLanguage, priceIncludesTax);priceModel.OldPriceValue = oldPrice;diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetAddToCartHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetAddToCartHandler.csindex 847a42b5c..480e4a960 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetAddToCartHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetAddToCartHandler.cs@@ -131,7 +131,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartelse{var productprices = await _taxService.GetProductPrice(request.Product, (await _pricingService.GetUnitPrice(sci, request.Product)).unitprice);- decimal taxRate = productprices.taxRate;+ double taxRate = productprices.taxRate;model.Price = !request.CustomerEnteredPrice.HasValue ? _priceFormatter.FormatPrice(productprices.productprice) : _priceFormatter.FormatPrice(request.CustomerEnteredPrice.Value);model.DecimalPrice = request.CustomerEnteredPrice ?? productprices.productprice;model.TotalPrice = _priceFormatter.FormatPrice(productprices.productprice * sci.Quantity);@@ -171,10 +171,10 @@ namespace Grand.Web.Features.Handlers.ShoppingCartvar subTotalIncludingTax = request.TaxDisplayType == TaxDisplayType.IncludingTax && !_taxSettings.ForceTaxExclusionFromOrderSubtotal;var shoppingCartSubTotal = await _orderTotalCalculationService.GetShoppingCartSubTotal(cart, subTotalIncludingTax);List<ApplyDiscount> orderSubTotalAppliedDiscounts = shoppingCartSubTotal.appliedDiscounts;- decimal subTotalWithDiscountBase = shoppingCartSubTotal.subTotalWithDiscount;+ double subTotalWithDiscountBase = shoppingCartSubTotal.subTotalWithDiscount;model.SubTotal = _priceFormatter.FormatPrice(shoppingCartSubTotal.subTotalWithoutDiscount, request.Currency, request.Language, subTotalIncludingTax);model.DecimalSubTotal = shoppingCartSubTotal.subTotalWithoutDiscount;- if (shoppingCartSubTotal.discountAmount > decimal.Zero)+ if (shoppingCartSubTotal.discountAmount > 0){model.SubTotalDiscount = _priceFormatter.FormatPrice(-shoppingCartSubTotal.discountAmount, request.Currency, request.Language, subTotalIncludingTax);}diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetEstimateShippingResultHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetEstimateShippingResultHandler.csindex 8189ba948..f8edc5a6b 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetEstimateShippingResultHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetEstimateShippingResultHandler.cs@@ -86,9 +86,9 @@ namespace Grand.Web.Features.Handlers.ShoppingCart//calculate discounted and taxed ratevar total = await _orderTotalCalculationService.AdjustShippingRate(shippingOption.Rate, request.Cart);List<ApplyDiscount> appliedDiscounts = total.appliedDiscounts;- decimal shippingTotal = total.shippingRate;+ double shippingTotal = total.shippingRate;- decimal rate = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;+ double rate = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;soModel.Price = _priceFormatter.FormatShippingPrice(rate);model.ShippingOptions.Add(soModel);}@@ -105,8 +105,8 @@ namespace Grand.Web.Features.Handlers.ShoppingCartDescription = _translationService.GetResource("Checkout.PickUpInStore.Description"),};- decimal shippingTotal = pickupPoints.Max(x => x.PickupFee);- decimal rate = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;+ double shippingTotal = pickupPoints.Max(x => x.PickupFee);+ double rate = (await _taxService.GetShippingPrice(shippingTotal, request.Customer)).shippingPrice;soModel.Price = _priceFormatter.FormatShippingPrice(rate);model.ShippingOptions.Add(soModel);}diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetMiniShoppingCartHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetMiniShoppingCartHandler.csindex fda487d91..6cfb5b741 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetMiniShoppingCartHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetMiniShoppingCartHandler.cs@@ -120,7 +120,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCart//subtotalvar subTotalIncludingTax = request.TaxDisplayType == TaxDisplayType.IncludingTax && !_taxSettings.ForceTaxExclusionFromOrderSubtotal;var shoppingCartSubTotal = await _orderTotalCalculationService.GetShoppingCartSubTotal(cart, subTotalIncludingTax);- decimal orderSubTotalDiscountAmountBase = shoppingCartSubTotal.discountAmount;+ double orderSubTotalDiscountAmountBase = shoppingCartSubTotal.discountAmount;List<ApplyDiscount> orderSubTotalAppliedDiscounts = shoppingCartSubTotal.appliedDiscounts;model.SubTotal = _priceFormatter.FormatPrice(shoppingCartSubTotal.subTotalWithoutDiscount, request.Currency, request.Language, subTotalIncludingTax);@@ -192,7 +192,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartelse{var productprices = await _taxService.GetProductPrice(product, (await _pricingService.GetUnitPrice(sci, product)).unitprice);- decimal taxRate = productprices.taxRate;+ double taxRate = productprices.taxRate;cartItemModel.UnitPrice = _priceFormatter.FormatPrice(productprices.productprice);}diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetOrderTotalsHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetOrderTotalsHandler.csindex b8930dce5..6d867fd17 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetOrderTotalsHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetOrderTotalsHandler.cs@@ -83,7 +83,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartvar subTotalIncludingTax = request.TaxDisplayType == TaxDisplayType.IncludingTax && !_taxSettings.ForceTaxExclusionFromOrderSubtotal;var shoppingCartSubTotal = await _orderTotalCalculationService.GetShoppingCartSubTotal(request.Cart, subTotalIncludingTax);model.SubTotal = _priceFormatter.FormatPrice(shoppingCartSubTotal.subTotalWithoutDiscount, request.Currency, request.Language, subTotalIncludingTax);- if (shoppingCartSubTotal.discountAmount > decimal.Zero)+ if (shoppingCartSubTotal.discountAmount > 0){model.SubTotalDiscount = _priceFormatter.FormatPrice(-shoppingCartSubTotal.discountAmount, request.Currency, request.Language, subTotalIncludingTax);}@@ -94,7 +94,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartmodel.RequiresShipping = request.Cart.RequiresShipping();if (model.RequiresShipping){- decimal? shoppingCartShippingBase = (await _orderTotalCalculationService.GetShoppingCartShippingTotal(request.Cart)).shoppingCartShippingTotal;+ double? shoppingCartShippingBase = (await _orderTotalCalculationService.GetShoppingCartShippingTotal(request.Cart)).shoppingCartShippingTotal;if (shoppingCartShippingBase.HasValue){model.Shipping = _priceFormatter.FormatShippingPrice(shoppingCartShippingBase.Value);@@ -112,9 +112,9 @@ namespace Grand.Web.Features.Handlers.ShoppingCart{var paymentMethodSystemName = request.Customer.GetUserFieldFromEntity<string>(SystemCustomerFieldNames.SelectedPaymentMethod, request.Store.Id);- decimal paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(request.Cart, paymentMethodSystemName);- decimal paymentMethodAdditionalFeeWithTaxBase = (await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, request.Customer)).paymentPrice;- if (paymentMethodAdditionalFeeWithTaxBase > decimal.Zero)+ double paymentMethodAdditionalFee = await _paymentService.GetAdditionalHandlingFee(request.Cart, paymentMethodSystemName);+ double paymentMethodAdditionalFeeWithTaxBase = (await _taxService.GetPaymentMethodAdditionalFee(paymentMethodAdditionalFee, request.Customer)).paymentPrice;+ if (paymentMethodAdditionalFeeWithTaxBase > 0){model.PaymentMethodAdditionalFee = _priceFormatter.FormatPaymentMethodAdditionalFee(paymentMethodAdditionalFeeWithTaxBase);}@@ -132,7 +132,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartelse{var taxtotal = await _orderTotalCalculationService.GetTaxTotal(request.Cart);- SortedDictionary<decimal, decimal> taxRates = taxtotal.taxRates;+ SortedDictionary<double, double> taxRates = taxtotal.taxRates;if (taxtotal.taxtotal == 0 && _taxSettings.HideZeroTax){@@ -162,17 +162,17 @@ namespace Grand.Web.Features.Handlers.ShoppingCartprivate async Task PrepareTotal(OrderTotalsModel model, GetOrderTotals request){var carttotal = await _orderTotalCalculationService.GetShoppingCartTotal(request.Cart);- decimal? shoppingCartTotalBase = carttotal.shoppingCartTotal;- decimal orderTotalDiscountAmountBase = carttotal.discountAmount;+ double? shoppingCartTotalBase = carttotal.shoppingCartTotal;+ double orderTotalDiscountAmountBase = carttotal.discountAmount;List<AppliedGiftVoucher> appliedGiftVouchers = carttotal.appliedGiftVouchers;int redeemedLoyaltyPoints = carttotal.redeemedLoyaltyPoints;- decimal redeemedLoyaltyPointsAmount = carttotal.redeemedLoyaltyPointsAmount;+ double redeemedLoyaltyPointsAmount = carttotal.redeemedLoyaltyPointsAmount;if (shoppingCartTotalBase.HasValue){model.OrderTotal = _priceFormatter.FormatPrice(shoppingCartTotalBase.Value, false);}//discount- if (orderTotalDiscountAmountBase > decimal.Zero)+ if (orderTotalDiscountAmountBase > 0){model.OrderTotalDiscount = _priceFormatter.FormatPrice(-orderTotalDiscountAmountBase, false);}@@ -187,7 +187,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCart}//loyalty points to be spent (redeemed)- if (redeemedLoyaltyPointsAmount > decimal.Zero)+ if (redeemedLoyaltyPointsAmount > 0){model.RedeemedLoyaltyPoints = redeemedLoyaltyPoints;model.RedeemedLoyaltyPointsAmount = _priceFormatter.FormatPrice(-redeemedLoyaltyPointsAmount, false);@@ -198,7 +198,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCart_loyaltyPointsSettings.DisplayHowMuchWillBeEarned &&shoppingCartTotalBase.HasValue){- decimal? shippingBaseInclTax = model.RequiresShipping+ double? shippingBaseInclTax = model.RequiresShipping? (await _orderTotalCalculationService.GetShoppingCartShippingTotal(request.Cart, true)).shoppingCartShippingTotal: 0;var earnLoyaltyPoints = shoppingCartTotalBase.Value - shippingBaseInclTax.Value;@@ -216,7 +216,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCart};gcModel.Amount = _priceFormatter.FormatPrice(-appliedGiftVoucher.AmountCanBeUsed, false);- decimal remainingAmountBase = appliedGiftVoucher.GiftVoucher.GetGiftVoucherRemainingAmount() - appliedGiftVoucher.AmountCanBeUsed;+ double remainingAmountBase = appliedGiftVoucher.GiftVoucher.GetGiftVoucherRemainingAmount() - appliedGiftVoucher.AmountCanBeUsed;gcModel.Remaining = _priceFormatter.FormatPrice(remainingAmountBase, false);model.GiftVouchers.Add(gcModel);diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetShoppingCartHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetShoppingCartHandler.csindex a0b69a855..0afe728ff 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetShoppingCartHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetShoppingCartHandler.cs@@ -187,7 +187,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCart});if (!minOrderSubtotalAmountOk){- decimal minOrderSubtotalAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(_orderSettings.MinOrderSubtotalAmount, request.Currency);+ double minOrderSubtotalAmount = await _currencyService.ConvertFromPrimaryStoreCurrency(_orderSettings.MinOrderSubtotalAmount, request.Currency);model.MinOrderSubtotalWarning = string.Format(_translationService.GetResource("Checkout.MinOrderSubtotalAmount"), _priceFormatter.FormatPrice(minOrderSubtotalAmount, false));}}@@ -262,11 +262,11 @@ namespace Grand.Web.Features.Handlers.ShoppingCart//display price if allowedif (await _permissionService.Authorize(StandardPermission.DisplayPrices)){- decimal priceAdjustmentBase = (await _taxService.GetCheckoutAttributePrice(attribute, attributeValue)).checkoutPrice;- decimal priceAdjustment = await _currencyService.ConvertFromPrimaryStoreCurrency(priceAdjustmentBase, request.Currency);- if (priceAdjustmentBase > decimal.Zero)+ double priceAdjustmentBase = (await _taxService.GetCheckoutAttributePrice(attribute, attributeValue)).checkoutPrice;+ double priceAdjustment = await _currencyService.ConvertFromPrimaryStoreCurrency(priceAdjustmentBase, request.Currency);+ if (priceAdjustmentBase > 0)attributeValueModel.PriceAdjustment = "+" + _priceFormatter.FormatPrice(priceAdjustment);- else if (priceAdjustmentBase < decimal.Zero)+ else if (priceAdjustmentBase < 0)attributeValueModel.PriceAdjustment = "-" + _priceFormatter.FormatPrice(-priceAdjustment);}}@@ -458,10 +458,10 @@ namespace Grand.Web.Features.Handlers.ShoppingCartelse{var unitprices = await _pricingService.GetUnitPrice(sci, product, true);- decimal discountAmount = unitprices.discountAmount;+ double discountAmount = unitprices.discountAmount;List<ApplyDiscount> appliedDiscounts = unitprices.appliedDiscounts;var productprices = await _taxService.GetProductPrice(product, unitprices.unitprice);- decimal taxRate = productprices.taxRate;+ double taxRate = productprices.taxRate;cartItemModel.UnitPriceWithoutDiscountValue =(await _taxService.GetProductPrice(product, (await _pricingService.GetUnitPrice(sci, product, false)).unitprice)).productprice;@@ -482,17 +482,17 @@ namespace Grand.Web.Features.Handlers.ShoppingCart}//sub totalvar subtotal = await _pricingService.GetSubTotal(sci, product, true);- decimal shoppingCartItemDiscountBase = subtotal.discountAmount;+ double shoppingCartItemDiscountBase = subtotal.discountAmount;List<ApplyDiscount> scDiscounts = subtotal.appliedDiscounts;var shoppingCartItemSubTotalWithDiscount = (await _taxService.GetProductPrice(product, subtotal.subTotal)).productprice;cartItemModel.SubTotal = _priceFormatter.FormatPrice(shoppingCartItemSubTotalWithDiscount);cartItemModel.SubTotalValue = shoppingCartItemSubTotalWithDiscount;//display an applied discount amount- if (shoppingCartItemDiscountBase > decimal.Zero)+ if (shoppingCartItemDiscountBase > 0){shoppingCartItemDiscountBase = (await _taxService.GetProductPrice(product, shoppingCartItemDiscountBase)).productprice;- if (shoppingCartItemDiscountBase > decimal.Zero)+ if (shoppingCartItemDiscountBase > 0){cartItemModel.Discount = _priceFormatter.FormatPrice(shoppingCartItemDiscountBase);}diff --git a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetWishlistHandler.cs b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetWishlistHandler.csindex a67cda10f..e427c6274 100644--- a/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetWishlistHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/ShoppingCart/GetWishlistHandler.cs@@ -161,7 +161,7 @@ namespace Grand.Web.Features.Handlers.ShoppingCartelse{var productprice = await _taxService.GetProductPrice(product, (await _pricingService.GetUnitPrice(sci, product)).unitprice);- decimal taxRate = productprice.taxRate;+ double taxRate = productprice.taxRate;cartItemModel.UnitPrice = _priceFormatter.FormatPrice(productprice.productprice);}//subtotal, discount@@ -173,17 +173,17 @@ namespace Grand.Web.Features.Handlers.ShoppingCart{//sub totalvar subtotal = await _pricingService.GetSubTotal(sci, product, true);- decimal shoppingCartItemDiscountBase = subtotal.discountAmount;+ double shoppingCartItemDiscountBase = subtotal.discountAmount;List<ApplyDiscount> scDiscounts = subtotal.appliedDiscounts;var productprices = await _taxService.GetProductPrice(product, subtotal.subTotal);- decimal taxRate = productprices.taxRate;+ double taxRate = productprices.taxRate;cartItemModel.SubTotal = _priceFormatter.FormatPrice(productprices.productprice);//display an applied discount amount- if (shoppingCartItemDiscountBase > decimal.Zero)+ if (shoppingCartItemDiscountBase > 0){shoppingCartItemDiscountBase = (await _taxService.GetProductPrice(product, shoppingCartItemDiscountBase)).productprice;- if (shoppingCartItemDiscountBase > decimal.Zero)+ if (shoppingCartItemDiscountBase > 0){cartItemModel.Discount = _priceFormatter.FormatPrice(shoppingCartItemDiscountBase);}diff --git a/src/Web/Grand.Web/Features/Models/Catalog/GetFormatBasePrice.cs b/src/Web/Grand.Web/Features/Models/Catalog/GetFormatBasePrice.csindex ccf576454..dec85895a 100644--- a/src/Web/Grand.Web/Features/Models/Catalog/GetFormatBasePrice.cs+++ b/src/Web/Grand.Web/Features/Models/Catalog/GetFormatBasePrice.cs@@ -7,6 +7,6 @@ namespace Grand.Web.Features.Models.Catalog{public Currency Currency { get; set; }public Product Product { get; set; }- public decimal? ProductPrice { get; set; }+ public double? ProductPrice { get; set; }}}diff --git a/src/Web/Grand.Web/Features/Models/ShoppingCart/GetAddToCart.cs b/src/Web/Grand.Web/Features/Models/ShoppingCart/GetAddToCart.csindex 4f5b43453..929307094 100644--- a/src/Web/Grand.Web/Features/Models/ShoppingCart/GetAddToCart.cs+++ b/src/Web/Grand.Web/Features/Models/ShoppingCart/GetAddToCart.cs@@ -22,7 +22,7 @@ namespace Grand.Web.Features.Models.ShoppingCartpublic Store Store { get; set; }public TaxDisplayType TaxDisplayType { get; set; }public int Quantity { get; set; }- public decimal? CustomerEnteredPrice { get; set; }+ public double? CustomerEnteredPrice { get; set; }public IList<CustomAttribute> Attributes { get; set; } = new List<CustomAttribute>();public ShoppingCartType CartType { get; set; }public DateTime? StartDate { get; set; }diff --git a/src/Web/Grand.Web/Models/Catalog/ProductDetailsModel.cs b/src/Web/Grand.Web/Models/Catalog/ProductDetailsModel.csindex ec431d377..377ee32f1 100644--- a/src/Web/Grand.Web/Models/Catalog/ProductDetailsModel.cs+++ b/src/Web/Grand.Web/Models/Catalog/ProductDetailsModel.cs@@ -62,7 +62,7 @@ namespace Grand.Web.Models.Catalogpublic bool IsFreeShipping { get; set; }public bool AllowToSelectWarehouse { get; set; }public IList<ProductWarehouseModel> ProductWarehouses { get; set; }- public decimal AdditionalShippingCharge { get; set; }+ public double AdditionalShippingCharge { get; set; }public string AdditionalShippingChargeStr { get; set; }public bool FreeShippingNotificationEnabled { get; set; }public string DeliveryDate { get; set; }@@ -96,8 +96,8 @@ namespace Grand.Web.Models.Catalogpublic IList<ProductBundleModel> ProductBundleModels { get; set; }public bool DisplayDiscontinuedMessage { get; set; }public string CurrentStoreName { get; set; }- public decimal StartPrice { get; set; }- public decimal HighestBidValue { get; set; }+ public double StartPrice { get; set; }+ public double HighestBidValue { get; set; }public DateTime? EndTime { get; set; }public DateTime? EndTimeLocalTime { get; set; }public bool AuctionEnded { get; set; }@@ -133,7 +133,7 @@ namespace Grand.Web.Models.Catalog[GrandResourceDisplayName("Products.EnterProductPrice")]public bool EnteredPrice { get; set; }[GrandResourceDisplayName("Products.EnterProductPrice")]- public decimal CustomerEnteredPrice { get; set; }+ public double CustomerEnteredPrice { get; set; }public String CustomerEnteredPriceRange { get; set; }public bool DisableBuyButton { get; set; }public bool DisableWishlistButton { get; set; }@@ -165,7 +165,7 @@ namespace Grand.Web.Models.Catalogpublic string CatalogPrice { get; set; }public string Price { get; set; }public string PriceWithDiscount { get; set; }- public decimal PriceValue { get; set; }+ public double PriceValue { get; set; }public bool EnteredPrice { get; set; }public bool CallForPrice { get; set; }public string ProductId { get; set; }@@ -176,9 +176,9 @@ namespace Grand.Web.Models.Catalog//Auctionpublic bool IsAuction { get; set; }public string HighestBid { get; set; }- public decimal HighestBidValue { get; set; }+ public double HighestBidValue { get; set; }public string StartPrice { get; set; }- public decimal StartPriceValue { get; set; }+ public double StartPriceValue { get; set; }public bool DisableBuyButton { get; set; }public string BasePricePAngV { get; set; }@@ -268,7 +268,7 @@ namespace Grand.Web.Models.Catalog//picture model is used with "image square" attribute typepublic PictureModel ImageSquaresPictureModel { get; set; }public string PriceAdjustment { get; set; }- public decimal PriceAdjustmentValue { get; set; }+ public double PriceAdjustmentValue { get; set; }public string StockAvailability { get; set; }public bool IsPreSelected { get; set; }//picture model is used when we want to override a default product picture when some attribute is selected@@ -291,7 +291,7 @@ namespace Grand.Web.Models.Catalogpublic string Gtin { get; set; }public int Quantity { get; set; }public string Price { get; set; }- public decimal PriceValue { get; set; }+ public double PriceValue { get; set; }public PictureModel DefaultPictureModel { get; set; }public IList<ProductAttributeModel> ProductAttributes { get; set; }}diff --git a/src/Web/Grand.Web/Models/Catalog/ProductOverviewModel.cs b/src/Web/Grand.Web/Models/Catalog/ProductOverviewModel.csindex 2ec01baf6..357ee10b7 100644--- a/src/Web/Grand.Web/Models/Catalog/ProductOverviewModel.cs+++ b/src/Web/Grand.Web/Models/Catalog/ProductOverviewModel.cs@@ -63,14 +63,14 @@ namespace Grand.Web.Models.Catalog}public string OldPrice { get; set; }- public decimal OldPriceValue { get; set; }+ public double OldPriceValue { get; set; }public string CatalogPrice { get; set; }public string Price { get; set; }- public decimal PriceValue { get; set; }+ public double PriceValue { get; set; }public string StartPrice { get; set; }- public decimal StartPriceValue { get; set; }+ public double StartPriceValue { get; set; }public string HighestBid { get; set; }- public decimal HighestBidValue { get; set; }+ public double HighestBidValue { get; set; }public string BasePricePAngV { get; set; }public bool DisableBuyButton { get; set; }public bool DisableWishlistButton { get; set; }diff --git a/src/Web/Grand.Web/Models/Customer/CustomerAuctionsModel.cs b/src/Web/Grand.Web/Models/Customer/CustomerAuctionsModel.csindex ba8ecbe19..fcd34d425 100644--- a/src/Web/Grand.Web/Models/Customer/CustomerAuctionsModel.cs+++ b/src/Web/Grand.Web/Models/Customer/CustomerAuctionsModel.cs@@ -20,9 +20,9 @@ namespace Grand.Web.Models.Customerpublic string ProductName { get; set; }public string ProductSeName { get; set; }public string CurrentBidAmount { get; set; }- public decimal CurrentBidAmountValue { get; set; }+ public double CurrentBidAmountValue { get; set; }public string BidAmount { get; set; }- public decimal BidAmountValue { get; set; }+ public double BidAmountValue { get; set; }public DateTime EndBidDate { get; set; }public bool Ended { get; set; }public bool HighestBidder { get; set; }diff --git a/src/Web/Grand.Web/Models/Customer/DocumentsModel.cs b/src/Web/Grand.Web/Models/Customer/DocumentsModel.csindex 39da3a143..71a1a2942 100644--- a/src/Web/Grand.Web/Models/Customer/DocumentsModel.cs+++ b/src/Web/Grand.Web/Models/Customer/DocumentsModel.cs@@ -26,8 +26,8 @@ namespace Grand.Web.Models.Customerpublic string Status { get; set; }public string DocumentType { get; set; }public string Link { get; set; }- public decimal Amount { get; set; }- public decimal OutstandAmount { get; set; }+ public double Amount { get; set; }+ public double OutstandAmount { get; set; }public int Quantity { get; set; }public DateTime? DocDate { get; set; }public DateTime? DueDate { get; set; }diff --git a/src/Web/Grand.Web/Models/Orders/OrderDetailsModel.cs b/src/Web/Grand.Web/Models/Orders/OrderDetailsModel.csindex c6a4bd426..1742db04a 100644--- a/src/Web/Grand.Web/Models/Orders/OrderDetailsModel.cs+++ b/src/Web/Grand.Web/Models/Orders/OrderDetailsModel.cs@@ -95,9 +95,9 @@ namespace Grand.Web.Models.Orderspublic string ProductSeName { get; set; }public PictureModel Picture { get; set; }public string UnitPrice { get; set; }- public decimal UnitPriceValue { get; set; }+ public double UnitPriceValue { get; set; }public string UnitPriceWithoutDiscount { get; set; }- public decimal UnitPriceWithoutDiscountValue { get; set; }+ public double UnitPriceWithoutDiscountValue { get; set; }public string SubTotal { get; set; }public string Discount { get; set; }public int Quantity { get; set; }diff --git a/src/Web/Grand.Web/Models/ShoppingCart/AddToCartModel.cs b/src/Web/Grand.Web/Models/ShoppingCart/AddToCartModel.csindex 35917abdc..bef20e5ad 100644--- a/src/Web/Grand.Web/Models/ShoppingCart/AddToCartModel.cs+++ b/src/Web/Grand.Web/Models/ShoppingCart/AddToCartModel.cs@@ -21,18 +21,18 @@ namespace Grand.Web.Models.ShoppingCartpublic int Quantity { get; set; }public int ItemQuantity { get; set; }public string Price { get; set; }- public decimal DecimalPrice { get; set; }+ public double DecimalPrice { get; set; }public string TotalPrice { get; set; }public ShoppingCartType CartType { get; set; }public int TotalItems { get; set; }public string SubTotal { get; set; }public string SubTotalDiscount { get; set; }- public decimal DecimalSubTotal { get; set; }+ public double DecimalSubTotal { get; set; }public bool IsAuction { get; set; }public string HighestBid { get; set; }- public decimal HighestBidValue { get; set; }+ public double HighestBidValue { get; set; }public DateTime? EndTime { get; set; }}}\ No newline at end of filediff --git a/src/Web/Grand.Web/Models/ShoppingCart/ShoppingCartModel.cs b/src/Web/Grand.Web/Models/ShoppingCart/ShoppingCartModel.csindex 1559a6633..6d457ef06 100644--- a/src/Web/Grand.Web/Models/ShoppingCart/ShoppingCartModel.cs+++ b/src/Web/Grand.Web/Models/ShoppingCart/ShoppingCartModel.cs@@ -62,11 +62,11 @@ namespace Grand.Web.Models.ShoppingCartpublic string VendorName { get; set; }public string VendorSeName { get; set; }public string UnitPriceWithoutDiscount { get; set; }- public decimal UnitPriceWithoutDiscountValue { get; set; }+ public double UnitPriceWithoutDiscountValue { get; set; }public string UnitPrice { get; set; }- public decimal UnitPriceValue { get; set; }+ public double UnitPriceValue { get; set; }public string SubTotal { get; set; }- public decimal SubTotalValue { get; set; }+ public double SubTotalValue { get; set; }public string Discount { get; set; }public int DiscountedQty { get; set; }public List<string> Discounts { get; set; }diff --git a/src/Web/Grand.Web/Views/Catalog/_VendorReviewOverview.cshtml b/src/Web/Grand.Web/Views/Catalog/_VendorReviewOverview.cshtmlindex 248b73d53..13deb042c 100644--- a/src/Web/Grand.Web/Views/Catalog/_VendorReviewOverview.cshtml+++ b/src/Web/Grand.Web/Views/Catalog/_VendorReviewOverview.cshtml@@ -11,10 +11,10 @@{<div class="vendor-reviews-overview d-inline-flex align-items-center flex-wrap" @if (Model.TotalReviews > 0) { <text> itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" </text> }>@{- decimal ratingValue = 0;+ double ratingValue = 0;if (Model.TotalReviews != 0){- ratingValue = Convert.ToDecimal(((Model.RatingSum * (double)100) / Model.TotalReviews) / (double)100);+ ratingValue = Convert.ToDouble(((Model.RatingSum * (double)100) / Model.TotalReviews) / (double)100);}}<div class="rating">@@ -28,7 +28,7 @@</b-button></div>@* Rendering microdata info*@- decimal ratingValuee = ratingPercent / (decimal)20;+ double ratingValuee = ratingPercent / (double)20;<span itemprop="reviewCount" style="display: none;">(@ratingValuee.ToString("0.0", new CultureInfo("en-US")))</span>}elsediff --git a/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml b/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtmlindex dcb268a1f..aa4b60ba7 100644--- a/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml+++ b/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml@@ -187,28 +187,28 @@<div class="right"><ul><li>@(_translationService.GetResource("PDFInvoice.Sub-Total", order.CustomerLanguageId)) @order.OrderSubtotalInclTax @order.CustomerCurrencyCode</li>- @if (order.OrderSubTotalDiscountInclTax > decimal.Zero)+ @if (order.OrderSubTotalDiscountInclTax > 0){<li>@(_translationService.GetResource("PDFInvoice.Discount", order.CustomerLanguageId)) @order.OrderSubTotalDiscountInclTax @order.CustomerCurrencyCode</li>}- @if (order.PaymentMethodAdditionalFeeInclTax > decimal.Zero)+ @if (order.PaymentMethodAdditionalFeeInclTax > 0){<li>@(_translationService.GetResource("PDFInvoice.PaymentmethodAdditionalFee", order.CustomerLanguageId)) @order.PaymentMethodAdditionalFeeInclTax @order.CustomerCurrencyCode</li>}<li>@(_translationService.GetResource("PDFInvoice.Shipping", order.CustomerLanguageId)) @order.OrderShippingInclTax @order.CustomerCurrencyCode</li>- @if (order.OrderDiscount > decimal.Zero)+ @if (order.OrderDiscount > 0){<li>@(_translationService.GetResource("PDFInvoice.Discount", order.CustomerLanguageId)) @order.OrderDiscount @order.CustomerCurrencyCode</li>}@foreach (var gcuh in await _giftVoucherService.GetAllGiftVoucherUsageHistory(order.Id)){- if (gcuh.UsedValue > decimal.Zero)+ if (gcuh.UsedValue > 0){var giftvoucher = await _giftVoucherService.GetGiftVoucherById(gcuh.GiftVoucherId);<li>@(string.Format(_translationService.GetResource("PDFInvoice.GiftVoucherInfo", order.CustomerLanguageId), giftvoucher.Code)) @gcuh.UsedValue</li>}}- @if (order.OrderTax > decimal.Zero)+ @if (order.OrderTax > 0){<li>@(_translationService.GetResource("PDFInvoice.Tax", order.CustomerLanguageId)) @order.OrderTax @order.CustomerCurrencyCode</li>}diff --git a/src/Web/Grand.Web/Views/Product/CompareProducts.cshtml b/src/Web/Grand.Web/Views/Product/CompareProducts.cshtmlindex e9db7359f..7d5b61419 100644--- a/src/Web/Grand.Web/Views/Product/CompareProducts.cshtml+++ b/src/Web/Grand.Web/Views/Product/CompareProducts.cshtml@@ -11,7 +11,7 @@string columnWidth = "";if (Model.Products.Any()){- columnWidth = Math.Round((decimal)(90M / Model.Products.Count), 0).ToString() + "%";+ columnWidth = Math.Round((double)(90M / Model.Products.Count), 0).ToString() + "%";}diff --git a/src/Web/Grand.Web/Views/Product/_ProductReviewOverview.cshtml b/src/Web/Grand.Web/Views/Product/_ProductReviewOverview.cshtmlindex 41bc9d7ca..6828a3284 100644--- a/src/Web/Grand.Web/Views/Product/_ProductReviewOverview.cshtml+++ b/src/Web/Grand.Web/Views/Product/_ProductReviewOverview.cshtml@@ -10,10 +10,10 @@<div class="product-reviews-overview d-inline-flex align-items-center flex-wrap" @if (Model.TotalReviews > 0) { <text> itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" </text> }><div class="product-review-box d-inline-block order-1">@{- decimal ratingValue = 0;+ double ratingValue = 0;if (Model.TotalReviews != 0){- ratingValue = Convert.ToDecimal(((Model.RatingSum * (double)100) / Model.TotalReviews) / (double)100);+ ratingValue = Convert.ToDouble(((Model.RatingSum * (double)100) / Model.TotalReviews) / (double)100);}}<div class="rating">@@ -27,7 +27,7 @@</b-button></div>@* rendering microdata info*@- decimal ratingValuee = ratingPercent / (decimal)20;+ double ratingValuee = ratingPercent / (double)20;<span itemprop="reviewCount" style="display: none;">(@ratingValuee.ToString("0.0", new CultureInfo("en-US")))</span>}elsediff --git a/src/Web/Grand.Web/Views/Shared/_CatalogProductListView.cshtml b/src/Web/Grand.Web/Views/Shared/_CatalogProductListView.cshtmlindex 2dc047094..b7973d404 100644--- a/src/Web/Grand.Web/Views/Shared/_CatalogProductListView.cshtml+++ b/src/Web/Grand.Web/Views/Shared/_CatalogProductListView.cshtml@@ -63,10 +63,10 @@<div class="prices-rating">@if (Model.ReviewOverviewModel.AllowCustomerReviews){- decimal ratingValue = 0;+ double ratingValue = 0;if (Model.ReviewOverviewModel.TotalReviews != 0){- ratingValue = Convert.ToDecimal(((Model.ReviewOverviewModel.RatingSum * (double)100) / Model.ReviewOverviewModel.TotalReviews) / (double)100);+ ratingValue = Convert.ToDouble(((Model.ReviewOverviewModel.RatingSum * (double)100) / Model.ReviewOverviewModel.TotalReviews) / (double)100);}<template><div class="rating">diff --git a/src/Web/Grand.Web/Views/Shared/_CatalogProductView.cshtml b/src/Web/Grand.Web/Views/Shared/_CatalogProductView.cshtmlindex 6f1eb873c..76dd73875 100644--- a/src/Web/Grand.Web/Views/Shared/_CatalogProductView.cshtml+++ b/src/Web/Grand.Web/Views/Shared/_CatalogProductView.cshtml@@ -62,10 +62,10 @@<div class="prices-rating">@if (Model.ReviewOverviewModel.AllowCustomerReviews){- decimal ratingValue = 0;+ double ratingValue = 0;if (Model.ReviewOverviewModel.TotalReviews != 0){- ratingValue = Convert.ToDecimal(((Model.ReviewOverviewModel.RatingSum * (double)100) / Model.ReviewOverviewModel.TotalReviews) / (double)100);+ ratingValue = Convert.ToDouble(((Model.ReviewOverviewModel.RatingSum * (double)100) / Model.ReviewOverviewModel.TotalReviews) / (double)100);}<template><div class="rating">