-
Notifications
You must be signed in to change notification settings - Fork 283
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
Added validations DBA.FR74a and DBA.FR74b and related conformance tests. #1308
base: master
Are you sure you want to change the base?
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
elif fact.qname == pluginData.liabilitiesOtherThanProvisionsQn and fact.unit.value == DANISH_CURRENCY: | ||
liabilityOtherFact = fact | ||
if equityFact is not None and liabilityFact is not None and provisionFact is not None: | ||
if cast(float, liabilityFact.xValue) - cast(float, equityFact.xValue) < cast(float, provisionFact.xValue) - ROUNDING_MARGIN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe without xValue >= VALID
? (Here or elsewhere in the plugin.)
elif fact.qname == pluginData.liabilitiesOtherThanProvisionsQn and fact.unit.value == DANISH_CURRENCY: | ||
liabilityOtherFact = fact | ||
if equityFact is not None and liabilityFact is not None and provisionFact is not None: | ||
if cast(float, liabilityFact.xValue) - cast(float, equityFact.xValue) < cast(float, provisionFact.xValue) - ROUNDING_MARGIN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these actually xs:float
, or would decimal.Decimal
be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These xValues are actually floats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LiabilitiesAndEquity
concept is xbrli:monetaryItemType
, which extends xs:decimal
. I believe this logic should be producing decimal.Decimal
. When I run fr74a-invalid.xbrl
, I see <class 'decimal.Decimal'>
for type(liabilityFact.xValue)
, not <class 'float'>
, so cast(float)
seems wrong.
NAMESPACE_CMN = 'http://xbrl.dcca.dk/cmn' | ||
NAMESPACE_FSA = 'http://xbrl.dcca.dk/fsa' | ||
NAMESPACE_GSD = 'http://xbrl.dcca.dk/gsd' | ||
NAMESPACE_SOB = 'http://xbrl.dcca.dk/sob' | ||
ROUNDING_MARGIN = 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, where does this value come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This came from the validation spreadsheet: "There is an option to deviate by DKK 1000 in connection with any roundings"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a constant rather than an option.
Reason for change
Description of change
Added validations and conformance tests.
Steps to Test
review:
@Arelle/arelle