Accounting on custom tables