| West Wind Web Store .NET 2.0 |
Customizing Tax Calculation
|
The basic behavior is as follows (from busInvoice):
public virtual decimal CalculateTax() { if (this.ShipInfo.UseInvoiceFields) { this.ShipInfo.LoadFromInvoice(this); } if (this.ShipInfo.State != App.Configuration.TaxState) return (decimal) 0.00; return this.SubTotal * App.Configuration.TaxRate; }
Like in the Shipping Calculation the ShipInfo object can used in the calculations. Be sure you don't access the invoice fields directly as a full invoice may not actually exist yet.
This calculation might be all you need. If you need more perform more tasks override the method in a custom subclass of the busInvoice object which takes the form of:
public override decimal CalculateTax() { ... your code here return 0.00; }
Last Updated: 8/3/2006 |
Send topic feedback