How to make a invoice table

A

A. Knobbe

Hello,

Sorry for my bad english,
but i have the next question.....

I have a table with customer information.
I have also a table with products

The next thing i like to make is an invoice table with the customer i
already have. and the products with the prices i have.

How do i do that

Please help me>>

Greets ALex
 
A

Allen Browne

Create two tables: one for the invoice header, and a related table for the
invoice detail items.

Invoice table:
InvoiceID AutoNumber Primary key
InvoiceDate Date/Time
CustomerID Number foreign key to Customer.CustomerID

InvoiceDetail table:
InvoiceDetailID AutoNumber Primary key
InvoiceID Number foreign key to Invoice.InvoiceID
Quantity Number how many of the product
ProductID Number foreign key to Product.ProductID
UnitPrice Currency price each for the product.
TaxRate Number (Dbl) Tax rate to add for this row of the
invoice.

I suggest using the TaxRate in the detail table, since that copes with
situations where some items are tax exempt and others are not on the same
invoice.


If using 2 tables like that is a new idea, open the Northwind sample
database, and compare the Orders and Order Details tables. You can also look
at the query that is the source for the Orders Subform, to see how the
totals are calculated.

Typically I also include a couple of memo fields in the Invoice table, for
any text that should appear above the detail items, and below the detail
items. You probably also want a field for payment terms that should appear
on the bottom of the invoice.
 
Top