System has many users belongs to a company. Admin user of the company can entry customers and each customer may have invoices with payment amount. The customer invoice amount need to be paid and should be inserted in double entry system in transaction master table.
Data Models are followings:
- User
- Company
- Customer
- Invoice
- Transaction Master
My initial approach will be:
Company will have a one to many relationship with users
in invoice table, the details will be saved.
My questions are:
- Do I need to create any relationship between customers and invoices tables?
- How the transaction master table will be created? (double entry system refers to have debit and credit accounts, that's all my knowledge)