public decimal GetTax()
        {
            if (SalesTaxStrategy == null)
            {
                return(0m);
            }

            return(SalesTaxStrategy.GetTaxFor(this));
        }
Exemple #2
0
 public decimal GetTax()
 {
     return(SalesTaxStrategy?.GetTaxFor(this) ??
            throw new Exception($"Invoice cannot be generated. Tax details are not set for tax region {this.ShippingDetails.DestinationCountry}"));
 }