/// <summary> /// Convert current product price to other currency using currency exchange rate /// </summary> /// <param name="currency"></param> /// <returns></returns> public ProductPrice ConvertTo(Currency currency) { var retVal = new ProductPrice(currency); retVal.ListPrice = ListPrice.ConvertTo(currency); retVal.SalePrice = SalePrice.ConvertTo(currency); retVal.DiscountAmount = DiscountAmount.ConvertTo(currency); retVal.ProductId = ProductId; return(retVal); }
/// <summary> /// Convert current product price to other currency using currency exchange rate /// </summary> /// <param name="currency"></param> /// <returns></returns> public ProductPrice ConvertTo(Currency currency) { var retVal = new ProductPrice(currency); retVal.ListPrice = ListPrice.ConvertTo(currency); retVal.SalePrice = SalePrice.ConvertTo(currency); retVal.ProductId = ProductId; if (ActiveDiscount != null) { retVal.ActiveDiscount = ActiveDiscount.ConvertTo(currency); } if (PotentialDiscount != null) { retVal.PotentialDiscount = PotentialDiscount.ConvertTo(currency); } return(retVal); }