示例#1
0
 /// <summary>
 /// The product pre tax sale price.
 /// </summary>
 /// <param name="extendedData">
 /// The extended data.
 /// </param>
 /// <returns>
 /// The <see cref="decimal"/>.
 /// </returns>
 public static decimal ProductPreTaxSalePrice(this ExtendedDataCollection extendedData)
 {
     return(!extendedData.TaxIncludedInProductPrice()
                ? extendedData.GetPriceValue()
                : extendedData.ContainsKey(Constants.ExtendedDataKeys.ProductSalePriceNoTax)
                      ? extendedData.GetValue(Constants.ExtendedDataKeys.ProductSalePriceNoTax).AsDecimal()
                      : extendedData.GetPriceValue());
 }
示例#2
0
 /// <summary>
 /// The product tax amount.
 /// </summary>
 /// <param name="extendedData">
 /// The extended data.
 /// </param>
 /// <returns>
 /// The <see cref="decimal"/>.
 /// </returns>
 public static decimal ProductSalePriceTaxAmount(this ExtendedDataCollection extendedData)
 {
     return(!extendedData.TaxIncludedInProductPrice()
                ? 0M
                : extendedData.ContainsKey(Constants.ExtendedDataKeys.ProductSalePriceTaxAmount)
                      ? extendedData.GetValue(Constants.ExtendedDataKeys.ProductSalePriceTaxAmount).AsDecimal()
                      : 0M);
 }