I want to create a accounting software using tables like this
(most tables have opening_balance field)
id tablename note
and records are in tbl_type
1, tbl_branch/cash dealing
All are ok.
In tbl_payment, tbl_receipt or tbl_expence fields like following
id date sourcetype source amount targettype target narration
in this table sourcetype related/join to tbl_type(id) also targettype relate/join to tbl_type(id)
for example in tbl_payment table record like
2, 2012-10-05,4,2,500,3,2, cheque no/net transfer ref no
in first record
sourcetype and source are 1 and 1 means cash and branch_id
targettype and target are 3 and 1 means vendor and vendor_id
in second record
sourcetype and source are 4 and 2 means bank account and bankaccount_id
targettype and target are 3 and 2 means vendor and vendor_id
same as receipt and expect also
in this case source and target columns are refer/link/join to multiple table based on sourcetype and targettype
IS THIS RIGHT APPROACH?
IF YES, HOW CAN I JOIN IT?
IF NO, WHICH IS THE BEST WAY?
PLEASE HELP ME…Thank you very much