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.

Recommended Answers

All 5 Replies

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).

commented: solved my problem +1

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).

commented: helpful +1

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

thanks a lot buddy
:)

that's really helpful Adam..
thanks :)

Hey Frnd, Can you give me this project, i have need it for My invoice Generator, i will modify from your project,
Please Send Me At: nilesh7136@gmail.com

Thanks In Adv...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.