Accounting Entries logic for Documents