Skip to content

Commit

Permalink
Merge branch 'dt-v22' into v22
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtauriello committed Jul 28, 2023
2 parents a9b3374 + 37ea48f commit 2aa14dd
Show file tree
Hide file tree
Showing 78 changed files with 218,715 additions and 138,674 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -14,12 +14,12 @@ env:
- PR_BR=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}

matrix:
#1 - BROKEN OR CHANGED
#1 - CHALLENGING
- INFILES='[{"file":"https://www.sec.gov/Archives/edgar/data/1649744/000164974421000017/dlth-20210502x10q_htm.xml", "xule_run_only":"DQC.US.0121.9580"},{"file":"https://www.sec.gov/Archives/edgar/data/842180/000084218021000019/bbva-20210630_htm.xml", "xule_run_only":"DQC.IFRS.0127.9596"},{"file":"http://www.sec.gov/Archives/edgar/data/1300938/000118518522000468/abcoenergy20211231_10k.htm", "xule_run_only":"DQC.US.0144.9866"},{"file":"http://www.sec.gov/Archives/edgar/data/1838431/000121390022020040/f10k2021_sciontechgr2.htm", "xule_run_only":"DQC.US.0144.9866"}]' EXFILES=$EXPECTED/DQC.US.0121.9580_dlth-us-2020.xml,$EXPECTED/DQC.IFRS.0127.9596_bbva-ifrs-2020.xml,$EXPECTED/DQC.US.0144.9866_abco-us-2022.xml,$EXPECTED/DQC.US.0144.9866_scio-us-2022.xml
#2 dqc_0015
#2 dqc_0015 and dqc_0080
- INFILES='[{"file":"./tests/input/testfiles/2023/TestCo-2023-NonNeg-WithNew.xml", "xule_run_only":"DQC.US.0015"},{"file":"./tests/input/testfiles/2022/TestCo-2022-NonNeg-WithNew.xml", "xule_run_only":"DQC.US.0015"}]' EXFILES=$EXPECTED/DQC.US.0015_testco_us-2023.xml,$EXPECTED/DQC.US.0015_testco_us-2022.xml
#3 v22 public exposure
- INFILES='[{"file":"http://www.sec.gov/Archives/edgar/data/1043894/000143774923018352/evtn20230331_10k.htm", "xule_run_only":"DQC.US.0088.9372"},{"file":"http://www.sec.gov/Archives/edgar/data/1557376/000182912623004245/organicellregen_10q.htm", "xule_run_only":"DQC.US.0088.9372"},{"file":"http://www.sec.gov/Archives/edgar/data/1546652/000121390023046769/f10q0423_vaneckmerk.htm", "xule_run_only":"DQC.US.0159.10081"},{"file":"http://www.sec.gov/Archives/edgar/data/825171/000160706223000281/hhhef123122form20f.htm", "xule_run_only":"DQC.IFRS.0159.10081"},{"file":"http://www.sec.gov/Archives/edgar/data/704562/000168316823004329/avid_i10k-043023.htm", "xule_run_only":"DQC.US.0161.10083"},{"file":"http://www.sec.gov/Archives/edgar/data/1690080/000121390023049728/ea179836-s1_180lifesci.htm", "xule_run_only":"DQC.US.0161.10083"},{"file":"http://www.sec.gov/Archives/edgar/data/1901056/000168316823003610/energie_10q-33123.htm", "xule_run_only":"DQC.US.0162.10084"},{"file":"http://www.sec.gov/Archives/edgar/data/1089113/000108911322000002/hsbc-20211231.htm", "xule_run_only":"DQC.IFRS.0162.10084"}]' EXFILES=$EXPECTED/DQC.US.0088.9372_EVTN_us-2023.xml,$EXPECTED/DQC.US.0088.9372_OCEL_us-2023.xml,$EXPECTED/DQC.US.0159.10081_VMRK_us-2023.xml,$EXPECTED/DQC.IFRS.0159.10081_HHHEF_ifrs-2022.xml,$EXPECTED/DQC.US.0161.10083_CDMO_us-2023.xml,$EXPECTED/DQC.US.0161.10083_ATNF_us-2023.xml,$EXPECTED/DQC.US.0162.10084_ENER_us-2022.xml,$EXPECTED/DQC.IFRS.0162.10084_HSBC_ifrs-2022.xml
- INFILES='[{"file":"http://www.sec.gov/Archives/edgar/data/1546652/000121390023046769/f10q0423_vaneckmerk.htm", "xule_run_only":"DQC.US.0159.10081"},{"file":"http://www.sec.gov/Archives/edgar/data/825171/000160706223000281/hhhef123122form20f.htm", "xule_run_only":"DQC.IFRS.0159.10081"},{"file":"http://www.sec.gov/Archives/edgar/data/704562/000168316823004329/avid_i10k-043023.htm", "xule_run_only":"DQC.US.0161.10083"},{"file":"http://www.sec.gov/Archives/edgar/data/1690080/000121390023049728/ea179836-s1_180lifesci.htm", "xule_run_only":"DQC.US.0161.10083"},{"file":"http://www.sec.gov/Archives/edgar/data/1901056/000168316823003610/energie_10q-33123.htm", "xule_run_only":"DQC.US.0162.10084"},{"file":"http://www.sec.gov/Archives/edgar/data/1089113/000108911322000002/hsbc-20211231.htm", "xule_run_only":"DQC.IFRS.0162.10084"}]' EXFILES=$EXPECTED/DQC.US.0159.10081_VMRK_us-2023.xml,$EXPECTED/DQC.IFRS.0159.10081_HHHEF_ifrs-2022.xml,$EXPECTED/DQC.US.0161.10083_CDMO_us-2023.xml,$EXPECTED/DQC.US.0161.10083_ATNF_us-2023.xml,$EXPECTED/DQC.US.0162.10084_ENER_us-2022.xml,$EXPECTED/DQC.IFRS.0162.10084_HSBC_ifrs-2022.xml
#4 v22 public exposure
- INFILES='[{"file":"http://www.sec.gov/Archives/edgar/data/1015383/000149315223021280/form10-k.htm", "xule_run_only":"DQC.US.0163.10085"},{"file":"http://www.sec.gov/Archives/edgar/data/107687/000010768723000015/wgo-20230527.htm", "xule_run_only":"DQC.US.0163.10085"},{"file":"http://www.sec.gov/Archives/edgar/data/1866550/000186655023000008/twks-20221231.htm", "xule_run_only":"DQC.US.0164.10086"},{"file":"http://www.sec.gov/Archives/edgar/data/1326801/000132680123000013/meta-20221231.htm", "xule_run_only":"DQC.US.0164.10086"},{"file":"http://www.sec.gov/Archives/edgar/data/1766363/000095017023005121/edr-20221231.htm", "xule_run_only":"DQC.US.0164.10087"},{"file":"http://www.sec.gov/Archives/edgar/data/78239/000007823923000091/pvh-20230430.htm", "xule_run_only":"DQC.US.0164.10087"},{"file":"http://www.sec.gov/Archives/edgar/data/1013880/000155837023002371/ttec-20221231x10k.htm", "xule_run_only":"DQC.US.0164.10088"},{"file":"http://www.sec.gov/Archives/edgar/data/822663/000175392623000213/g083417_10k.htm", "xule_run_only":"DQC.US.0164.10088"},{"file":"http://www.sec.gov/Archives/edgar/data/1090872/000109087222000026/a-20221031.htm", "xule_run_only":"DQC.US.0164.10089"},{"file":"http://www.sec.gov/Archives/edgar/data/1576940/000157694023000005/ccs-20221231x10k.htm", "xule_run_only":"DQC.US.0164.10089"},{"file":"http://www.sec.gov/Archives/edgar/data/1521332/000152133223000013/aptv-20221231.htm", "xule_run_only":"DQC.US.0164.10090"},{"file":"http://www.sec.gov/Archives/edgar/data/1604643/000160464322000124/aqua-20220930.htm", "xule_run_only":"DQC.US.0164.10090"}]' EXFILES=$EXPECTED/DQC.US.0163.10085_POWW_us-2023.xml,$EXPECTED/DQC.US.0163.10085_WGO_us-2023.xml,$EXPECTED/DQC.US.0164.10086_TWKS_us-2022.xml,$EXPECTED/DQC.US.0164.10086_META_us-2022.xml,$EXPECTED/DQC.US.0164.10087_EDR_us-2022.xml,$EXPECTED/DQC.US.0164.10087_PVH_us-2023.xml,$EXPECTED/DQC.US.0164.10088_TTEC_us-2022.xml,$EXPECTED/DQC.US.0164.10088_IPAR_us-2022.xml,$EXPECTED/DQC.US.0164.10089_AGIL_us-2022.xml,$EXPECTED/DQC.US.0164.10089_CCS_us-2022.xml,$EXPECTED/DQC.US.0164.10090_APTV_us-2022.xml,$EXPECTED/DQC.US.0164.10090_AQUA_us-2022.xml
#5 v22 new for existing rules
Expand Down
4 changes: 4 additions & 0 deletions docs/DQC_US_0009/DQC_0009.md
Expand Up @@ -24,6 +24,10 @@ Example - The value reported for the element **Defined Benefit Plan, Pension Pla

See file [DQC_0009_ListOfElements](DQC_0009_ListOfElements.xlsx?raw=true) for the elements tested by this rule. Elements are listed in order by the most commonly occurring errors.

### Logic for the rule
![Defined Benefit Plans Comparison](rule_0009_db_plans.svg?raw=true)
![Shares Comparison](rule_0009_shares.svg?raw=true)

## Problem solved by the rule

Filers incorrectly select elements and report incorrect values for certain elements. This is a problem for consumption because the data for the element will be extracted incorrectly for analysis. These rules can detect inappropriate element selection and incorrect values by comparing the values among pairs of elements that should have specific relationships. For example, some filers incorrectly use the element for unrepatriated foreign earnings instead of the element for the deferred tax liability on unrepatriated foreign earnings. This rule can detect the error by ensuring that the tagged value for unrepatriated foreign earnings is greater than the tagged value for the associated tax liability on those earnings.
Expand Down
100 changes: 100 additions & 0 deletions docs/DQC_US_0009/dqc_0009-DBPlans-flow.plantuml
@@ -0,0 +1,100 @@
@startuml rule_0009_db_plans
title "Rule DQC 0009 DB Plans Comparison"
!pragma useVerticalIf on
start

repeat : Go through each context in the filing;

split
:Run rule 0009.40;
:Get DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligations
InExcessOfPlanAssetsAggregateAccumulated
BenefitObligation;
:Get DefinedBenefitPlanAccumulatedBenefitObligation;
if (Are both values present?) then (yes)
if (DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligations
InExcessOfPlanAssetsAggregateAccumulated
BenefitObligation >
DefinedBenefitPlanAccumulatedBenefitObligation) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif
split again
:Run rule 0009.41;
:Get DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligationsIn
ExcessOfPlanAssetsAggregate
FairValueOfPlanAssets;
:Get DefinedBenefitPlanFairValueOfPlanAssets;
if (Are both values present?) then (yes)
if (DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligationsIn
ExcessOfPlanAssetsAggregate
FairValueOfPlanAssets >
DefinedBenefitPlanFairValueOfPlanAssets) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif
split again
:Run rule 0009.42;
:Get DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligations
InExcessOfPlanAssetsAggregate
ProjectedBenefitObligation;
:Get DefinedBenefitPlanBenefitObligation;
if (Are both values present?) then (yes)
if (DefinedBenefitPlanPensionPlans
WithAccumulatedBenefitObligations
InExcessOfPlanAssetsAggregate
ProjectedBenefitObligation >
DefinedBenefitPlanBenefitObligation) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

split again
:Run rule 0009.45;
:Get DefinedBenefitPlanExpectedFutureEmployer
ContributionsRemainderOfFiscalYear;
:Get DefinedBenefitPlanExpectedFutureEmployer
ContributionsCurrentFiscalYear;
if (Are both values present?) then (yes)
if ( DefinedBenefitPlanExpectedFutureEmployer
ContributionsRemainderOfFiscalYear >
DefinedBenefitPlanExpectedFutureEmployer
ContributionsCurrentFiscalYear) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

split again
:Run rule 0009.46;
:Get DefinedBenefitPlanAccumulatedBenefitObligation;
:Get DefinedBenefitPlanBenefitObligation;
if (Are both values present?) then (yes)
if (DefinedBenefitPlanAccumulatedBenefitObligation >
DefinedBenefitPlanBenefitObligation) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

end split

repeat while (Is there another context in the filing) is (yes)
->no;

end

@enduml
97 changes: 97 additions & 0 deletions docs/DQC_US_0009/dqc_0009-Shares-flow.plantuml
@@ -0,0 +1,97 @@
@startuml rule_0009_shares
title "Rule DQC 0009 Shares Comparison"
!pragma useVerticalIf on
start

repeat : Go through each context in the filing;

split
:Run rule 0009.15;
:Get CommonStockSharesOutstanding;
:Get CommonStockSharesAuthorized;
if (Are both values present?) then (yes)
if (CommonStockSharesOutstanding >
CommonStockSharesAuthorized) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif
split again
:Run rule 0009.19;
:Get PreferredStockSharesOutstanding;
:Get CommonStockSharesAuthorized;
if (Are both values present?) then (yes)
if (PreferredStockSharesOutstanding >
PreferredStockSharesIssued) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif
split again
:Run rule 0009.21;
if (exists any StockIssuedDuringPeriodSharesStockSplits,
StockIssuedDuringPeriodSharesReverseStockSplits,
StockholdersEquityNoteStockSplitConversionRatio1) then (yes)
else (no)
:Get CommonStockSharesIssued;
:Get CommonStockSharesAuthorized;
if (Are both values present?) then (yes)
if (CommonStockSharesIssued >
CommonStockSharesAuthorized) then (yes)
#tomato:Show error;
else (no)


endif
else (no)
endif
endif
split again
:Run rule 0009.22;
:Get PreferredStockSharesIssued;
:Get PreferredStockSharesAuthorized;
if (Are both values present?) then (yes)
if (PreferredStockSharesIssued >
PreferredStockSharesAuthorized) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

split again
:Run rule 0009.23;
:Get PreferredStockSharesOutstanding;
:Get PreferredStockSharesAuthorized;
if (Are both values present?) then (yes)
if (PreferredStockSharesOutstanding >
PreferredStockSharesAuthorized) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

split again
:Run rule 0009.24;
:Get CommonStockSharesOutstanding;
:Get CommonStockSharesIssued;
if (Are both values present?) then (yes)
if (CommonStockSharesOutstanding >
CommonStockSharesIssued) then (yes)
#tomato:Show error;
else (no)
endif
else (no)
endif

end split

repeat while (Is there another context in the filing) is (yes)
->no;

end

@enduml
110 changes: 110 additions & 0 deletions docs/DQC_US_0009/rule_0009_db_plans.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions docs/DQC_US_0009/rule_0009_shares.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/DQC_US_0088/DQC_0088.md
@@ -1,8 +1,8 @@
# Operating Lease Cost And Expense
Rule ID: DQC_0088
Status: Public Exposure July 15 - August 31, 2023 - provide comment at https://xbrl.us/public-review
Release date: TBD
Effective date: TBD
Status: Removed from Review July 2023
Release date: N/A
Effective date: N/A

## Rule function
This rule identifies 10-K, 10-K/A and 20-F filings where the filer has reported the operating lease expense but not the operating lease cost.
Expand Down
4 changes: 4 additions & 0 deletions docs/DQC_US_0117/DQC_0117.md
Expand Up @@ -47,6 +47,10 @@ A second exception condition to address the FASB guidance is as follows:
1. The calculation represented for Revenues includes Revenue Excluding Tax or Including Tax and at least one other element.
1. If all these conditions are met the the rule will not fire for the elements RevenueFromContractWithCustomerExcludingAssessedTax or RevenueFromContractWithCustomerIncludingAssessedTax.

### Logic for this rule
![DQC 0117.9574](rule_0117_9574.svg?raw=true)
![DQC 0117.10093](rule_0117_10093.svg?raw=true)

## Problem solved by the rule
The intent of the rule is to check that the filer has calculated cross dimensional values correctly. Errors will typically occur for the following reasons:

Expand Down
98 changes: 98 additions & 0 deletions docs/DQC_US_0117/dqc_0117-10093-flow.plantuml
@@ -0,0 +1,98 @@
@startuml rule_0117_10093
title "Rule DQC 117.10093"
!pragma useVerticalIf on
start

repeat : Get next statement hypercube in the filing;

: Get a list of the dimensions on the statement hypercube;
while (Is there a dmension left to process on the hypercube) is (yes)

:Read list of target dimensions;
note left
StatementClassOfStockAxis
ProductOrServiceAxis
PropertyPlantAndEquipmentByTypeAxis
LongtermDebtTypeAxis
RelatedPartyTransactionsByRelatedPartyAxis
StatementBusinessSegmentsAxis
LimitedPartnersCapitalAccountByClassAxis
PartnerTypeOfPartnersCapitalAccountAxis
FiniteLivedIntangibleAssetsByMajorClassAxis
FinancialInstrumentAxis
InformationByCategoryOfDebtSecurityAxis'
end note
if (Is the dimension a target dimension to be calculated?) then (yes)


:Identify if facts in the cube
have 2 dimensions
including the target dimension;
if (facts with 2 dimensions including the target dimension exist) then (yes)
: Get Members of the Target Dimension;
while (is there a member on the target dimension) is (yes)
:Get facts in hypercube with the member of target Dimension;
:Put all the facts with the member in a list;
:Get the other dimension from the list
(not the target dimension);
:Get facts from hypercube with both the target
dimension and the dimension member identified
above that have 3 dimension members;
group SubTotal_Exists
:Identify if facts in the cube
have 3 or more dimensions
including the target dimension;
if (facts with 3 dimensions exist) then (yes)

:Identify if there a subtotal for the target
dimension member which
has two dimensions?;
if (Does SubTotal Exist?) then (yes)
: SubTotalExists is set to true;
else (no)
: SubTotalExists is set to false;
endif
else (no)
: SubTotalExists is set to true;
endif

end group
backward: Get next
member;
end while (no)


if (Does Subtotal for multi facts equal true) then (yes)
:Get the member facts using the
members and domain values;
if (Were facts present?) then (yes)
:Sum the member facts;
:Get the minimum decimals of the facts;
:Create message line for each fact;
:Get the fact representing the total of
the target dimension of the concept with one
dimension with durations that match the
document period and all instant concepts.;
if (Is the sum of members not equal to TotalDefault?) then (yes)
:Produce standard error message;
:See rule message.;
else (no)
endif
else (no)
endif
else (no)
endif
else (no)

endif

else (no)
endif
backward: Get next dimension;
endwhile (no)
repeat while (Is there another hypercube in the filing) is (yes)
->no;

end

@enduml

0 comments on commit 2aa14dd

Please sign in to comment.