I'm working on a fairly simple Invoicing system and I'm working on the structure at this point. I'm having a hard time deciding about some of my entities though.
There are three types of items which can be added to the invoice:
1. Static itmes from a list of about 1000 pre-defined items. Call these General Items
2. Personalised Items, similar in characteristics to the first, but with a custom pre-defined set with custom prices, based on the Salesperson (one-to-many from SalesPerson to CustomItems)
3. Ad-hoc items added manually at the time of invoicing.
I'm wondering if it is better to have three Tables, for each of the types of items, each with an ID, description and price and three join-tables to bind them to the invoices (and in the darkness bind them). Or, a single Table of all possible items, but with a "type" for each item which I could filter on to insert into the joint table when invoicing.
I'm afraid that if I need to filter, it will interfere with my "filter as you type" script for portals...
Am I better off using three portals, with threee inventories and three join tables, or, one portal with one join table and one inventory with "types"
I have to add that the General Items may not be modified by the clerk, the Custom ones could, but shouldn't, so let's say they won't, and the third, the ad-hoc ones, will be entered every time and could be quite different each time.
Thanks for any suggestions, this will orient my development quite a bit. Thanks!