Ledger

Extra updates to prevent chance of double applying payments in some circumstances