954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Invoice system

hi people..

I was wondering if u experts could help me with this.
I have attached a screenshot of my form.
This is an invoice system..

I have customers table for customer profiles..
I have Products table
I have manufactures table

I want to save all invoices so that these invoices can be retrieved later for viewing in future.

I just dont know what should be the database structure for this..

it was simple for customers, products and manufacturers...
they had cust_id,prod_id and manufact_id..

shall i create another table called invoices and
probable create invoice_id and primary key, but how do i store these values..coz these will be multiple values in single cell..

please help.
any idea is welcome.

Attachments dialog.JPG 35.3KB
bilal_fazlani
Junior Poster in Training
55 posts since Oct 2011
Reputation Points: 10
Solved Threads: 3
 

You could create two new tables named Invoice and InvoiceLine. Each invoice would have a unique primary key named Invoice_ID. The fields in this table would contain information relevant to the entire invoice (Customer_ID, date, status, etc). InvoiceLine would have a primary key consisting of Invoice_ID and Line_ID. This table would contain all the info for each invoice item (product id, quantity, unit cost, etc).

Reverend Jim
Posting Shark
Moderator
1,169 posts since Aug 2010
Reputation Points: 253
Solved Threads: 159
 

Just make sure you store all the data that are possible to change in the invoices tables, so that you can retrieve the same data as your invoice.
A good example is price, another is customer's info (address might change or whatever).

adam_k
Practically a Posting Shark
803 posts since Jun 2011
Reputation Points: 256
Solved Threads: 149
 

@ Reverend Jim : man u solved my problem .!
I see how invoices work now.

thanks a lot buddy
:)

bilal_fazlani
Junior Poster in Training
55 posts since Oct 2011
Reputation Points: 10
Solved Threads: 3
 

that's really helpful Adam..
thanks :)

bilal_fazlani
Junior Poster in Training
55 posts since Oct 2011
Reputation Points: 10
Solved Threads: 3
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: