-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix custom line item parse errors in statement of activities #83
Comments
@kwheelan Hi. Could you explain what this feature should do? what examples are there that I can use to test and work on this? |
@kwheelan will do |
@lucakato Just added detail in the description. Please create a new branch, and when you're ready for me to take a look, create a pull request for this issue's branch into |
@kwheelan do you know which files you tested for the no concept tag issue? when I first tried it just with Ogemaw excel file the concept showed for the same number as yours. I still modified the python code for handling white space and would like to test it. Or did you change on the Excel side? |
@lucakato I used the Ogemaw file you sent me a few weeks ago (updated_ACFR_Ogemaw_template (2).xlsx), but maybe Sarrah uploaded a more recent template since? Which one did you test here? |
@kwheelan I used the same ogemaw file, with the random number that was causing issues removed. |
@lucakato Weird. Using your version of the file I can see the concept for the first row but the same issue persists lower in the table: |
@kwheelan ok I will look into it. Inspecting the html file it looks like this for that part: which seems correct(?). I also see it in the Lookup table. Do you think it's some other issue? |
Sorry I missed this comment earlier. Seems like there are 2 issues. The first is that this tag should actually be
I think the second issue is that General Government Administration doesn't seem to be in the ACFR taxonomy (found on YETI.) This would explain why the concepts aren't showing in the viewer. I'm going on vacation for the next week, but hopefully this gives you enough info to keep working on it. Marc may also be able to help confirm if the General Government Administration tags are in the taxonomy. |
@kwheelan thanks for the comment I didn't realize it should have been expenses! I'll look into it. |
@kwheelan @nfitz1 What happens with the code is it sees the column 'Expenses' and then it runs this line in statement_of_activites.py and assigns the first tag for the xbrl_tag. if len(xbrl_list) == 1 or col_name == "expenses":
# first tag in list from relevant cell in column A in the excel sheet
xbrl_tag = xbrl_list[0] |
@lucakato You're right; the order is wrong on all the non-custom XBRL tags in that column. We do want to include So we just need to change the Excel function in column A for the Statement of Activities for rows 9+ to:
(Basically just switch I'm skeptical that this will fix all the parsing errors, but it should be a good start. Let me know how it works |
@kwheelan |
@lucakato Yes the order looks right in that cell (assuming the part of the cell that's not visible is the full expenses tag). But I think this only fixes part of the issue. The second issue is that General Government Administration doesn't seem to be in the ACFR taxonomy (found on YETI). This would explain why the concepts aren't showing in the viewer. The concepts ( We'll want to update the Statement of Activities lookup table in Excel to match the tag we decide on here. |
@joffemd Here are the templates I use for your reference. Thank you. |
@lucakato I will send this to my contact in India and ask him to create templates for two other cities so that we can do further testing... Also, sorry, after reading your email and this thread, I see that you are seeking an input from me. I may not be able to answer ahead of vacation and apologize for the inconvenience. For now, please use acfr:ExpensesForGeneralGovernmentServices as Katrina recommends. |
Overview
The custom line items should parse into well-formed inline XBRL, which should then show correctly in the interactive viewer. However, there are some issues with the custom line items (and some issues that also occur with non-custom items).
Well-formed iXBRL for a cell in the Statement of Activities table will look something like this:
And show the dimensions, concept (XBRL tag), and properties in the viewer:
Problem 1: no concept (tag)
Some of the line items don't show a concept:
This is because the concept (ixbrl tag) should be stored in the name attribute, and something is going wrong in the conversion, putting
nan
in there:There's also a date parse error, but I'll separate that into a different issue (#85).
Problem 2: not recognizing the ixbrl tag at all
I think this issue is because there is a space before the name attribute. It should be
name="acfr:RevenueForOtherProgramsCustom"
instead ofname=" acfr:RevenueForOtherProgramsCustom"
.Solutions
To fix the second type of issue I think there are 2 options:
1. Excel fix
Edit the formulas in the Excel sheet to remove the spaces between the XBRL tags when the user identifies a custom tag. Right now, the custom tags aren't consistent with the normal ones:
The Excel formula is:
We can fix the issue by editing
"acfr:ExpensesCustom, acfr:RevenueForOtherProgramsCustom, acfr:NetExpenseRevenueCustom"
to"acfr:ExpensesCustom,acfr:RevenueForOtherProgramsCustom,acfr:NetExpenseRevenueCustom"
2. Python fix
Editing all the Excel formulas might be a bit tedious, so instead you could edit
process-xbrl/app/models/statment_of_activities.py
Line 49 in 37d0b25
','
and also where it is,
.Fixing the no-concept issue
I have less guidance on the no concept issue. The
nan
in the name attribute is likely coming from incorrect data parsing when creatingCell
objects in theprocess_cells()
method for theStatementofActivities
class.process-xbrl/app/models/statment_of_activities.py
Lines 23 to 72 in 37d0b25
If you can't get anywhere troubleshooting this, I'm happy to take a closer look.
The text was updated successfully, but these errors were encountered: