I am building a database to handle our customers. With time, it should integrate directly with our invoicing system and with our warehouse system, so that it essentially controls our whole business. We sell things. B2B only, no private customers.
I am not sure what’s best practice in terms of the shipping address. The companies we sell to of course has a headquarters, but usually, we deliver to construction sites, so often, we get a single order with 5 shipping addresses for different goods.
I don’t feel like it makes sense to store this in the company table. I could put it into the customer table (companies has several buyers often), so that would sort of make sense, but it isn’t always the case that the different shipping addresses has different people that are supposed to recieve the goods. Sometimes it can be the same guy. Other times, they use a code called a “rek. nr” which is popular in Scandinavia, not sure what the equivalent would be in English. So the buying company would be the company, the the reciever would be this code, because then they know to deal with recieving the things they’ve bought.
So it’s a little confusing to me as I am totally new to Knack. I am curious as to hear your suggestions!
Personnally I would put
Order
connected to Company
connected one-to-many to Suborders
Company connected one-to-many to SubAdress and Recievers (specific contructions sites and reciever)
Order could have as components: Total Price, Date, Reference Number, Company, etc
Sub-orders have Thingpurchased, SubAdress, Receiver (from Connected-Company in Order)
Each order must have at least 1 SubOrder
Not sure if it ideal way to do it, but I think it would work.
It seems excessive. What would be normal way to do this in case you just had companies that occasionally wanted another delivery address? Imagine that they basically just have maybe 10 departments, and you occasionally deliver to just a few of them.
I am considering if it would be better to simply create an order for each delivery address, but of course, I would still need to consider where to put the delivery address regardless. I need both on the invoices.
If it were me:
Companies [1:M] Departments [1:M] Orders
If you also deliver to the parent Company, make that address a Department, as well. Don’t include the address fields in the Companies table. In the Departments table include a Yes/No field (checkbox) called “Headquarters”.
You can then have a page called Orders which looks up the Departments (and is already linked to the Company).
Make sense?
1 Like
I ended up doing the following:
All Companies has a an address field. It will be used ONLY for invoicing reasons. If a company changes address, we can change it.
I then have a table with delivery addresses that is connected to the companies tab. If the delivery address different or not when a company purchases does not matter, as the procedure can be the same since nothing prevents us from simply using that same address as the delivery address. Don’t need to connect anything to capture the address from the Companies table. Can simply type it in as with any other address.
Really appreciate the inputs guys thank you so much <3
1 Like