/// <summary> /// Calculates taxes for the invoice /// </summary> /// <param name="invoice">The <see cref="IInvoice"/></param> /// <param name="taxAddress">The address (generally country code and region) to be used to determine the taxation rates</param> /// <param name="quoteOnly">A value indicating whether or not the taxes should be calculated as a quote</param> /// <returns>The <see cref="ITaxCalculationResult"/> from the calculation</returns> public static ITaxCalculationResult CalculateTaxes(this IInvoice invoice, IAddress taxAddress, bool quoteOnly = true) { return invoice.CalculateTaxes(MerchelloContext.Current, taxAddress, quoteOnly); }
/// <summary> /// Calculates taxes for the invoice /// </summary> /// <param name="invoice">The <see cref="IInvoice"/></param> /// <param name="taxAddress">The address (generally country code and region) to be used to determine the taxation rates</param> /// <returns>The <see cref="ITaxCalculationResult"/> from the calculation</returns> public static ITaxCalculationResult CalculateTaxes(this IInvoice invoice, IAddress taxAddress) { return invoice.CalculateTaxes(MerchelloContext.Current, taxAddress); }
/// <summary> /// Calculates taxes for the invoice /// </summary> /// <param name="invoice"> /// The <see cref="IInvoice"/> /// </param> /// <param name="quoteOnly"> /// A value indicating whether or not the taxes should be calculated as a quote /// </param> /// <returns> /// The <see cref="ITaxCalculationResult"/> from the calculation /// </returns> public static ITaxCalculationResult CalculateTaxes(this IInvoice invoice, bool quoteOnly = true) { return invoice.CalculateTaxes(invoice.GetBillingAddress(), quoteOnly); }
/// <summary> /// Calculates taxes for the invoice /// </summary> /// <param name="invoice">The <see cref="IInvoice"/></param> /// <returns>The <see cref="ITaxCalculationResult"/> from the calculation</returns> public static ITaxCalculationResult CalculateTaxes(this IInvoice invoice) { return invoice.CalculateTaxes(invoice.GetBillingAddress()); }