Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <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());
 }