multiple ids table for accounting schema

I am trying to make a small accounting db and I have hit a dead end, my search bared no results as of how to make this idea work. what is the idea? In the picture below you can see it. My idea is to link multiple tables to one table CreditDebit in this case, so I can use its id to know which side is which instead of making multiple Bond tables. now what I have reached to is that in CreditDebit I will have multiple NULL values, also I wouldn’t be able to know which table is which. A creditor\debtor could be anything (safebox, employee, customer, …etc.) fastDrawing