How to link multiple invoices
My solution is roughly equivelent to the invoices starter solution with Customers, Products, Invoices, and Invoice Line Item tables.
However, in my business, I need to be able to link multiple invoices together when customers are sharing costs.
For example, Customer A needs 12 widgets and 4 woodgets. Customer B just needs 15 widgets. Customer A+Customer B are not actully using the items at the same time, so they would like to share the 12 widgets they have in common (and share their cost).
I'm thinking I might do this with an additional table occurance of my "current invoices" table, but not sure if that's the best solution. The user would need to be able to choose 5 or more different invoices to "link" together, and manipulate all the quantities of the items while seeing how the sum of each of the lines would be effected. One master invoice listing the totals would then have to be sent to the shop for completing the order.
thoughts / advice / examples appreciated.