The account_statement_rule
is a nice module which takes a lot of work out of our hands. But IMO there can be another improvement to the module.
The module walks through a list of rules, checks them and if the rule applies, it gives the statement line back with an amount. When no rule applies, no statement line is added.
The improvement will be twofold:
- Based on the rule, statement lines are created with a certain amount. It is not required that the statement line should have the total amount, so multiple statement lines can be created. This is the normal behavior. The module however should check the pending amount and if it’s ‘0’, it should stop checking the other rules as they don’t make any sense anymore. This makes it possible to have more rules which is not necessarily needed because you can create multiple statement lines from one rule.
- When point 1. is working, default rule(s) can be created. Those rules are the last ones to be checked and basically are always ‘True’ so statement lines are always created. In my case I want to have two default rules, one for payment (creditor) and one for receiving (debitor) because both are always going to the default accounts and I get most of this kind of statement lines.
The whole idea is like the firewall. A set of rules which are checked from top to bottom and when one fits, the packet is allowed. At the end there is the default deny rule.
Any thoughts on this?