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

Business/Reporting Units in Trial Balance Report not working #8381

Open
aungzwin10 opened this issue Aug 22, 2024 · 1 comment
Open

Business/Reporting Units in Trial Balance Report not working #8381

aungzwin10 opened this issue Aug 22, 2024 · 1 comment
Labels
waiting-for-user Issue can't progress unless feedback from reporter is received

Comments

@aungzwin10
Copy link
Member

Version

1.11.16

What browsers are you seeing the problem on?

This problem isn't browser related

What happened?

Screenshot 2024-08-22 at 5 45 52 PM

When filtering the Trial Balance report with business/reporting unit(s), the data never come out.

What should have happened?

The business/reporting unit(s) filter should work as in income statement.

@ehuelsmann
Copy link
Member

Are you sure there is data? I see

WITH RECURSIVE bu_tree (id, path) AS (
SELECT id, id::text AS path
FROM business_unit
WHERE parent_id = any(in_business_units)
UNION
SELECT bu.id, bu_tree.path || ',' || bu.id
FROM business_unit bu
JOIN bu_tree ON bu_tree.id = bu.parent_id
)
SELECT ac.transdate, ac.amount_bc, ac.chart_id
FROM (select * from acc_trans
where in_business_units = '{}' OR in_business_units IS NULL
OR EXISTS (
select 1 from business_unit_ac buac
join bu_tree on bu_tree.id = buac.bu_id
where buac.entry_id = acc_trans.entry_id
)) ac

which is the heart of the data retrieval for this function. you could try running that to see if there is data in the system.

@ehuelsmann ehuelsmann added the waiting-for-user Issue can't progress unless feedback from reporter is received label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user Issue can't progress unless feedback from reporter is received
Projects
None yet
Development

No branches or pull requests

2 participants