Class PriceCalculated
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
Represents information about calculated price.
[Serializable]
public class PriceCalculated : PriceInfo, IPriceReferenceInfo, IInformativePriceInfo, IPriceInfo, IPriceSourceInfo
- Inheritance
-
PriceCalculated
- Implements
- Inherited Members
Constructors
PriceCalculated()
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated()
PriceCalculated(Currency, Country)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country)
Parameters
PriceCalculated(Currency, Country, PriceRaw)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, PriceRaw priceRaw)
Parameters
PriceCalculated(Currency, Country, PriceRaw, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, PriceRaw priceRaw, bool isInformative)
Parameters
PriceCalculated(Currency, Country, Product)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product)
Parameters
PriceCalculated(Currency, Country, Product, PriceRaw)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, PriceRaw priceRaw)
Parameters
PriceCalculated(Currency, Country, Product, PriceRaw, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, PriceRaw priceRaw, bool isInformative)
Parameters
PriceCalculated(Currency, Country, Product, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, bool isInformative)
Parameters
PriceCalculated(Currency, Country, Product, bool, User)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, bool isInformative, User user)
Parameters
PriceCalculated(Currency, Country, Product, bool, string, User)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, bool isInformative, string unitId, User user)
Parameters
PriceCalculated(Currency, Country, Product, bool, string, User, string)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, bool isInformative, string unitId, User user, string shopId)
Parameters
currency
Currencycountry
Countryproduct
ProductisInformative
boolunitId
stringuser
UsershopId
string
PriceCalculated(Currency, Country, Product, bool, string, User, string, StockLocation)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, Product product, bool isInformative, string unitId, User user, string shopId, StockLocation stockLocation)
Parameters
currency
Currencycountry
Countryproduct
ProductisInformative
boolunitId
stringuser
UsershopId
stringstockLocation
StockLocation
PriceCalculated(Currency, Country, bool)
[Obsolete("Use Create method, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Currency currency, Country country, bool isInformative)
Parameters
PriceCalculated(PriceRaw)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(PriceRaw priceRaw)
Parameters
priceRaw
PriceRaw
PriceCalculated(PriceRaw, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(PriceRaw priceRaw, bool isInformative)
Parameters
PriceCalculated(Product)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Product product)
Parameters
product
Product
PriceCalculated(Product, PriceRaw)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Product product, PriceRaw priceRaw)
Parameters
PriceCalculated(Product, PriceRaw, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Product product, PriceRaw priceRaw, bool isInformative)
Parameters
PriceCalculated(Product, bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(Product product, bool isInformative)
Parameters
PriceCalculated(bool)
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceCalculated(bool isInformative)
Parameters
isInformative
bool
Properties
IgnoreRounding
Gets or sets a value indicating whether to bypass calculations of a given Rounding.
public bool IgnoreRounding { get; set; }
Property Value
- bool
true
if calculation should be bypassed; otherwise,false
.
IgnoreVat
Gets or sets a value indicating whether to bypass VAT calculations.
public bool IgnoreVat { get; set; }
Property Value
- bool
true
if VAT calculations should be bypassed; otherwise,false
.
PriceRaw
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public PriceRaw PriceRaw { get; set; }
Property Value
Product
[Obsolete("Use one of the static Create methods, set relevant properties and then call the Calculate method.")]
public Product Product { get; set; }
Property Value
RemoveVat
Gets or sets a value indicating whether to remove VAT from the current price.
public bool RemoveVat { get; set; }
Property Value
- bool
true
if price calculation should remove VAT from the current price; otherwise,false
.
Remarks
The VAT is only removed if prices in the database include VAT.
Otherwise, price calculation does not change with the value of this property.
VATPercent
Gets or sets the VAT percent.
public override double VATPercent { get; set; }
Property Value
Methods
Calculate()
public void Calculate()
Create(Currency, Country, PriceRaw)
Creates a new instance of the PriceCalculated class.
public static PriceCalculated Create(Currency currency, Country country, PriceRaw priceRaw)
Parameters
Returns
Create(PriceContext, PriceRaw)
Creates a new instance of the PriceCalculated class.
public static PriceCalculated Create(PriceContext context, PriceRaw priceRaw)
Parameters
context
PriceContextpriceRaw
PriceRaw
Returns
Create(PriceContext, PriceRaw, Product)
Creates a new instance of the PriceCalculated class.
public static PriceCalculated Create(PriceContext context, PriceRaw priceRaw, Product product)
Parameters
context
PriceContextpriceRaw
PriceRawproduct
Product
Returns
FindVatPercent(Country)
Finds the VAT percent for the given Country.
public static double FindVatPercent(Country country)
Parameters
country
Country- The country used to determine VAT percent.
Returns
FindVatPercent(Country, Product, bool)
public static double FindVatPercent(Country country, Product product, bool reverseChargeForVatEnabled)
Parameters
country
Country- The country used to determine VAT percent.
product
Product- The product to get the VAT percent for.
reverseChargeForVatEnabled
bool
Returns
GetCountryVAT()
[Obsolete("Use the static method FindVatPercent instead.")]
public double GetCountryVAT()
Returns
ToString()
Returns a string that represents this instance.
public override string ToString()