Comment by zie
One can do this with budget codes, instead of via accounts. Where you can add essentially unlimited extra information into any transaction. Many western governments use this method.
An example from the London School of Economics, in PDF: https://info.lse.ac.uk/staff/divisions/Finance-Division/asse...