Account receivable rule engine


Some business needs (often by law) to manage (aka reconcile) the receivables using specific rules no matter what the customer is telling to be paying. For example the syndicate of co-ownership which has to pay first the work cost before the advances or insurance companies that must allocate to the older insurance premium.


The amount received per customer are booked on a temporary account at reception (like from statement).
The user defines for such account the rules to assign the balance of each party. The rules define the order from which the move lines must be paid / reconciled and the accounts to pay.
By default we have two types of order:

  • the maturity date (ascending or descending)
  • the account (index in a list)

The rules must also define what to do when the balance in the account is lower than the next line to pay. There is two options: leave it or make a reconciliation with a delegate to the remaining.

Also the rules may have an overflow account to which the extra receivable amount (when customer pay too much and there is no receivable amount in the system).

If account dunning is activated, the rules must ignore the lines with a blocked dunning.

Theoretically such engine could also work for payable but I do not think there are use cases.