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

col_business_units inconsistencies #6673

Open
ehuelsmann opened this issue Jul 26, 2022 · 0 comments
Open

col_business_units inconsistencies #6673

ehuelsmann opened this issue Jul 26, 2022 · 0 comments
Labels
type:housekeeping Refactoring or other code reorganizational work

Comments

@ehuelsmann
Copy link
Member

I'm working to reduce complexity from LedgerSMB::Report in order to be able to use it from our web services.
so far nothing new.
One of the calls that receives the $request object, is the "show_cols" function.
I'd like to remove that, for the somewhat obvious reason of "don't provide the full outer scope to the inner scope".
So, I'm looking at that code and much of it can be moved to instance construction time using a BUILDARGS method: what it does is scan the $request object for keys which start with col_. Well, that can be done at construction time too, because the entire request object is passed as arguments to the constructor.
So far so good.

then I had to investigate this specific bit of code: https://github.com/ledgersmb/LedgerSMB/blob/master/lib/LedgerSMB/Report.pm#L534-L536

the reason being that my replacement code does not handle this use-case, because it's not accessing the columns return value.

If I'm correct, that code adds all "business unit" columns to the report, if the selection option col_business_units has been selected.

All is well even this far. So, I search for report filter files which offer that option. I get:

12UI/Reports/filters/invoice_search.html: name = 'col_business_units'
UI/Reports/filters/invoice_outstanding.html: name = 'col_business_units'

Very well. So, I check which report may generate columns which match the query =~ /bc_/. There I'm stumped:

12$ grep -R bc_ lib/LedgerSMB/Report/
lib/LedgerSMB/Report/GL.pm: push @cols, {col_id => 'bc_' . $class->id,

it looks like the intersection of the two is the empty set, right?

@neilt neilt added the type:housekeeping Refactoring or other code reorganizational work label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:housekeeping Refactoring or other code reorganizational work
Projects
None yet
Development

No branches or pull requests

2 participants