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
Properties
IgnoreVat
Gets or sets a value indicating whether to bypass VAT calculations.
public bool IgnoreVat { get; set; }
Property Value
- bool
trueif VAT calculations should be bypassed; otherwise,false.
RemoveVat
Gets or sets a value indicating whether to remove VAT from the current price.
public bool RemoveVat { get; set; }
Property Value
- bool
trueif 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
contextPriceContextpriceRawPriceRaw
Returns
Create(PriceContext, PriceRaw, Product)
Creates a new instance of the PriceCalculated class.
public static PriceCalculated Create(PriceContext context, PriceRaw priceRaw, Product product)
Parameters
contextPriceContextpriceRawPriceRawproductProduct
Returns
FindVatPercent(Country)
Finds the VAT percent for the given Country.
public static double FindVatPercent(Country country)
Parameters
countryCountryThe country used to determine VAT percent.
Returns
FindVatPercent(Country, Product?, bool)
public static double FindVatPercent(Country country, Product? product, bool reverseChargeForVatEnabled)
Parameters
countryCountryThe country used to determine VAT percent.
productProductThe product to get the VAT percent for.
reverseChargeForVatEnabledbool
Returns
ToString()
Returns a string that represents this instance.
public override string ToString()