shaunie Posted April 14, 2013 Share Posted April 14, 2013 Hi, I am creating a system that invoices for events. An event will be of a type of service which will have a cost related to it. I had been planning to store all transactions (payments, invoices, refunds, charges etc) in a transactions table. However invoices are different to all other transactions as they will have invoice line items (made up of events). Should I create a separate invoices table or have an invoice id for each event in the event table? I wanted to keep all transactions in one table as I felt this made sense and would be easier for calculating customer balances. Quote Link to comment https://forums.phpfreaks.com/topic/276939-invoice-system-database-design/ Share on other sites More sharing options...
Barand Posted April 30, 2013 Share Posted April 30, 2013 Should I create a separate invoices table or have an invoice id for each event in the event table? Both. You would at least need to store the invoice id and date (and maybe a reference to the customers order number) in an invoice table and then put the invoice id in the transactions covered by that invoice Quote Link to comment https://forums.phpfreaks.com/topic/276939-invoice-system-database-design/#findComment-1427356 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.