Hi Community
I am designing an Invoice generator software for personal use. I am having trouble designing database structure. Here is what software says:
1. Invoice generator includes details fields such as "Invoice number" (automatically generated) ,"order number", "customer name","customer address","Phone No.'', "date","COD (yes or no)".
2. Table for order details such as Product name, quantity, price, tax type(cst or vat), tax amount, cod (yes or no, if yes cod charges extra) at the end total price and total tax is to be calculated and then total tax and the total price and cod charges(if any) is to be sum up for total billing amount.
3. Other than this I want that individual tax for each invoice is saved along with total value of invoice so that , i can have reports at the end of the month about total payble tax and all.
Here is my confusion for database :
I have created a ER diagram where I am created 3 table namely:
1)Order (details mentioned in point 1 above)
2)Order Details (includes item ordered and all details such as tax, price ,etc.
3)Reports ( to store total tax at end of month and total amount earned)
Images for my concept demonstration:
ER and
example data.
Please tell me is this a suggested way for making database (speed and efficiency) , if not please recommed me a alternative way. Thank you