I recall seeing a lot of posts discussing aged debtors and they refer to having a Table to hold the relationship between transactions.
If you want a true Aged Debtors you need the facility to allocate Payments to Charges.
This can be a little complicated but is achievable.
You need to cater for Payments that part pay one invoice and or more then one invoice.
If you do a search on the forum you should find a few references to this.
Your link would be the Invoice ID so an invoice in January part paid in April will show just the balance due for January and not the full Invoice in January and the payment in April.
All Drs will have a Invoice ID and a Customer ID
All Crs will have a Credit ID and a Customer ID
You show all these records in your Transactions table - fine and they differ by TransactionType and ContractorID.
The additional Table, say Allocations, will hold at least one record for each Payment (TransactionType) and have fileds to hold the data of TransactionID and PayAmount and the net effect will need to be zero ie 1,000 Payment must be allocated to one or more Invoices and the sum of the allocated amounts = 1,000
You could build a form to force this issue when entering a payment.
Your query will then collect the Invoice data and Allocated repayments and return just the underpaid or overpaid invoices to be records for your aged report. Use the Invoice Date and you have the age of the debt.
Date of Payment not really an issue unless you have Unallocated Payments.
Trust this make sence. I haven't used an allocation table as our business doesn't have invoices but there is a lot of reference to this in the forum.
