Transaction
The Transaction object is the one that does all the work in Boox.
To create a Transaction, call its constructor which takes six arguments:
- the Clerk creating it
- the Journal
- a Money representing the amount and Currency of the transaction.
- the Account to be credited;
- the Account to be debited;
- a note, which is a String.
You can then call its post() method, which returns a long, the TransactionID of the transaction if the posting was successful, or -1 if it failed. The usual reason for a transaction to fail is that the Clerk doesn't have the right Permission for the accounts in question; you can test beforehand by calling the checkPostable() method, which returns a boolean.
Reversing a Transaction
Once a Transaction has been posted, it's committed to the ledgers and can't be unposted. However, you can call its reverse() method which returns an equal and opposite Transaction, which when posted will undo the effects of the original posting but not erase all traces.





