I don't see the point (especially in my use case). I can easily create the invoice using the information from the order_items table. And the created invoice pdf itself is secured in the cloud + with a backup.
Is it just to back up the information given in an invoice?
not really a backup but a picture taken at the order instant (order items can later change but you are still able to get the search from data from your invoices in the db)
yes the .pdf invoices have also the rigth data, but you can't "query" these data
invoices items can be different from order items (you can add some lines like transportation, insurance, rebate, ... or change words for clients requirements ....)
sometimes invoice lines need to reflect what was actually fulfilled (which could be different to what was ordered)
One example is holding the specific serial number of a picked item
Another example might be where a 'kit' is involved . Invoice is what the customer is charged for (ie, complete unit, order is 1 x pack A, 2 x Pack B, 4 x Pack C
Having said that, I have multiple sites where orderline and invoice line are the same thing
@shadrix Simple: because a single invoice has many line items. So you’d have an invoice_line_items table or similar that has a row per line item, and each row with a foreign key pointing to the invoice that line item belongs to.
Oh wow! Thanks for your detailed answers, I didn't expect that at all. Cool, because each of you added something unique about it. I can't even decide who gets the Best Answer 😂