-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering positive/negative account balances #86
Comments
Ah, the creativity of administrations is without limits :) To be sure I understand, it could then mean that line 551 could appear on both sides, eg if 551001 has a positive balance and 551002 has a negative one? |
Yeah, exactly. |
So weird. I'm thinking to solve this with Let me think about it during the coming days. |
OK, thanks. |
Yet that is really weird. Because normally the administration is not interested in how accounts are organized below a certain level, so companies are free to add low level accounts as they please. This somehow exposes that fine structure to the administration. |
Use case
In Spain, we have several sections in the Balance Sheet that includes the sum of balances that are greater than 0 in one side, and the opposite in the other side. They are for example the accounts 551. But the balance is not taken as a whole, but account per account. Example:
So putting the expression
(bale[551%] if bale[551%] > 0)
doesn't work, and you can't define the expression if a fixed way like(bale[551001] if bale[551001] > 0) + (bale[551002] if bale[551002] > 0) + ...
because there are infinite accounts: you have 551001, 551002, but also 5510001, 5510002... (with 7 digits), and so on.Proposed solution
Add an account expansion mechanism at expression level. This can be an optional fifth letter in the expressions (for example,
a
). If included, mis_builder will switch the expression before passing it to the "SQL parsing" for making the expansion by account. Example: if you put the expression+(balea[551%] if balea[551%] > 0)
, it searches on the system the account selector, and unfolds the expression with the result:and then continues the normal pipe
I don't know enough yet the mis_builder code, but maybe with a little guidance I can implement it.
The text was updated successfully, but these errors were encountered: