If some items have VAT and some do not, you probably need a
ProductCategory table.
This table would have fields:
ProductCategoryID primary key
VatRate Number (size = Double, format = Percent.)
Now you can tell what VAT applies to a product by examining what category
it belongs to.
It is possible that the VAT rate will change over the years, or even that
some categories of product will have the VAT status changed. Governments
do these kinds of things, regardless of their promises. You therefore need
to store the VAT rate in each row of each order, so your existing records
will still be correct if these things change.
You probably have an Order table, with an OrderDetail to handle the row
items in the order. If some items have VAT and some do not, the
OrderDetail table needs to have a VatRate column.
Typically this is interfaced by a main form for the order, with a subform
for OrderDetail. The subform has a combo for selecting the product. The
product combo's RowSource is a query that uses both the Product and
ProductCategory tables, so that the columns of the combo contains its
current price ex-VAT (from the Product table) and the VatRate (from the
ProductCategory table.) You can therefore use the AfterUpdate event of the
combo to assign the PriceEachEx and VatRate to the fields in the subform.
The subform will be based on a query that has some calculated fields, such
as:
AmountEx: CCur(Nz([Quantity] * [PriceEachEx],0))
VatAmount: CCur(Round(Nz([VatRate],0) * [AmountEx], 2))
Since these calculated fields exist in the query the subform is based on,
you can sum these fields in the Form Footer section of your continuous
subform to get the order total.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
SG said:
I have created a database which has a table called tblVat which has the
VAT rate of 17.5% stored. I use this table to calculate vat etc. What I
also need to incorporate is Zero Rated VAT but I am struggling to
understand and figure out how I can incorporate this in to my database for
example if I am selling an item and there is no vat on the item how do I
them configure the database not to calulate the vat and to also rememeber
that the item has no VAT added when I am not storing the VAT total?
Any suggestions much appreciated.
Kind Regards
S