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