[e][e]Money
Data types. Use integers, don't use floating points or decimals; to make this clear call the column "amount_pence", or "amount_cents". Also, I think it's best to use negative numbers for debits and positive numbers for credits, rather than the significance being dependent on another column.
Accounting for revenue. Say you have a stream of debits and credits against an account, and the debits are of different types, so you want to break down the credit according to what it's paying for. The simplest way is this: stack all the debits end-to-end to get total debit, and likewise with the credits, then put the two stacks side by side: you can say which debit a given credit is paying for by seeing which debits it overlaps with.
You need an algorithm for getting the extent of overlap between two ranges, viz: overlap = (end1 - start1) - greatest(end1 - end2,0) - greatest(start2 - start1,0).