Okay, we will assume there will never, ever be any invoice that needs to
list 2 items, and no quote will ever need to list 2 alternatives.
Consider these four tables:
Customer table:
CustomerID AutoNumber primary key
Surname Text
FirstName Text
Address Text
City Text
Zip Text
...
Quote table:
QuoteID AutoNumber primary key
CustomerID Number The customer this quote is for
QuoteDate Date/Time When quote was given.
Duration Number number of days the quote is valid
Descrip Text (or memo) what this is for
Invoice table:
InvoiceID AutoNumber primary key
CustomerID Number who is to pay this invoice
InvoiceDate Date/Time when the invoice was sent
Terms Number number of days before due.
Descrip Text (or memo) what this is for
AmountEx Currency amount of this invoice, without tax.
TaxRate Number (Double) Percent tax rate to add.
QuoteID Number A way to identify the quote this came
from.
Comment Memo Comments not printed on invoice
Receipt table:
ReceiptID AutoNumber primary key
CustomerID Number who paid this amount
ReceiptDate Date/Time when received.
Amount Currency amount received.
Comment Memo description of what for.
This is the simplest solution that copes with everything, because the
receipts are not tied to invoices. Therefore anyone can pay you any amount
any time: partial invoices, multiple invoices, parts of multiples, and
even uninvoiced amounts. You then calculate how much as customer owes as:
DSum("[AmountEx] * (1+[TaxRate])", "Invoice", "[CustomerID] = 99")
- DSum("Amount", "Receipt", "[CustomerID] = 99")
That will actually work for years with many thousands of invoices per
client, so is suitable for many databases where Access is appropriate.
Beyond that, you are getting into double-entry accounting, with periods
that you close off with closing and opening balances, which may be adding
complexity you don't need.
Moody said:
Thanks for the reply but i have got a little confused, maybe i havent
understood something.
I think i know what you are trying to tell me and i agree with you but i
cant get my head around to doing so, it seems very difficult.
Really sorry to sound like an idiot but could you try to explain it a bit
more. I like your idea and would like it to be implemented, preferably
with
out the use of backend SQL.
the line items that you mentioned are not really an issue in this
database
becuase the work being carried out for the customer is not a specfic item
that has been stated, i would just use a description field for this and
set
the price i choose for this..
I really appreciate your help and i look forward to your reply.
Thanks
:
There's quite a bit to setting up a database like this.
You need a Customer table seprate from your Quote table, becuase one
customer can have several quotes over the years.
Then you need a QuoteDetail table, because one quote can have many line
items.
For an example of how to put this kind of thing together, open the
Northwind
sample database that installs with Access, and choose Relationships on
the
Tools menu. The Customers, Orders and OrderDetail tables are a similar
kind
of idea.
Once you have that sorted out, I suggest you need a Job and JobDetail
table
as well. The actual job can be different from the original quote, so
when a
quote succeeds you need to be able to retain the quote, but actually
charge
something different for the job (e.g. where the client accepts only part
of
the quote, or asks for extras.)
Invoices and payments received are another issue again. Your structure
needs
to cope with:
- Multiple invoices for one job (e.g. big job with progress payments);
- Multiple payments for one invoices (client pays over time);
- Multiple invoices in one payment (client pays several invoices at
once);
- Prepayments (client gives you a check before you write an invoice.)
You may also need to track your purchases for jobs, but that's another
story
again.
I am attempting to create a simple database that produces quotations
and
invoices. I have started with a customer table and the job table. i
dont
need
a products table becuase i just want to use a description for the work
that
is being carried out, so i have put this in the jobs table. I have
created
a
"Quote, "Invoiced" and "Paid" fields in the jobs table and these are
YES/NO
datatypes. Therefore this can be used to tell me which jobs i have
quoted,
invoiced and which jobs have been paid for.
i can put customers in, jobs for them customers in and i have got
these on
the same form but i dont know how i can create a quote, and an
invoice. i
have tried to use reports by clicking a command box which will display
the
record that is being displayed but i had not luck and i dont know what
i
can
do or what i am doing wrong.
Can some one help me or guide me to what i should be doing. I hope
what i
have stated is clear. Please help