I have some trouble with database design..I have tables customers and agents which generate transactions which should be recorded in ledger table.
Please refer to attachment for the design.
I cannot get referential integrity between customers/agents and ledger.
Please propose changes so that I can get up this database working.
Any accounting+computer expert would be able to solve this!!
Customers in this case is Consignors..
let me give u some background.
1.each sale can generate many transactions which will be recorded in ledger.
2.each purchase can generate many transactions which will be recorded in ledger.
3.There are other accounts like cash etc that need to be maintained in coa.
Sale and ledger have one to many relationship.
Purchase and ledger have one to many relationship.
-->I cant identify which transaction sale/purchase created the journal entry.
-->If I want to fetch the consignor A/c stats I have to join ledger and ???