Invoice table in system of different types of invoices

0

Good I wonder how I could create the invoice table and invoice detail in a system where not only are items sold. The question is the following in a business there is a restaurant and also sell items or products then how could you structure the database so you can have invoices for items or food service in a single table. I have thought about making different invoice tables one for each type of invoice or having the invoice table contain articles or the order of the restaurant service and that those fields are nullable and according to the type of invoice I pass the id of some of them.

Actually I do not know what the correct form would be.

    
asked by denifer santiago fernandez 11.10.2018 в 03:23
source

1 answer

0

Excellent question in questions of design you will always find many opinions from my point of view there are two solutions, see the food services as one more item which is very used, creating the item "menu of the day" or "menu" special ", and in another table include the inventory of the products used for the preparation of the menus, which allows you to cross the production costs with the acquired profits.

    
answered by 11.10.2018 в 04:21