/accounting

Transactional accounting core for financial transactions.

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

The code implements a Double-entry bookkeeping service using Spring 4, the Java Transaction API and the H2 database in embedded mode.

"Double-entry bookkeeping involves making at least two entries or legs for every transaction.
A debit in one account and a corresponding credit in another account.
The sum of all debits should always equal the sum of all credits, providing a simple way to check for errors." 
 
Business Rules
---------------
1. An account MUST NOT be overdrawn, i.e. have a negative balance.
2. A monetary transaction MAY support multiple currencies as long as the total balance for the transaction legs with the same currency is zero.
3. The concepts of debit and credit are simplified by specifying that monetary transactions towards an account can have either a positive or negative value.