Skip to content
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

Add a reversed flag to the posting_journal and general_ledger #7904

Open
jniles opened this issue Nov 30, 2024 · 0 comments
Open

Add a reversed flag to the posting_journal and general_ledger #7904

jniles opened this issue Nov 30, 2024 · 0 comments
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Nov 30, 2024

Based on this comment: https://github.com/Third-Culture-Software/bhima/pull/7900/files#r1863945522
Some of our reports rely on filtering out transactions that have been reversed. To do that, we often need to JOIN the voucher, cash, and invoice tables with additional date filtering and check their reversed fields. Here are some examples:

  1. Configurable Analysis Report:
    a. https://github.com/Third-Culture-Software/bhima/blob/master/server/controllers/finance/reports/configurable_analysis_report/index.js#L206
    b. https://github.com/Third-Culture-Software/bhima/blob/master/server/controllers/finance/reports/configurable_analysis_report/index.js#L231
  2. Auxiliary Cashbox Report:
    a. https://github.com/Third-Culture-Software/bhima/blob/master/server/controllers/finance/reports/analysis_auxiliary_cashboxes/index.js#L118

We might consider adding the reversed flag to the posting_journal and general_ledger that will limit the JOINs from the journal. It would need to be updated when credit notes/reversals are created and deleted.

I think this issue is relatively low priority since there are only two instances in the codebase, but it is something to keep in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant