Class PriceHelper
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
PriceHelper class. This class cannot be inherited.
public sealed class PriceHelper
- Inheritance
-
PriceHelper
- Inherited Members
Properties
PricesInDatabaseIncludeVat
Gets a value indicating whether prices in the database include VAT.
public static bool PricesInDatabaseIncludeVat { get; }
Property Value
- bool
true
if prices in the database include VAT; otherwise,false
.
SystemVat
Gets the system VAT.
public static double SystemVat { get; }
Property Value
- double
- System VAT.
Remarks
This is the VAT percent on prices in database.
Methods
ConvertToPIP(Currency, double)
Converts the given amount to a value in the smallest monitary unit for the given Currency.
If the currency doesn't have a culture, it's assumed that the currency uses 2 decimals.
public static long ConvertToPIP(Currency currency, double amount)
Parameters
currency
Currency- The currency that is used to determine the smallest monitary unit.
amount
double- The amount to convert to PIP.
Returns
- long
- The converted amount in PIP.