arelle-release 2.37.46__py3-none-any.whl → 2.38.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. arelle/BetaFeatures.py +0 -21
  2. arelle/Cntlr.py +15 -8
  3. arelle/CntlrCmdLine.py +121 -56
  4. arelle/CntlrWinMain.py +143 -70
  5. arelle/DialogFind.py +1 -1
  6. arelle/DialogPluginManager.py +6 -4
  7. arelle/DisclosureSystem.py +7 -0
  8. arelle/ErrorManager.py +21 -6
  9. arelle/FileSource.py +11 -4
  10. arelle/FunctionIxt.py +16 -11
  11. arelle/HtmlUtil.py +5 -4
  12. arelle/LeiUtil.py +63 -43
  13. arelle/ModelDocument.py +20 -15
  14. arelle/ModelDtsObject.py +8 -0
  15. arelle/ModelInstanceObject.py +1 -1
  16. arelle/ModelObject.py +16 -18
  17. arelle/ModelObjectFactory.py +35 -17
  18. arelle/ModelXbrl.py +28 -11
  19. arelle/PluginManager.py +130 -105
  20. arelle/RuntimeOptions.py +1 -0
  21. arelle/UrlUtil.py +14 -0
  22. arelle/Validate.py +17 -12
  23. arelle/ValidateDuplicateFacts.py +3 -1
  24. arelle/ValidateFileSource.py +38 -0
  25. arelle/ValidateFilingText.py +3 -3
  26. arelle/ValidateXbrl.py +5 -2
  27. arelle/ValidateXbrlCalcs.py +210 -186
  28. arelle/ValidateXbrlDTS.py +1 -1
  29. arelle/ViewFile.py +1 -0
  30. arelle/ViewFileFactTable.py +2 -2
  31. arelle/ViewWinDTS.py +4 -1
  32. arelle/WebCache.py +28 -24
  33. arelle/XbrlConst.py +22 -0
  34. arelle/XmlUtil.py +16 -21
  35. arelle/XmlValidate.py +6 -9
  36. arelle/_version.py +16 -3
  37. arelle/api/Session.py +11 -2
  38. arelle/config/disclosuresystems.xsd +2 -0
  39. arelle/config/rosettaEntitlements.plist +8 -0
  40. arelle/conformance/CSVTestcaseLoader.py +1 -1
  41. arelle/formula/XPathContext.py +3 -3
  42. arelle/logging/formatters/LogFormatter.py +3 -1
  43. arelle/packages/report/ReportPackage.py +26 -13
  44. arelle/packages/report/ReportPackageConst.py +0 -1
  45. arelle/plugin/inlineXbrlDocumentSet.py +19 -5
  46. arelle/plugin/validate/DBA/DisclosureSystems.py +19 -1
  47. arelle/plugin/validate/DBA/PluginValidationDataExtension.py +2 -4
  48. arelle/plugin/validate/DBA/ValidationPluginExtension.py +2 -1
  49. arelle/plugin/validate/DBA/resources/config.xml +5 -0
  50. arelle/plugin/validate/DBA/rules/__init__.py +2 -2
  51. arelle/plugin/validate/DBA/rules/fr.py +19 -2
  52. arelle/plugin/validate/DBA/rules/tc.py +2 -0
  53. arelle/plugin/validate/DBA/rules/th.py +6 -0
  54. arelle/plugin/validate/DBA/rules/tm.py +18 -5
  55. arelle/plugin/validate/DBA/rules/tr.py +11 -5
  56. arelle/plugin/validate/EDINET/Constants.py +193 -9
  57. arelle/plugin/validate/EDINET/ContextRequirement.py +58 -0
  58. arelle/plugin/validate/EDINET/ControllerPluginData.py +220 -1
  59. arelle/plugin/validate/EDINET/CoverItemRequirements.py +42 -0
  60. arelle/plugin/validate/EDINET/DeiRequirements.py +118 -0
  61. arelle/plugin/validate/EDINET/FilingFormat.py +275 -0
  62. arelle/plugin/validate/EDINET/FormType.py +134 -0
  63. arelle/plugin/validate/EDINET/ManifestInstance.py +72 -5
  64. arelle/plugin/validate/EDINET/NamespaceConfig.py +50 -0
  65. arelle/plugin/validate/EDINET/PluginValidationDataExtension.py +493 -132
  66. arelle/plugin/validate/EDINET/{InstanceType.py → ReportFolderType.py} +72 -15
  67. arelle/plugin/validate/EDINET/Statement.py +139 -0
  68. arelle/plugin/validate/EDINET/TableOfContentsBuilder.py +595 -0
  69. arelle/plugin/validate/EDINET/UploadContents.py +48 -0
  70. arelle/plugin/validate/EDINET/ValidationPluginExtension.py +20 -2
  71. arelle/plugin/validate/EDINET/__init__.py +31 -6
  72. arelle/plugin/validate/EDINET/resources/config.xml +8 -1
  73. arelle/plugin/validate/EDINET/resources/cover-item-requirements.json +793 -0
  74. arelle/plugin/validate/EDINET/resources/dei-requirements.csv +27 -0
  75. arelle/plugin/validate/EDINET/resources/edinet-taxonomies.xml +2 -0
  76. arelle/plugin/validate/EDINET/rules/contexts.py +375 -14
  77. arelle/plugin/validate/EDINET/rules/edinet.py +1934 -45
  78. arelle/plugin/validate/EDINET/rules/frta.py +122 -3
  79. arelle/plugin/validate/EDINET/rules/gfm.py +1907 -11
  80. arelle/plugin/validate/EDINET/rules/upload.py +989 -141
  81. arelle/plugin/validate/ESEF/Const.py +3 -1
  82. arelle/plugin/validate/ESEF/ESEF_2021/DTS.py +5 -0
  83. arelle/plugin/validate/ESEF/ESEF_2021/Image.py +2 -2
  84. arelle/plugin/validate/ESEF/ESEF_2021/ValidateXbrlFinally.py +23 -20
  85. arelle/plugin/validate/ESEF/ESEF_Current/DTS.py +47 -14
  86. arelle/plugin/validate/ESEF/ESEF_Current/ValidateXbrlFinally.py +100 -25
  87. arelle/plugin/validate/ESEF/__init__.py +20 -6
  88. arelle/plugin/validate/ESEF/resources/authority-validations.json +76 -9
  89. arelle/plugin/validate/ESEF/resources/config.xml +20 -0
  90. arelle/plugin/validate/NL/DisclosureSystems.py +22 -0
  91. arelle/plugin/validate/NL/PluginValidationDataExtension.py +27 -9
  92. arelle/plugin/validate/NL/ValidationPluginExtension.py +51 -7
  93. arelle/plugin/validate/NL/resources/config.xml +18 -0
  94. arelle/plugin/validate/NL/rules/br_kvk.py +17 -61
  95. arelle/plugin/validate/NL/rules/fg_nl.py +7 -38
  96. arelle/plugin/validate/NL/rules/fr_kvk.py +7 -42
  97. arelle/plugin/validate/NL/rules/fr_nl.py +31 -147
  98. arelle/plugin/validate/NL/rules/nl_kvk.py +142 -28
  99. arelle/plugin/validate/ROS/PluginValidationDataExtension.py +2 -0
  100. arelle/plugin/validate/ROS/ValidationPluginExtension.py +4 -1
  101. arelle/plugin/validate/ROS/rules/ros.py +41 -9
  102. arelle/plugin/validate/UK/ValidateUK.py +130 -66
  103. arelle/plugin/validate/UK/__init__.py +89 -103
  104. arelle/utils/EntryPointDetection.py +79 -13
  105. arelle/utils/PluginHooks.py +125 -0
  106. arelle/utils/validate/ESEFImage.py +6 -6
  107. arelle/utils/validate/Validation.py +18 -0
  108. arelle/utils/validate/ValidationPlugin.py +76 -11
  109. arelle/utils/validate/ValidationUtil.py +35 -3
  110. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/METADATA +30 -20
  111. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/RECORD +115 -191
  112. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/licenses/LICENSE.md +0 -3
  113. arelle/archive/CustomLogger.py +0 -43
  114. arelle/archive/LoadEFMvalidate.py +0 -32
  115. arelle/archive/LoadSavePreLbCsv.py +0 -26
  116. arelle/archive/LoadValidate.cs +0 -31
  117. arelle/archive/LoadValidate.py +0 -36
  118. arelle/archive/LoadValidateCmdLine.java +0 -69
  119. arelle/archive/LoadValidatePostedZip.java +0 -57
  120. arelle/archive/LoadValidateWebService.java +0 -34
  121. arelle/archive/SaveTableToExelle.py +0 -140
  122. arelle/archive/TR3toTR4.py +0 -88
  123. arelle/archive/plugin/ESEF_2022/__init__.py +0 -47
  124. arelle/archive/plugin/bigInstance.py +0 -394
  125. arelle/archive/plugin/cmdWebServerExtension.py +0 -43
  126. arelle/archive/plugin/crashTest.py +0 -38
  127. arelle/archive/plugin/functionsXmlCreation.py +0 -106
  128. arelle/archive/plugin/hello_i18n.pot +0 -26
  129. arelle/archive/plugin/hello_i18n.py +0 -32
  130. arelle/archive/plugin/importTestChild1.py +0 -21
  131. arelle/archive/plugin/importTestChild2.py +0 -22
  132. arelle/archive/plugin/importTestGrandchild1.py +0 -21
  133. arelle/archive/plugin/importTestGrandchild2.py +0 -21
  134. arelle/archive/plugin/importTestImported1.py +0 -23
  135. arelle/archive/plugin/importTestImported11.py +0 -22
  136. arelle/archive/plugin/importTestParent.py +0 -48
  137. arelle/archive/plugin/instanceInfo.py +0 -306
  138. arelle/archive/plugin/loadFromOIM-2018.py +0 -1282
  139. arelle/archive/plugin/locale/fr/LC_MESSAGES/hello_i18n.po +0 -25
  140. arelle/archive/plugin/objectmaker.py +0 -285
  141. arelle/archive/plugin/packagedImportTest/__init__.py +0 -47
  142. arelle/archive/plugin/packagedImportTest/importTestChild1.py +0 -21
  143. arelle/archive/plugin/packagedImportTest/importTestChild2.py +0 -22
  144. arelle/archive/plugin/packagedImportTest/importTestGrandchild1.py +0 -21
  145. arelle/archive/plugin/packagedImportTest/importTestGrandchild2.py +0 -21
  146. arelle/archive/plugin/packagedImportTest/importTestImported1.py +0 -24
  147. arelle/archive/plugin/packagedImportTest/importTestImported11.py +0 -21
  148. arelle/archive/plugin/packagedImportTest/subdir/importTestImported111.py +0 -21
  149. arelle/archive/plugin/packagedImportTest/subdir/subsubdir/importTestImported1111.py +0 -21
  150. arelle/archive/plugin/sakaCalendar.py +0 -215
  151. arelle/archive/plugin/saveInstanceInfoset.py +0 -121
  152. arelle/archive/plugin/sphinx/FormulaGenerator.py +0 -823
  153. arelle/archive/plugin/sphinx/SphinxContext.py +0 -404
  154. arelle/archive/plugin/sphinx/SphinxEvaluator.py +0 -783
  155. arelle/archive/plugin/sphinx/SphinxMethods.py +0 -1287
  156. arelle/archive/plugin/sphinx/SphinxParser.py +0 -1093
  157. arelle/archive/plugin/sphinx/SphinxValidator.py +0 -163
  158. arelle/archive/plugin/sphinx/US-GAAP Ratios Example.xsr +0 -52
  159. arelle/archive/plugin/sphinx/__init__.py +0 -285
  160. arelle/archive/plugin/streamingExtensions.py +0 -335
  161. arelle/archive/plugin/updateTableLB.py +0 -242
  162. arelle/archive/plugin/validate/SBRnl/CustomLoader.py +0 -19
  163. arelle/archive/plugin/validate/SBRnl/DTS.py +0 -305
  164. arelle/archive/plugin/validate/SBRnl/Dimensions.py +0 -357
  165. arelle/archive/plugin/validate/SBRnl/Document.py +0 -799
  166. arelle/archive/plugin/validate/SBRnl/Filing.py +0 -467
  167. arelle/archive/plugin/validate/SBRnl/__init__.py +0 -75
  168. arelle/archive/plugin/validate/SBRnl/config.xml +0 -26
  169. arelle/archive/plugin/validate/SBRnl/sbr-nl-taxonomies.xml +0 -754
  170. arelle/archive/plugin/validate/USBestPractices.py +0 -570
  171. arelle/archive/plugin/validate/USCorpAction.py +0 -557
  172. arelle/archive/plugin/validate/USSecTagging.py +0 -337
  173. arelle/archive/plugin/validate/XDC/__init__.py +0 -77
  174. arelle/archive/plugin/validate/XDC/config.xml +0 -20
  175. arelle/archive/plugin/validate/XFsyntax/__init__.py +0 -64
  176. arelle/archive/plugin/validate/XFsyntax/xf.py +0 -2227
  177. arelle/archive/plugin/validate/calc2.py +0 -536
  178. arelle/archive/plugin/validateSchemaLxml.py +0 -156
  179. arelle/archive/plugin/validateTableInfoset.py +0 -52
  180. arelle/archive/us-gaap-dei-docType-extraction-frm.xml +0 -90
  181. arelle/archive/us-gaap-dei-ratio-cash-frm.xml +0 -150
  182. arelle/examples/plugin/formulaSuiteConverter.py +0 -212
  183. arelle/examples/plugin/functionsCustom.py +0 -59
  184. arelle/examples/plugin/hello_dolly.py +0 -64
  185. arelle/examples/plugin/multi.py +0 -58
  186. arelle/examples/plugin/rssSaveOim.py +0 -96
  187. arelle/examples/plugin/validate/XYZ/DisclosureSystems.py +0 -2
  188. arelle/examples/plugin/validate/XYZ/PluginValidationDataExtension.py +0 -10
  189. arelle/examples/plugin/validate/XYZ/ValidationPluginExtension.py +0 -49
  190. arelle/examples/plugin/validate/XYZ/__init__.py +0 -75
  191. arelle/examples/plugin/validate/XYZ/resources/config.xml +0 -16
  192. arelle/examples/plugin/validate/XYZ/rules/__init__.py +0 -0
  193. arelle/examples/plugin/validate/XYZ/rules/rules01.py +0 -110
  194. arelle/examples/plugin/validate/XYZ/rules/rules02.py +0 -59
  195. arelle/model/CommentBase.py +0 -9
  196. arelle/model/ElementBase.py +0 -11
  197. arelle/model/PIBase.py +0 -10
  198. arelle/model/__init__.py +0 -15
  199. arelle/scripts-macOS/startWebServer.command +0 -3
  200. arelle/scripts-unix/startWebServer.sh +0 -1
  201. arelle/scripts-windows/startWebServer.bat +0 -5
  202. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/WHEEL +0 -0
  203. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/entry_points.txt +0 -0
  204. {arelle_release-2.37.46.dist-info → arelle_release-2.38.0.dist-info}/top_level.txt +0 -0
@@ -4,23 +4,99 @@ See COPYRIGHT.md for copyright information.
4
4
  from __future__ import annotations
5
5
 
6
6
  from collections import defaultdict
7
- from decimal import Decimal
8
- from typing import Any, Iterable, cast
7
+ from collections.abc import Iterable
8
+ from pathlib import Path
9
+ from typing import Any
9
10
 
10
- from arelle import XbrlConst, ValidateDuplicateFacts
11
+ import regex
12
+ import unicodedata
13
+ from jaconv import jaconv
14
+
15
+ from arelle import ValidateDuplicateFacts, ValidateXbrlCalcs, XbrlConst, XmlUtil
16
+ from arelle.Cntlr import Cntlr
17
+ from arelle.FileSource import FileSource
11
18
  from arelle.LinkbaseType import LinkbaseType
19
+ from arelle.ModelDtsObject import ModelResource, ModelConcept
20
+ from arelle.ModelRelationshipSet import ModelRelationshipSet
21
+ from arelle.ModelValue import QName, qname
22
+ from arelle.ModelXbrl import ModelXbrl
12
23
  from arelle.ValidateDuplicateFacts import DuplicateType
13
24
  from arelle.ValidateXbrl import ValidateXbrl
25
+ from arelle.XmlValidateConst import VALID
14
26
  from arelle.typing import TypeGetText
15
27
  from arelle.utils.PluginHooks import ValidationHook
16
28
  from arelle.utils.validate.Decorator import validation
17
29
  from arelle.utils.validate.Validation import Validation
18
- from ..DisclosureSystems import (DISCLOSURE_SYSTEM_EDINET)
30
+ from arelle.utils.validate.ValidationUtil import hasPresentationalConceptsWithFacts
31
+ from ..Constants import AccountingStandard, HALF_KANA, JAPAN_LANGUAGE_CODES, REPORT_ELR_URI_PATTERN, REPORT_ELR_ID_PATTERN
32
+ from ..ControllerPluginData import ControllerPluginData
33
+ from ..DeiRequirements import DeiItemStatus
34
+ from ..DisclosureSystems import DISCLOSURE_SYSTEM_EDINET
35
+ from ..FilingFormat import DocumentType
19
36
  from ..PluginValidationDataExtension import PluginValidationDataExtension
37
+ from ..ReportFolderType import ReportFolderType
38
+ from ..Statement import StatementType
20
39
 
21
40
  _: TypeGetText
22
41
 
23
42
 
43
+ @validation(
44
+ hook=ValidationHook.XBRL_FINALLY,
45
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
46
+ )
47
+ def rule_balances(
48
+ pluginData: PluginValidationDataExtension,
49
+ val: ValidateXbrl,
50
+ *args: Any,
51
+ **kwargs: Any,
52
+ ) -> Iterable[Validation]:
53
+ """
54
+ EDINET.EC8057W: On the consolidated balance sheet, the sum of all liabilities and
55
+ equity must equal the sum of all assets.
56
+ EDINET.EC8058W: On the nonconsolidated balance sheet, the sum of all liabilities and
57
+ equity must equal the sum of all assets.
58
+ EDINET.EC8062W: On the consolidated statement of financial position, the sum of all liabilities and
59
+ equity must equal the sum of all assets.
60
+ EDINET.EC8064W: On the nonconsolidated statement of financial position, the sum of all liabilities and
61
+ equity must equal the sum of all assets.
62
+ """
63
+ for statementInstance in pluginData.getStatementInstances(val.modelXbrl):
64
+ statement = statementInstance.statement
65
+ for balanceSheet in statementInstance.balanceSheets:
66
+ if balanceSheet.creditSum == balanceSheet.debitSum:
67
+ continue
68
+ code = None
69
+ if statement.statementType == StatementType.BALANCE_SHEET:
70
+ if statement.isConsolidated:
71
+ code = "EDINET.EC8057W"
72
+ else:
73
+ code = "EDINET.EC8058W"
74
+ elif statement.statementType == StatementType.STATEMENT_OF_FINANCIAL_POSITION:
75
+ if statement.isConsolidated:
76
+ code = "EDINET.EC8062W"
77
+ else:
78
+ code = "EDINET.EC8064W"
79
+ assert code is not None, "Unknown balance sheet encountered."
80
+ yield Validation.warning(
81
+ codes=code,
82
+ msg=_("The %(consolidated)s %(balanceSheet)s is not balanced. "
83
+ "The sum of all liabilities and equity must equal the sum of all assets. "
84
+ "Please correct the debit (%(debitSum)s) and credit (%(creditSum)s) "
85
+ "values so that they match "
86
+ "<roleUri=%(roleUri)s> <contextID=%(contextId)s> <unitID=%(unitId)s>."),
87
+ consolidated=_("consolidated") if statement.isConsolidated
88
+ else _("nonconsolidated"),
89
+ balanceSheet=_("balance sheet") if statement.statementType == StatementType.BALANCE_SHEET
90
+ else _("statement of financial position"),
91
+ debitSum=f"{balanceSheet.debitSum:,}",
92
+ creditSum=f"{balanceSheet.creditSum:,}",
93
+ roleUri=statement.roleUri,
94
+ contextId=balanceSheet.contextId,
95
+ unitId=balanceSheet.unitId,
96
+ modelObject=balanceSheet.facts,
97
+ )
98
+
99
+
24
100
  @validation(
25
101
  hook=ValidationHook.XBRL_FINALLY,
26
102
  disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
@@ -36,14 +112,27 @@ def rule_EC1057E(
36
112
  Ensure that there is a nonnil value disclosed for FilingDateCoverPage
37
113
  Note: This rule is only applicable to the public documents.
38
114
  """
39
- dei = pluginData.getDocumentTypes(val.modelXbrl)
40
- if len(dei) > 0:
115
+ facts = [
116
+ fact
117
+ for qname in (
118
+ pluginData.jpcrpEsrFilingDateCoverPageQn,
119
+ pluginData.jpcrpFilingDateCoverPageQn,
120
+ pluginData.jpspsFilingDateCoverPageQn
121
+ )
122
+ for fact in pluginData.iterValidNonNilFacts(val.modelXbrl, qname)
123
+ ]
124
+ for modelDocument in pluginData.iterCoverPages(val.modelXbrl):
125
+ if any(fact.modelDocument == modelDocument for fact in facts):
126
+ continue
41
127
  if not (pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.jpcrpEsrFilingDateCoverPageQn)
42
128
  or pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.jpcrpFilingDateCoverPageQn)
43
129
  or pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.jpspsFilingDateCoverPageQn)):
44
130
  yield Validation.error(
45
131
  codes='EDINET.EC1057E',
46
- msg=_("The [Submission Date] on the cover page has not been filled in."),
132
+ msg=_("There is no submission date ('【提出日】') on the cover page. "
133
+ "File name: '%(file)s'. "
134
+ "Please add '【提出日】' to the relevant file."),
135
+ file=modelDocument.basename,
47
136
  )
48
137
 
49
138
 
@@ -90,6 +179,391 @@ def rule_EC5002E(
90
179
  )
91
180
 
92
181
 
182
+ @validation(
183
+ hook=ValidationHook.XBRL_FINALLY,
184
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
185
+ )
186
+ def rule_calculations(
187
+ pluginData: PluginValidationDataExtension,
188
+ val: ValidateXbrl,
189
+ *args: Any,
190
+ **kwargs: Any,
191
+ ) -> Iterable[Validation]:
192
+ """
193
+ EDINET.EC5611W: The calculated totals for the accounts in the main financial statements, when
194
+ using the appropriate combination of context and extended link roles, should be within the
195
+ range of differences due to rounding.
196
+ """
197
+ for _validation in ValidateXbrlCalcs.validate(
198
+ val.modelXbrl,
199
+ ValidateXbrlCalcs.ValidateCalcsMode.XBRL_v2_1
200
+ ):
201
+ if _validation.codes != "xbrl.5.2.5.2:calcInconsistency":
202
+ continue
203
+ contextId = _validation.args.get("contextID")
204
+ assert contextId is not None
205
+ linkrole = _validation.args.get("linkrole")
206
+ assert linkrole is not None
207
+ isSemiAnnualContext = 'Interim' in contextId
208
+ isSemiAnnualLinkRole = "SemiAnnual" in linkrole
209
+ if isSemiAnnualLinkRole != isSemiAnnualContext:
210
+ # Period of context and linkrole do not match.
211
+ continue
212
+ context = val.modelXbrl.contexts[contextId]
213
+ member = context.dimMemberQname(pluginData.consolidatedOrNonConsolidatedAxisQn, includeDefaults=True)
214
+ isConsolidatedContext = member != pluginData.nonConsolidatedMemberQn
215
+ isConsolidatedLinkRole = "Consolidated" in linkrole
216
+ if isConsolidatedLinkRole != isConsolidatedContext:
217
+ # Consolidated status of context and linkrole do not match.
218
+ continue
219
+ yield Validation.warning(
220
+ codes='EDINET.EC5611W',
221
+ msg=_("The value \"%(reportedSum)s\" of the total subject \"%(concept)s\" does not match the calculated value \"%(computedSum)s\" (number of items: %(count)s) of the calculation link. "
222
+ "Please correct the settings of the relevant elements and calculation links "
223
+ "<roleUri=%(linkrole)s> <contextID=%(contextID)s> <unit=%(unitID)s>."),
224
+ count=len(_validation.args.get("modelObject", [])) - 1,
225
+ **_validation.args,
226
+ )
227
+
228
+
229
+ @validation(
230
+ hook=ValidationHook.XBRL_FINALLY,
231
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
232
+ )
233
+ def rule_EC5602R(
234
+ pluginData: PluginValidationDataExtension,
235
+ val: ValidateXbrl,
236
+ *args: Any,
237
+ **kwargs: Any,
238
+ ) -> Iterable[Validation]:
239
+ """
240
+ EDINET.EC5602R: DEI value must match corresponding cover page value.
241
+
242
+ Applies to FilerNameInJapaneseDEI, FilerNameInEnglishDEI, FundNameInJapaneseDEI.
243
+ """
244
+ errors = []
245
+
246
+ def _normalizeValue(value: str) -> str:
247
+ value = regex.sub(r'\s+', ' ', value).strip()
248
+ return jaconv.h2z(value, kana=True, ascii=True, digit=True)
249
+
250
+ def _collectMismatchedValues(deiQName: QName, coverPageQnames: list[QName]) -> None:
251
+ deiFact = next((
252
+ fact
253
+ for fact in pluginData.iterValidNonNilFacts(val.modelXbrl, deiQName)
254
+ ), None)
255
+ if deiFact is None or deiFact.xValue is None:
256
+ return
257
+ deiValue = _normalizeValue(str(deiFact.xValue))
258
+ for coverPageQname in coverPageQnames:
259
+ for coverPageFact in pluginData.iterValidNonNilFacts(val.modelXbrl, coverPageQname):
260
+ factValue = _normalizeValue(str(coverPageFact.xValue))
261
+ if not factValue.startswith(deiValue):
262
+ errors.append((deiFact, coverPageFact))
263
+
264
+ _collectMismatchedValues(
265
+ pluginData.qname('jpdei_cor', 'FilerNameInJapaneseDEI'),
266
+ [
267
+ #【発行者名】
268
+ pluginData.qname('jpsps-esr_cor', 'IssuerNameCoverPage'),
269
+ pluginData.qname('jpsps-sbr_cor', 'IssuerNameCoverPage'),
270
+ pluginData.qname('jpsps_cor', 'IssuerNameCoverPage'),
271
+ #【会社名】
272
+ pluginData.qname('jpcrp-esr_cor', 'CompanyNameCoverPage'),
273
+ pluginData.qname('jpcrp-sbr_cor', 'CompanyNameCoverPage'),
274
+ pluginData.qname('jpcrp_cor', 'CompanyNameCoverPage'),
275
+ pluginData.qname('jpctl_cor', 'CompanyNameCoverPage'),
276
+ #【氏名又は名称】
277
+ pluginData.qname('jplvh_cor', 'NameCoverPage'),
278
+ #【届出者の名称】
279
+ pluginData.qname('jptoi_cor', 'FullNameOrNameOfFilerOfNotificationCoverPage'),
280
+ #【届出者の氏名又は名称】
281
+ pluginData.qname('jptoo-ton_cor', 'FullNameOrNameOfFilerOfNotificationCoverPage'),
282
+ pluginData.qname('jptoo-wto_cor', 'FullNameOrNameOfFilerOfNotificationCoverPage'),
283
+ #【報告者の名称】
284
+ pluginData.qname('jptoi_cor', 'NameOfFilerCoverPage'),
285
+ pluginData.qname('jptoo-pst_cor', 'NameOfFilerCoverPage'),
286
+ #【報告者の氏名又は名称】
287
+ pluginData.qname('jptoo-toa_cor', 'FullNameOrNameOfFilerCoverPage'),
288
+ pluginData.qname('jptoo-tor_cor', 'FullNameOrNameOfFilerCoverPage'),
289
+ ]
290
+ )
291
+
292
+ _collectMismatchedValues(
293
+ pluginData.qname('jpdei_cor', 'FilerNameInEnglishDEI'),
294
+ [
295
+ #【英訳名】
296
+ pluginData.qname('jpcrp-esr_cor', 'CompanyNameInEnglishCoverPage'),
297
+ pluginData.qname('jpcrp-sbr_cor', 'CompanyNameInEnglishCoverPage'),
298
+ pluginData.qname('jpcrp_cor', 'CompanyNameInEnglishCoverPage'),
299
+ pluginData.qname('jpctl_cor', 'CompanyNameInEnglishCoverPage'),
300
+ ]
301
+ )
302
+
303
+ _collectMismatchedValues(
304
+ pluginData.qname('jpdei_cor', 'FundNameInJapaneseDEI'),
305
+ [
306
+ #【ファンド名】
307
+ pluginData.qname('jpsps-esr_cor', 'FundNameCoverPage'),
308
+ pluginData.qname('jpsps_cor', 'FundNameCoverPage'),
309
+ #【届出の対象とした募集(売出)内国投資信託受益証券に係るファンドの名称】
310
+ pluginData.qname('jpsps_cor', 'NameOfFundRelatedToDomesticInvestmentTrustBeneficiaryCertificateToRegisterForOfferingOrDistributionCoverPageTextBlock'),
311
+ #【届出の対象とした募集(売出)内国投資証券に係る投資法人の名称】
312
+ pluginData.qname('jpsps_cor', 'NameOfInvestmentCorporationRelatedToDomesticInvestmentSecuritiesToRegisterForOfferingOrDistributionCoverPage'),
313
+ ]
314
+ )
315
+
316
+ for deiFact, coverPageFact in errors:
317
+ yield Validation.warning(
318
+ codes='EDINET.EC5602R',
319
+ msg=_("The DEI information \"%(deiQname)s\" (%(deiValue)s) does not match "
320
+ "\"%(coverPageQname)s\" (%(coverPageValue)s) . "
321
+ "Please check the content of the corresponding DEI (the element "
322
+ "displayed in the message) and the value in the submitted document, "
323
+ "and correct it so that they match."),
324
+ deiQname=deiFact.qname,
325
+ deiValue=deiFact.xValue,
326
+ coverPageQname=coverPageFact.qname,
327
+ coverPageValue=coverPageFact.xValue,
328
+ modelObject=[deiFact, coverPageFact],
329
+ )
330
+
331
+
332
+ @validation(
333
+ hook=ValidationHook.XBRL_FINALLY,
334
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
335
+ )
336
+ def rule_EC5613E(
337
+ pluginData: PluginValidationDataExtension,
338
+ val: ValidateXbrl,
339
+ *args: Any,
340
+ **kwargs: Any,
341
+ ) -> Iterable[Validation]:
342
+ """
343
+ EDINET.EC5613E: Please set the DEI "Accounting Standard" value to one
344
+ of the following: "Japan GAAP", "US GAAP", "IFRS".
345
+ """
346
+ validAccountingStandards = {s.value for s in AccountingStandard}
347
+ errorFacts = [
348
+ fact for fact in pluginData.iterValidNonNilFacts(val.modelXbrl, pluginData.accountingStandardsDeiQn)
349
+ if fact.xValue not in validAccountingStandards
350
+ ]
351
+ if len(errorFacts) > 0:
352
+ yield Validation.error(
353
+ codes='EDINET.EC5613E',
354
+ msg=_("Please set the DEI \"Accounting Standard\" value to one "
355
+ "of the following: %(values)s."),
356
+ values=', '.join(f'"{s.value}"' for s in AccountingStandard),
357
+ modelObject=errorFacts,
358
+ )
359
+
360
+
361
+ @validation(
362
+ hook=ValidationHook.XBRL_FINALLY,
363
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
364
+ )
365
+ def rule_EC5614E(
366
+ pluginData: PluginValidationDataExtension,
367
+ val: ValidateXbrl,
368
+ *args: Any,
369
+ **kwargs: Any,
370
+ ) -> Iterable[Validation]:
371
+ """
372
+ EDINET.EC5614E: A required DEI value is missing.
373
+ """
374
+ for coverPageDocument in pluginData.iterCoverPages(val.modelXbrl):
375
+ filingFormat = pluginData.getFilingFormat(val.modelXbrl)
376
+ if filingFormat is None:
377
+ return
378
+ deiRequirements = pluginData.getDeiRequirements(val.modelXbrl)
379
+ for qname in pluginData.deiItems:
380
+ status = deiRequirements.get(qname, filingFormat)
381
+ if (
382
+ status == DeiItemStatus.REQUIRED and
383
+ not pluginData.hasValidNonNilFact(val.modelXbrl, qname)
384
+ ):
385
+ yield Validation.error(
386
+ codes='EDINET.EC5614E',
387
+ msg=_("The value of '%(localName)s' in the DEI does not exist. "
388
+ "File name: '%(file)s'. "
389
+ "Please add the cover item %(localName)s to the relevant file."),
390
+ localName=qname.localName,
391
+ file=coverPageDocument.basename,
392
+ )
393
+
394
+
395
+ @validation(
396
+ hook=ValidationHook.XBRL_FINALLY,
397
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
398
+ )
399
+ def rule_EC5623W(
400
+ pluginData: PluginValidationDataExtension,
401
+ val: ValidateXbrl,
402
+ *args: Any,
403
+ **kwargs: Any,
404
+ ) -> Iterable[Validation]:
405
+ """
406
+ EDINET.EC5623W: Instances using IFRS taxonomies must set the DEI "Accounting Standard" value to "IFRS".
407
+ """
408
+ if pluginData.namespaces.jpigp not in val.modelXbrl.prefixedNamespaces.values():
409
+ return
410
+ errorFacts = [
411
+ fact for fact in pluginData.iterValidNonNilFacts(val.modelXbrl, pluginData.accountingStandardsDeiQn)
412
+ if fact.xValue != AccountingStandard.IFRS.value
413
+ ]
414
+ if len(errorFacts) > 0:
415
+ yield Validation.warning(
416
+ codes='EDINET.EC5623W',
417
+ msg=_("Please set the DEI \"Accounting Standard\" value to \"IFRS\"."),
418
+ modelObject=errorFacts,
419
+ )
420
+
421
+
422
+ @validation(
423
+ hook=ValidationHook.XBRL_FINALLY,
424
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
425
+ )
426
+ def rule_namespace_prefixes(
427
+ pluginData: PluginValidationDataExtension,
428
+ val: ValidateXbrl,
429
+ *args: Any,
430
+ **kwargs: Any,
431
+ ) -> Iterable[Validation]:
432
+ """
433
+ EDINET.EC8003W: The namespace prefix used in the namespace declaration of the
434
+ report schema file must conform to the rules.
435
+ jp{府令略号}{様式番号}-{報告書略号}_{EDINET コード又はファンドコード}-{追番(3 桁)}
436
+ EDINET.EC8004W: The namespace prefix used in the namespace declaration of the
437
+ audit report schema file must conform to the rules.
438
+ jpaud-{監査報告書略号}-{当期又は前期の別}{連結又は個別の別}_{EDINET コード又はファンドコード}-{追番(3 桁)}
439
+ """
440
+ extensionSchemas = pluginData.getExtensionSchemas(val.modelXbrl)
441
+ for modelDocument in val.modelXbrl.urlDocs.values():
442
+ for prefix, namespace in modelDocument.xmlRootElement.nsmap.items():
443
+ if namespace not in extensionSchemas:
444
+ continue # Not an extension schema namespace
445
+ pathInfo = extensionSchemas[namespace]
446
+ assert pathInfo.reportFolderType is not None
447
+ patterns = pathInfo.reportFolderType.prefixPatterns
448
+ if len(patterns) == 0:
449
+ continue # No patterns to check against
450
+ match = any(pattern.fullmatch(prefix) for pattern in patterns)
451
+ if match:
452
+ continue # Valid namespace URI
453
+ if pathInfo.reportFolderType == ReportFolderType.AUDIT_DOC:
454
+ yield Validation.warning(
455
+ codes='EDINET.EC8004W',
456
+ msg=_("The namespace prefix used in the namespace declaration of the "
457
+ "audit report schema file does not conform to the rules. "
458
+ "File name: '%(file)s'. "
459
+ "Prefix: '%(prefix)s'."),
460
+ file=pathInfo.path.name,
461
+ prefix=prefix
462
+ )
463
+ else:
464
+ yield Validation.warning(
465
+ codes='EDINET.EC8003W',
466
+ msg=_("The namespace prefix used in the namespace declaration of the "
467
+ "report schema file does not conform to the rules. "
468
+ "File name: '%(file)s'. "
469
+ "Prefix: '%(prefix)s'."),
470
+ file=pathInfo.path.name,
471
+ prefix=prefix
472
+ )
473
+
474
+
475
+ @validation(
476
+ hook=ValidationHook.XBRL_FINALLY,
477
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
478
+ )
479
+ def rule_namespace_uris(
480
+ pluginData: PluginValidationDataExtension,
481
+ val: ValidateXbrl,
482
+ *args: Any,
483
+ **kwargs: Any,
484
+ ) -> Iterable[Validation]:
485
+ """
486
+ EDINET.EC8000W: A report's extension taxonomy namespace URI must conform to the rules.
487
+ http://disclosure.edinet-fsa.go.jp/jp{府令略号}{様式番号}/{報告書略号}/{報告書連番(3 桁)}
488
+ /{EDINET コード又はファンドコード}-{追番(3 桁)}/{報告対象期間期末日|報告義務発生日}
489
+ /{報告書提出回数(2 桁)}/{報告書提出日}
490
+ EDINET.EC8001W: An audit report's extension taxonomy namespace URI must conform to the rules.
491
+ http://disclosure.edinet-fsa.go.jp/jpaud/{監査報告書略号}/{当期又は前期の別}{連結又は個別の別}
492
+ /{報告書連番(3 桁)}/{EDINET コード又はファンドコード}-{追番(3桁)}/{報告対象期間期末日}
493
+ /{報告書提出回数(2 桁)}/{報告書提出日}
494
+ """
495
+ for targetNamespace, pathInfo in pluginData.getExtensionSchemas(val.modelXbrl).items():
496
+ assert pathInfo.reportFolderType is not None
497
+ patterns = pathInfo.reportFolderType.namespaceUriPatterns
498
+ if len(patterns) == 0:
499
+ continue # No patterns to check against
500
+ match = any(pattern.fullmatch(targetNamespace) for pattern in patterns)
501
+ if match:
502
+ continue # Valid namespace URI
503
+ if pathInfo.reportFolderType == ReportFolderType.AUDIT_DOC:
504
+ yield Validation.warning(
505
+ codes='EDINET.EC8001W',
506
+ msg=_("The namespace URI used in the namespace declaration of the "
507
+ "audit report schema file does not conform to the rules. "
508
+ "File name: '%(file)s'. "
509
+ "URI: '%(uri)s'."),
510
+ file=pathInfo.path.name,
511
+ uri=targetNamespace
512
+ )
513
+ else:
514
+ yield Validation.warning(
515
+ codes='EDINET.EC8000W',
516
+ msg=_("The namespace URI used in the namespace declaration of the "
517
+ "report schema file does not conform to the rules. "
518
+ "File name: '%(file)s'. "
519
+ "URI: '%(uri)s'."),
520
+ file=pathInfo.path.name,
521
+ uri=targetNamespace
522
+ )
523
+
524
+
525
+ @validation(
526
+ hook=ValidationHook.XBRL_FINALLY,
527
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
528
+ )
529
+ def rule_roles(
530
+ pluginData: PluginValidationDataExtension,
531
+ val: ValidateXbrl,
532
+ *args: Any,
533
+ **kwargs: Any,
534
+ ) -> Iterable[Validation]:
535
+ """
536
+ EDINET.EC8006W: The ID of the report's extended link role must conform to the rules.
537
+ rol_{Root element name (excluding Abstract and Heading)}(-{Modifier})(-{2-digit sequential number})
538
+ EDINET.EC8007W: The URI of the report's extended link role must conform to the rules.
539
+ http://disclosure.edinet-fsa.go.jp/role/jp{Prefecture Ordinance abbreviation|dei}
540
+ (-{report abbreviation})/rol_{root element name (excluding Abstract and Heading)}
541
+ (-{modifier})(-{two-digit sequential number})
542
+ """
543
+ for roleTypes in val.modelXbrl.roleTypes.values():
544
+ for roleType in roleTypes:
545
+ if not pluginData.isExtensionUri(roleType.modelDocument.uri, val.modelXbrl):
546
+ continue
547
+ if not REPORT_ELR_ID_PATTERN.fullmatch(str(roleType.id)):
548
+ yield Validation.warning(
549
+ codes='EDINET.EC8006W',
550
+ msg=_("The ID of the report's extended link role does not conform to the rules. "
551
+ "File name: '%(file)s'. "
552
+ "ID: '%(id)s'."),
553
+ file=roleType.modelDocument.basename,
554
+ id=roleType.id
555
+ )
556
+ if not REPORT_ELR_URI_PATTERN.fullmatch(roleType.roleURI):
557
+ yield Validation.warning(
558
+ codes='EDINET.EC8007W',
559
+ msg=_("The URI of the report's extended link role does not conform to the rules. "
560
+ "File name: '%(file)s'. "
561
+ "URI: '%(uri)s'."),
562
+ file=roleType.modelDocument.basename,
563
+ uri=roleType.roleURI
564
+ )
565
+
566
+
93
567
  @validation(
94
568
  hook=ValidationHook.XBRL_FINALLY,
95
569
  disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
@@ -179,47 +653,220 @@ def rule_EC8027W(
179
653
  hook=ValidationHook.XBRL_FINALLY,
180
654
  disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
181
655
  )
182
- def rule_EC8062W(
656
+ def rule_EC8028W(
183
657
  pluginData: PluginValidationDataExtension,
184
658
  val: ValidateXbrl,
185
659
  *args: Any,
186
660
  **kwargs: Any,
187
661
  ) -> Iterable[Validation]:
188
662
  """
189
- EDINET.EC8062W: The sum of all liabilities and equity must equal the sum of all assets.
663
+ EDINET.EC8028W: The priority attribute must not be duplicated for the same
664
+ element and label role within the submitter's taxonomy.
665
+
666
+ Note: Not mentioned in documentation, but inferring from sample filings that
667
+ label language should also be considered.
668
+ """
669
+ labelsRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
670
+ if labelsRelationshipSet is None:
671
+ return
672
+ for concept, rels in labelsRelationshipSet.fromModelObjects().items():
673
+ groups = defaultdict(list)
674
+ for rel in rels:
675
+ if not isinstance(rel.toModelObject, ModelResource):
676
+ continue
677
+ if not pluginData.isExtensionUri(rel.modelDocument.uri, val.modelXbrl):
678
+ continue
679
+ groups[(rel.toModelObject.xmlLang, rel.toModelObject.role, rel.priority)].append(rel)
680
+ for (lang, role, priority), group in groups.items():
681
+ if len(group) > 1:
682
+ yield Validation.warning(
683
+ codes='EDINET.EC8028W',
684
+ msg=_("The priority attribute must not be duplicated for the same "
685
+ "element and label role in the same submitter taxonomy. "
686
+ "File name: '%(path)s'. Concept: '%(concept)s'. "
687
+ "Role: '%(role)s'. Priority: %(priority)s. "
688
+ "Please check the element and label name of the corresponding "
689
+ "file. Please set the priority attribute so that the same "
690
+ "element and the same label role in the submitter's taxonomy "
691
+ "are not duplicated."),
692
+ path=rels[0].document.basename,
693
+ concept=concept.qname,
694
+ role=role,
695
+ priority=priority,
696
+ modelObject=group,
697
+ )
698
+
699
+
700
+ @validation(
701
+ hook=ValidationHook.COMPLETE,
702
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
703
+ )
704
+ def rule_EC8029W(
705
+ pluginData: ControllerPluginData,
706
+ cntlr: Cntlr,
707
+ fileSource: FileSource,
708
+ *args: Any,
709
+ **kwargs: Any,
710
+ ) -> Iterable[Validation]:
711
+ """
712
+ EDINET.EC8029W: Any non-abstract element referenced in the definition or presentation linkbase must
713
+ be present in an instance.
190
714
  """
191
- deduplicatedFacts = pluginData.getDeduplicatedFacts(val.modelXbrl)
715
+ linkbaseTypes = (LinkbaseType.DEFINITION, LinkbaseType.PRESENTATION)
716
+ arcroles = tuple(
717
+ arcrole
718
+ for linkbaseType in linkbaseTypes
719
+ for arcrole in linkbaseType.getArcroles()
720
+ )
721
+ referencedConcepts: set[ModelConcept] = set()
722
+ usedConcepts: set[ModelConcept] = set()
723
+ for modelXbrl in pluginData.loadedModelXbrls:
724
+ usedConcepts.update(fact.concept for fact in modelXbrl.facts)
725
+ relSet = modelXbrl.relationshipSet(arcroles)
726
+ if relSet is None:
727
+ continue
728
+ concepts = list(relSet.fromModelObjects().keys()) + list(relSet.toModelObjects().keys())
729
+ for concept in concepts:
730
+ if not isinstance(concept, ModelConcept):
731
+ continue
732
+ if concept.isAbstract:
733
+ continue
734
+ referencedConcepts.add(concept)
735
+ unusedConcepts = referencedConcepts - usedConcepts
736
+ for concept in unusedConcepts:
737
+ yield Validation.warning(
738
+ codes='EDINET.EC8029W',
739
+ msg=_("The non-abstract element present in the presentation link or definition "
740
+ "link is not set in an inline XBRL file. "
741
+ "Element: '%(concept)s'. "
742
+ "Please use the element in the inline XBRL file. If it is an unnecessary "
743
+ "element, please delete it from the presentation link and definition link."),
744
+ concept=concept.qname.localName,
745
+ modelObject=concept,
746
+ )
747
+
192
748
 
193
- factsByContextId = defaultdict(list)
194
- for fact in deduplicatedFacts:
195
- if fact.qname not in (pluginData.assetsIfrsQn, pluginData.liabilitiesAndEquityIfrsQn):
749
+ @validation(
750
+ hook=ValidationHook.XBRL_FINALLY,
751
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
752
+ )
753
+ def rule_EC8030W(
754
+ pluginData: PluginValidationDataExtension,
755
+ val: ValidateXbrl,
756
+ *args: Any,
757
+ **kwargs: Any,
758
+ ) -> Iterable[Validation]:
759
+ """
760
+ EDINET.EC8030W: Any concept (other than DEI concepts) used in an instance must
761
+ be in the presentation linkbase.
762
+ """
763
+ usedConcepts = pluginData.getUsedConcepts(val.modelXbrl)
764
+ relSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.PRESENTATION.getArcroles()))
765
+ for concept in usedConcepts:
766
+ if concept.qname.namespaceURI == pluginData.namespaces.jpdei:
196
767
  continue
197
- if fact.contextID is None or not pluginData.contextIdPattern.fullmatch(fact.contextID):
768
+ if concept.qname.localName.endswith('DEI'):
769
+ # Example: jpsps_cor:SecuritiesRegistrationStatementAmendmentFlagDeemedRegistrationStatementDEI
198
770
  continue
199
- factsByContextId[fact.contextID].append(fact)
200
-
201
- for facts in factsByContextId.values():
202
- assetSum = Decimal(0)
203
- liabilitiesAndEquitySum = Decimal(0)
204
- for fact in facts:
205
- if isinstance(fact.xValue, float):
206
- value = Decimal(fact.xValue)
207
- else:
208
- value = cast(Decimal, fact.xValue)
209
- if fact.qname == pluginData.assetsIfrsQn:
210
- assetSum += value
211
- elif fact.qname == pluginData.liabilitiesAndEquityIfrsQn:
212
- liabilitiesAndEquitySum += value
213
- if assetSum != liabilitiesAndEquitySum:
771
+ if not relSet.contains(concept):
214
772
  yield Validation.warning(
215
- codes='EDINET.EC8062W',
216
- msg=_("The consolidated statement of financial position is not reconciled. "
217
- "The sum of all liabilities and equity must equal the sum of all assets. "
218
- "Please correct the debit (%(liabilitiesAndEquitySum)s) and credit (%(assetSum)s) "
219
- "values so that they match."),
220
- liabilitiesAndEquitySum=f"{liabilitiesAndEquitySum:,}",
221
- assetSum=f"{assetSum:,}",
222
- modelObject=facts,
773
+ codes='EDINET.EC8030W',
774
+ msg=_("An element (other than DEI) set in the inline XBRL file is not set in the "
775
+ "presentation linkbase. "
776
+ "Element: '%(concept)s'. "
777
+ "Please set the relevant element in the presentation linkbase."),
778
+ concept=concept.qname.localName,
779
+ modelObject=concept,
780
+ )
781
+
782
+
783
+ @validation(
784
+ hook=ValidationHook.COMPLETE,
785
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
786
+ )
787
+ def rule_EC8031W(
788
+ pluginData: ControllerPluginData,
789
+ cntlr: Cntlr,
790
+ fileSource: FileSource,
791
+ *args: Any,
792
+ **kwargs: Any,
793
+ ) -> Iterable[Validation]:
794
+ """
795
+ EDINET.EC8031W: For contexts having an ID beginning with "FilingDate", the instant
796
+ date value must match the report submission date set in the file name.
797
+
798
+ However, when reporting corrections, please set the following:
799
+ Context beginning with "FilingDate": The submission date on the cover page of the attached inline XBRL (original submission date)
800
+ "Report submission date" in the file name: The submission date of the correction report, etc.
801
+ """
802
+ isAmendment = pluginData.getDeiValue('ReportAmendmentFlagDEI')
803
+ if isAmendment:
804
+ # Amendment/corrections report are not subject to this validation, but documentation does note:
805
+ # However, when reporting corrections, please set the following:
806
+ # Context beginning with "FilingDate": The submission date on the cover page of the attached inline XBRL (original submission date)
807
+ # "Report submission date" in the file name: The submission date of the correction report, etc.
808
+ return
809
+ uploadContents = pluginData.getUploadContents()
810
+ if uploadContents is None:
811
+ return
812
+ docUris = {
813
+ docUri
814
+ for modelXbrl in pluginData.loadedModelXbrls
815
+ for docUri in modelXbrl.urlDocs.keys()
816
+ }
817
+ actualDates = defaultdict(set)
818
+ for uri in docUris:
819
+ path = Path(uri)
820
+ pathInfo = uploadContents.uploadPathsByFullPath.get(path)
821
+ if pathInfo is None or pathInfo.reportFolderType is None:
822
+ continue
823
+ patterns = pathInfo.reportFolderType.ixbrlFilenamePatterns
824
+ for pattern in patterns:
825
+ matches = pattern.match(path.name)
826
+ if not matches:
827
+ continue
828
+ groups = matches.groupdict()
829
+ year = groups['submission_year']
830
+ month = groups['submission_month']
831
+ day = groups['submission_day']
832
+ actualDate = f'{year:04}-{month:02}-{day:02}'
833
+ actualDates[actualDate].add(path)
834
+ expectedDates = defaultdict(set)
835
+ for modelXbrl in pluginData.loadedModelXbrls:
836
+ for context in modelXbrl.contexts.values():
837
+ if context.id is None:
838
+ continue
839
+ if not context.id.startswith("FilingDate"):
840
+ continue
841
+ if not context.isInstantPeriod:
842
+ continue
843
+ expectedDate = XmlUtil.dateunionValue(context.instantDatetime, subtractOneDay=True)[:10]
844
+ expectedDates[expectedDate].add(context)
845
+ invalidDates = {k: v for k, v in actualDates.items() if k not in expectedDates}
846
+ if len(invalidDates) == 0:
847
+ return
848
+ paths = [
849
+ path
850
+ for paths in invalidDates.values()
851
+ for path in paths
852
+ ]
853
+ contexts = [
854
+ context
855
+ for contexts in expectedDates.values()
856
+ for context in contexts
857
+ ]
858
+ for path in paths:
859
+ for context in contexts:
860
+ yield Validation.warning(
861
+ codes='EDINET.EC8031W',
862
+ msg=_("The value of the instant element in context '%(context)s' "
863
+ "must match the report submission date set in the file name. "
864
+ "File name: '%(file)s'. "
865
+ "Please correct the report submission date in the filename or "
866
+ "the instant element value for the context with ID '%(context)s'."),
867
+ context=context.id,
868
+ file=path.name,
869
+ modelObject=context,
223
870
  )
224
871
 
225
872
 
@@ -227,19 +874,1261 @@ def rule_EC8062W(
227
874
  hook=ValidationHook.XBRL_FINALLY,
228
875
  disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
229
876
  )
230
- def rule_EC8075W(
877
+ def rule_EC8034W(
231
878
  pluginData: PluginValidationDataExtension,
232
879
  val: ValidateXbrl,
233
880
  *args: Any,
234
881
  **kwargs: Any,
235
882
  ) -> Iterable[Validation]:
236
883
  """
237
- EDINET.EC8075W: The percentage of female executives has not been tagged in detail. Ensure that there is
238
- a nonnil value disclosed for jpcrp_cor:RatioOfFemaleDirectorsAndOtherOfficers.
884
+ EDINET.EC8034W: English labels for extension concepts must not contain full-width characters.
239
885
  """
240
- if pluginData.isCorporateForm(val.modelXbrl):
241
- if not pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.ratioOfFemaleDirectorsAndOtherOfficersQn):
242
- yield Validation.warning(
243
- codes='EDINET.EC8075W',
244
- msg=_("The percentage of female executives has not been tagged in detail."),
886
+ labelsRelationshipSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
887
+ for concept, modelLabelRels in labelsRelationshipSet.fromModelObjects().items():
888
+ for modelLabelRel in modelLabelRels:
889
+ modelLabel = modelLabelRel.toModelObject
890
+ if not isinstance(modelLabel, ModelResource):
891
+ continue
892
+ if not pluginData.isExtensionUri(modelLabel.modelDocument.uri, val.modelXbrl):
893
+ continue
894
+ if modelLabel.xmlLang != 'en':
895
+ continue
896
+ label = modelLabel.textValue.strip() # Does not trim full-width spaces
897
+ if any(
898
+ unicodedata.east_asian_width(char) in ('F', 'W')
899
+ for char in label
900
+ ):
901
+ yield Validation.warning(
902
+ codes='EDINET.EC8034W',
903
+ msg=_("The English label must be set using half-width alphanumeric characters "
904
+ "and half-width symbols. "
905
+ "File name: '%(file)s'. "
906
+ "English label: '%(label)s'. "
907
+ "Please use only half-width alphanumeric characters and half-width symbols "
908
+ "for the English labels of concepts in the relevant files."),
909
+ file=modelLabel.document.basename,
910
+ label=modelLabel.id,
911
+ modelObject=modelLabel,
912
+ )
913
+
914
+
915
+ @validation(
916
+ hook=ValidationHook.XBRL_FINALLY,
917
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
918
+ )
919
+ def rule_EC8069W(
920
+ pluginData: PluginValidationDataExtension,
921
+ val: ValidateXbrl,
922
+ *args: Any,
923
+ **kwargs: Any,
924
+ ) -> Iterable[Validation]:
925
+ """
926
+ EDINET.EC8069W: If tagging IssuedSharesTotalNumberOfSharesEtcTextBlock, also tag using at least one of the following three elements:"
927
+ "Overview of the corporate governance system (company with auditors) [text block]" (CorporateGovernanceCompanyWithCorporateAuditorsTextBlock) ・
928
+ "Overview of the corporate governance system (company with audit and supervisory committee) [text block]" (CorporateGovernanceCompanyWithAuditAndSupervisoryCommitteeTextBlock)
929
+ "Overview of the corporate governance system (company with nominating committee, etc.) [text block]" (CorporateGovernanceCompanyWithNominatingAndOtherCommitteesTextBlock)
930
+
931
+ If a role indicating a disclosure of securities information and if IssuedSharesTotalNumberOfSharesEtcTextBlock is tagged and non-nil then the one or more of the above three elements must also be tagged and non-nil.
932
+ """
933
+ roleUris = (
934
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo24SecuritiesRegistrationStatement',
935
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo27SecuritiesRegistrationStatement',
936
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo3AnnualSecuritiesReport',
937
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo32AnnualSecuritiesReport',
938
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo4AnnualSecuritiesReport',
939
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo43QuarterlySecuritiesReport',
940
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo43SemiAnnualSecuritiesReport',
941
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo24SecuritiesRegistrationStatement',
942
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo27SecuritiesRegistrationStatement',
943
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo3AnnualSecuritiesReport',
944
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo32AnnualSecuritiesReport',
945
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo4AnnualSecuritiesReport',
946
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo43QuarterlySecuritiesReport',
947
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_CabinetOfficeOrdinanceOnDisclosureOfCorporateInformationEtcFormNo43SemiAnnualSecuritiesReport'
948
+ )
949
+ if not hasPresentationalConceptsWithFacts(val.modelXbrl, roleUris):
950
+ return
951
+ if not pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.issuedSharesTotalNumberOfSharesEtcQn):
952
+ return
953
+ if (
954
+ pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.corporateGovernanceCompanyWithAuditAndSupervisoryCommitteeTextBlockQn) or
955
+ pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.corporateGovernanceCompanyWithCorporateAuditorsTextBlockQn) or
956
+ pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.corporateGovernanceCompanyWithNominatingAndOtherCommitteesTextBlockQn)
957
+ ):
958
+ return
959
+ totalStockShares = val.modelXbrl.factsByQname.get(pluginData.issuedSharesTotalNumberOfSharesEtcQn)
960
+ yield Validation.error(
961
+ codes='EDINET.EC8069W',
962
+ msg=_("If tagging IssuedSharesTotalNumberOfSharesEtcTextBlock, also tag using at least one of the following three elements: \n"
963
+ "'Overview of corporate governance system (company with auditors) [Text Block]' (CorporateGovernanceCompanyWithCorporateAuditorsTextBlock) \n"
964
+ "'Overview of corporate governance system (company with audit and supervisory committee) [Text Block]' (CorporateGovernanceCompanyWithAuditAndSupervisoryCommitteeTextBlock)\n"
965
+ "'Overview of corporate governance system (company with nominating committee, etc.) [Text Block]' (CorporateGovernanceCompanyWithNominatingAndOtherCommitteesTextBlock)\n"),
966
+ modelObject=totalStockShares
967
+ )
968
+
969
+
970
+ @validation(
971
+ hook=ValidationHook.XBRL_FINALLY,
972
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
973
+ )
974
+ def rule_EC8073E(
975
+ pluginData: PluginValidationDataExtension,
976
+ val: ValidateXbrl,
977
+ *args: Any,
978
+ **kwargs: Any,
979
+ ) -> Iterable[Validation]:
980
+ """
981
+ EDINET.EC8073E: Prohibited characters are used in the labels for descendents of
982
+ CategoriesOfDirectorsAndOtherOfficersAxis except for ExecutiveOfficersMember
983
+ """
984
+ axisConcept = val.modelXbrl.qnameConcepts.get(pluginData.categoriesOfDirectorsAndOtherOfficersAxisQn)
985
+ if axisConcept is None:
986
+ return
987
+ defRelSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.DEFINITION.getArcroles()))
988
+ labelRelSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
989
+ for rel in defRelSet.fromModelObject(axisConcept):
990
+ if rel.toModelObject is None or rel.toModelObject.qname == pluginData.executiveOfficersMemberQn:
991
+ continue
992
+ for labelRel in labelRelSet.fromModelObject(rel.toModelObject):
993
+ if labelRel.toModelObject is None or labelRel.toModelObject.textValue is None:
994
+ continue
995
+ illegalChars = HALF_KANA.intersection(set(labelRel.toModelObject.textValue))
996
+ if any(illegalChars):
997
+ yield Validation.error(
998
+ codes='EDINET.EC8073E',
999
+ msg=_("The concept: %(concept)s has a %(role)s label which contains characters that are not "
1000
+ "allowed. Label: %(label)s, disallowed characters: %(characters)s"),
1001
+ concept=rel.toModelObject.qname.localName,
1002
+ role=labelRel.toModelObject.role,
1003
+ label=labelRel.toModelObject.textValue,
1004
+ characters=list(illegalChars)
245
1005
  )
1006
+
1007
+
1008
+ @validation(
1009
+ hook=ValidationHook.XBRL_FINALLY,
1010
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1011
+ )
1012
+ def rule_EC8073W_EC8074W(
1013
+ pluginData: PluginValidationDataExtension,
1014
+ val: ValidateXbrl,
1015
+ *args: Any,
1016
+ **kwargs: Any,
1017
+ ) -> Iterable[Validation]:
1018
+ """
1019
+ EDINET.EC8073W: Prohibited characters are used in Japanese labels for descendents of ExecutiveOfficersMember
1020
+ EDINET.EC8074W: Prohibited characters are used in English labels for descendents of ExecutiveOfficersMember
1021
+ """
1022
+ def getIllegalCharsJapanese(textValue: str) -> set[str]:
1023
+ """Check for prohibited characters in Japanese labels."""
1024
+ return set(HALF_KANA.intersection(set(textValue)))
1025
+
1026
+ def getIllegalCharsEnglish(textValue: str) -> set[str]:
1027
+ """Check for prohibited characters in English labels."""
1028
+ illegalChars = set()
1029
+ for char in textValue:
1030
+ if char in HALF_KANA:
1031
+ illegalChars.add(char)
1032
+ continue
1033
+ codePoint = ord(char)
1034
+ if 0xA1 <= codePoint <= 0xBF:
1035
+ # Exclude symbols
1036
+ illegalChars.add(char)
1037
+ elif codePoint in (0xD7, 0xF7):
1038
+ # Exclude multiplication and division symbols
1039
+ illegalChars.add(char)
1040
+ elif codePoint > 0xFF:
1041
+ # Characters beyond Latin-1
1042
+ illegalChars.add(char)
1043
+ return illegalChars
1044
+
1045
+ memberConcept = val.modelXbrl.qnameConcepts.get(pluginData.executiveOfficersMemberQn)
1046
+ if memberConcept is None:
1047
+ return
1048
+ defRelSet = val.modelXbrl.relationshipSet(tuple(LinkbaseType.DEFINITION.getArcroles()))
1049
+ labelRelSet = val.modelXbrl.relationshipSet(XbrlConst.conceptLabel)
1050
+ conceptsLabelsToCheck = {memberConcept}.union(
1051
+ {rel.toModelObject for rel in defRelSet.fromModelObject(memberConcept) if rel.toModelObject is not None}
1052
+ )
1053
+ for concept in conceptsLabelsToCheck:
1054
+ for labelRel in labelRelSet.fromModelObject(concept):
1055
+ label = labelRel.toModelObject
1056
+ if label is None or label.textValue is None:
1057
+ continue
1058
+
1059
+ # Check Japanese labels
1060
+ if label.xmlLang in JAPAN_LANGUAGE_CODES:
1061
+ illegalChars = getIllegalCharsJapanese(label.textValue)
1062
+ if illegalChars:
1063
+ yield Validation.warning(
1064
+ codes='EDINET.EC8073W',
1065
+ msg=_("The concept: %(concept)s has a %(role)s label which contains characters that are not "
1066
+ "allowed. Label: %(label)s, disallowed characters: %(characters)s"),
1067
+ concept=concept.qname.localName,
1068
+ role=label.role,
1069
+ label=label.textValue,
1070
+ characters=list(illegalChars)
1071
+ )
1072
+
1073
+ # Check English labels
1074
+ elif label.xmlLang == 'en':
1075
+ illegalChars = getIllegalCharsEnglish(label.textValue)
1076
+ if illegalChars:
1077
+ yield Validation.warning(
1078
+ codes='EDINET.EC8074W',
1079
+ msg=_("The concept: %(concept)s has a %(role)s label which contains characters that are not "
1080
+ "allowed. Label: %(label)s, disallowed characters: %(characters)s"),
1081
+ concept=concept.qname.localName,
1082
+ role=label.role,
1083
+ label=label.textValue,
1084
+ characters=sorted(illegalChars)
1085
+ )
1086
+
1087
+
1088
+ @validation(
1089
+ hook=ValidationHook.XBRL_FINALLY,
1090
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1091
+ )
1092
+ def rule_EC8075W(
1093
+ pluginData: PluginValidationDataExtension,
1094
+ val: ValidateXbrl,
1095
+ *args: Any,
1096
+ **kwargs: Any,
1097
+ ) -> Iterable[Validation]:
1098
+ """
1099
+ EDINET.EC8075W: The percentage of female executives has not been tagged in detail. Ensure that there is
1100
+ a nonnil value disclosed for jpcrp_cor:RatioOfFemaleDirectorsAndOtherOfficers.
1101
+ """
1102
+ if pluginData.isCorporateForm(val.modelXbrl):
1103
+ if not pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.ratioOfFemaleDirectorsAndOtherOfficersQn):
1104
+ yield Validation.warning(
1105
+ codes='EDINET.EC8075W',
1106
+ msg=_("The percentage of female executives has not been tagged in detail."),
1107
+ )
1108
+
1109
+
1110
+ @validation(
1111
+ hook=ValidationHook.XBRL_FINALLY,
1112
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1113
+ )
1114
+ def rule_EC8076W(
1115
+ pluginData: PluginValidationDataExtension,
1116
+ val: ValidateXbrl,
1117
+ *args: Any,
1118
+ **kwargs: Any,
1119
+ ) -> Iterable[Validation]:
1120
+ """
1121
+ EDINET.EC8076W: "Issued Shares, Total Number of Shares, etc. [Text Block]" (IssuedSharesTotalNumberOfSharesEtcTextBlock) is not tagged.
1122
+ Applies to forms 3 and 4.
1123
+ """
1124
+ if pluginData.isStockForm(val.modelXbrl) and pluginData.isCorporateReport(val.modelXbrl):
1125
+ if not pluginData.hasValidNonNilFact(val.modelXbrl, pluginData.issuedSharesTotalNumberOfSharesEtcQn):
1126
+ yield Validation.warning(
1127
+ codes='EDINET.EC8076W',
1128
+ msg=_('"Issued Shares, Total Number of Shares, etc. [Text Block]" (IssuedSharesTotalNumberOfSharesEtcTextBlock) is not tagged.'),
1129
+ )
1130
+
1131
+
1132
+ @validation(
1133
+ hook=ValidationHook.COMPLETE,
1134
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1135
+ )
1136
+ def rule_EC8038W(
1137
+ pluginData: ControllerPluginData,
1138
+ cntlr: Cntlr,
1139
+ fileSource: FileSource,
1140
+ *args: Any,
1141
+ **kwargs: Any,
1142
+ ) -> Iterable[Validation]:
1143
+ """
1144
+ EDINET.EC8038W: The details of the major shareholders' status have not been tagged.
1145
+ Should have facts in one of the major shareholders roles.
1146
+ """
1147
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1148
+ return
1149
+
1150
+ roleUris = (
1151
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_MajorShareholders-01',
1152
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_MajorShareholders-02',
1153
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_MajorShareholders-01',
1154
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_MajorShareholders-02',
1155
+ )
1156
+ for modelXbrl in pluginData.loadedModelXbrls:
1157
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1158
+ return
1159
+
1160
+ yield Validation.warning(
1161
+ codes='EDINET.EC8038W',
1162
+ msg=_("The details of the major shareholders' status have not been tagged. "
1163
+ "Please provide detailed tagging of the status of major shareholders."),
1164
+ )
1165
+
1166
+
1167
+ @validation(
1168
+ hook=ValidationHook.COMPLETE,
1169
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1170
+ )
1171
+ def rule_EC8039W(
1172
+ pluginData: ControllerPluginData,
1173
+ cntlr: Cntlr,
1174
+ fileSource: FileSource,
1175
+ *args: Any,
1176
+ **kwargs: Any,
1177
+ ) -> Iterable[Validation]:
1178
+ """
1179
+ EDINET.EC8039W: The consolidated balance sheet details have not been tagged.
1180
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is TRUE and AccountingStandardsDEI is "Japan GAAP",
1181
+ then a BS must exist using one of the specified roles.
1182
+ """
1183
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1184
+ return
1185
+
1186
+ if pluginData.isConsolidated() != True:
1187
+ return
1188
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1189
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1190
+ return
1191
+
1192
+ roleUris = (
1193
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedBalanceSheet',
1194
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedBalanceSheet',
1195
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedBalanceSheet',
1196
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedBalanceSheet',
1197
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualConsolidatedBalanceSheet',
1198
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualConsolidatedBalanceSheet',
1199
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyConsolidatedBalanceSheet',
1200
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyConsolidatedBalanceSheet',
1201
+ )
1202
+
1203
+ for modelXbrl in pluginData.loadedModelXbrls:
1204
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1205
+ return
1206
+
1207
+ yield Validation.warning(
1208
+ codes='EDINET.EC8039W',
1209
+ msg=_("The consolidated balance sheet details have not been tagged. "
1210
+ "Please provide detailed tagging of the consolidated balance sheet. "
1211
+ "If you do not provide a consolidated balance sheet, please confirm that "
1212
+ 'the "Consolidated Financial Statements" field in the DEI information is correct.'),
1213
+ )
1214
+
1215
+
1216
+ @validation(
1217
+ hook=ValidationHook.COMPLETE,
1218
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1219
+ )
1220
+ def rule_EC8040W(
1221
+ pluginData: ControllerPluginData,
1222
+ cntlr: Cntlr,
1223
+ fileSource: FileSource,
1224
+ *args: Any,
1225
+ **kwargs: Any,
1226
+ ) -> Iterable[Validation]:
1227
+ """
1228
+ EDINET.EC8040W: Balance sheet details not tagged.
1229
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is FALSE and AccountingStandardsDEI is "Japan GAAP",
1230
+ then a BS must exist using one of the specified roles.
1231
+ """
1232
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1233
+ return
1234
+
1235
+ if pluginData.isConsolidated() != False:
1236
+ return
1237
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1238
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1239
+ return
1240
+
1241
+ roleUris = (
1242
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_BalanceSheet',
1243
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_BalanceSheet',
1244
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualBalanceSheet',
1245
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualBalanceSheet',
1246
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualBalanceSheet',
1247
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualBalanceSheet',
1248
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyBalanceSheet',
1249
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyBalanceSheet',
1250
+ )
1251
+
1252
+ for modelXbrl in pluginData.loadedModelXbrls:
1253
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1254
+ return
1255
+
1256
+ yield Validation.warning(
1257
+ codes='EDINET.EC8040W',
1258
+ msg=_("Balance sheet details not tagged. Please tag the balance sheet in detail."),
1259
+ )
1260
+
1261
+
1262
+ @validation(
1263
+ hook=ValidationHook.COMPLETE,
1264
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1265
+ )
1266
+ def rule_EC8041W(
1267
+ pluginData: ControllerPluginData,
1268
+ cntlr: Cntlr,
1269
+ fileSource: FileSource,
1270
+ *args: Any,
1271
+ **kwargs: Any,
1272
+ ) -> Iterable[Validation]:
1273
+ """
1274
+ EDINET.EC8041W: The consolidated income statement has not been tagged in detail.
1275
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is TRUE and AccountingStandardsDEI is "Japan GAAP",
1276
+ then an IS must exist using one of the specified roles.
1277
+ """
1278
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1279
+ return
1280
+
1281
+ if pluginData.isConsolidated() != True:
1282
+ return
1283
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1284
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1285
+ return
1286
+
1287
+ roleUris = (
1288
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedStatementOfIncome',
1289
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedStatementOfIncome',
1290
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedStatementOfIncome',
1291
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedStatementOfIncome',
1292
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualConsolidatedStatementOfIncome',
1293
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualConsolidatedStatementOfIncome',
1294
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_YearToQuarterEndConsolidatedStatementOfIncome',
1295
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_YearToQuarterEndConsolidatedStatementOfIncome',
1296
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterPeriodConsolidatedStatementOfIncome',
1297
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterPeriodConsolidatedStatementOfIncome',
1298
+ )
1299
+
1300
+ for modelXbrl in pluginData.loadedModelXbrls:
1301
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1302
+ return
1303
+
1304
+ yield Validation.warning(
1305
+ codes='EDINET.EC8041W',
1306
+ msg=_("The consolidated income statement has not been tagged in detail. "
1307
+ "Please provide detailed tagging for the consolidated income statement. "
1308
+ "If you do not provide a consolidated income statement, please confirm that "
1309
+ 'the "Consolidated Financial Statements" field in the DEI information is correct.'),
1310
+ )
1311
+
1312
+
1313
+ @validation(
1314
+ hook=ValidationHook.COMPLETE,
1315
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1316
+ )
1317
+ def rule_EC8042W(
1318
+ pluginData: ControllerPluginData,
1319
+ cntlr: Cntlr,
1320
+ fileSource: FileSource,
1321
+ *args: Any,
1322
+ **kwargs: Any,
1323
+ ) -> Iterable[Validation]:
1324
+ """
1325
+ EDINET.EC8042W: The income statement details are not tagged.
1326
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is FALSE and AccountingStandardsDEI is "Japan GAAP",
1327
+ then an IS must exist using one of the specified roles.
1328
+ """
1329
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1330
+ return
1331
+
1332
+ if pluginData.isConsolidated() != False:
1333
+ return
1334
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1335
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1336
+ return
1337
+
1338
+ roleUris = (
1339
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfIncome',
1340
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfIncome',
1341
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfIncome',
1342
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfIncome',
1343
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualStatementOfIncome',
1344
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualStatementOfIncome',
1345
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_YearToQuarterEndStatementOfIncome',
1346
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_YearToQuarterEndStatementOfIncome',
1347
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterPeriodStatementOfIncome',
1348
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterPeriodStatementOfIncome',
1349
+ )
1350
+
1351
+ for modelXbrl in pluginData.loadedModelXbrls:
1352
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1353
+ return
1354
+
1355
+ yield Validation.warning(
1356
+ codes='EDINET.EC8042W',
1357
+ msg=_("The income statement details are not tagged. "
1358
+ "Please provide detailed tagging of your income statement."),
1359
+ )
1360
+
1361
+
1362
+ @validation(
1363
+ hook=ValidationHook.COMPLETE,
1364
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1365
+ )
1366
+ def rule_EC8043W(
1367
+ pluginData: ControllerPluginData,
1368
+ cntlr: Cntlr,
1369
+ fileSource: FileSource,
1370
+ *args: Any,
1371
+ **kwargs: Any,
1372
+ ) -> Iterable[Validation]:
1373
+ """
1374
+ EDINET.EC8043W: The profit and loss statement has not been tagged in detail.
1375
+ If AccountingStandardsDEI = "Japan GAAP" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "false",
1376
+ then a P&L must exist using one of the specified roles.
1377
+ """
1378
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1379
+ return
1380
+
1381
+ if pluginData.isConsolidated() != False:
1382
+ return
1383
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1384
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1385
+ return
1386
+
1387
+ roleUris = (
1388
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfIncomeAndRetainedEarnings',
1389
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfIncomeAndRetainedEarnings',
1390
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfIncomeAndRetainedEarnings',
1391
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfIncomeAndRetainedEarnings',
1392
+ )
1393
+
1394
+ for modelXbrl in pluginData.loadedModelXbrls:
1395
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1396
+ return
1397
+
1398
+ yield Validation.warning(
1399
+ codes='EDINET.EC8043W',
1400
+ msg=_("The profit and loss statement has not been tagged in detail. "
1401
+ "Please provide detailed tagging of the profit and loss and retained earnings statement."),
1402
+ )
1403
+
1404
+
1405
+ @validation(
1406
+ hook=ValidationHook.COMPLETE,
1407
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1408
+ )
1409
+ def rule_EC8044W(
1410
+ pluginData: ControllerPluginData,
1411
+ cntlr: Cntlr,
1412
+ fileSource: FileSource,
1413
+ *args: Any,
1414
+ **kwargs: Any,
1415
+ ) -> Iterable[Validation]:
1416
+ """
1417
+ EDINET.EC8044W: The consolidated statement of changes in equity has not been detailed.
1418
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is TRUE and AccountingStandardsDEI is "Japan GAAP",
1419
+ then an Equity Statement must exist using one of the specified roles.
1420
+ """
1421
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1422
+ return
1423
+
1424
+ if pluginData.isConsolidated() != True:
1425
+ return
1426
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1427
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1428
+ return
1429
+
1430
+ roleUris = (
1431
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedStatementOfChangesInEquity',
1432
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedStatementOfChangesInEquity',
1433
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedStatementOfChangesInNetAssets',
1434
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedStatementOfChangesInNetAssets',
1435
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedStatementOfChangesInEquity',
1436
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedStatementOfChangesInEquity',
1437
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedStatementOfChangesInNetAssets',
1438
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedStatementOfChangesInNetAssets',
1439
+ )
1440
+
1441
+ for modelXbrl in pluginData.loadedModelXbrls:
1442
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1443
+ return
1444
+
1445
+ yield Validation.warning(
1446
+ codes='EDINET.EC8044W',
1447
+ msg=_("The consolidated statement of changes in equity has not been detailed. "
1448
+ "Please tag the details of the consolidated statement of changes in equity. "
1449
+ "If you do not include a consolidated statement of changes in equity, please confirm that "
1450
+ 'the "Consolidated Financial Statements" field in the DEI information is correct.'),
1451
+ )
1452
+
1453
+
1454
+ @validation(
1455
+ hook=ValidationHook.COMPLETE,
1456
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1457
+ )
1458
+ def rule_EC8045W(
1459
+ pluginData: ControllerPluginData,
1460
+ cntlr: Cntlr,
1461
+ fileSource: FileSource,
1462
+ *args: Any,
1463
+ **kwargs: Any,
1464
+ ) -> Iterable[Validation]:
1465
+ """
1466
+ EDINET.EC8045W: The statement of changes in equity has not been tagged in detail.
1467
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is FALSE and AccountingStandardsDEI is "Japan GAAP",
1468
+ then an Equity Statement must exist using one of the specified roles.
1469
+ """
1470
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1471
+ return
1472
+
1473
+ if pluginData.isConsolidated() != False:
1474
+ return
1475
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1476
+ if accountingStandard != AccountingStandard.JAPAN_GAAP.value:
1477
+ return
1478
+
1479
+ roleUris = (
1480
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfChangesInEquity',
1481
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfChangesInEquity',
1482
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfChangesInNetAssets',
1483
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfChangesInNetAssets',
1484
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfChangesInEquity',
1485
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfChangesInEquity',
1486
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfChangesInNetAssets',
1487
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfChangesInNetAssets',
1488
+ )
1489
+
1490
+ for modelXbrl in pluginData.loadedModelXbrls:
1491
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1492
+ return
1493
+
1494
+ yield Validation.warning(
1495
+ codes='EDINET.EC8045W',
1496
+ msg=_("The statement of changes in equity has not been tagged in detail. "
1497
+ "Please provide detailed tagging for the Statement of Changes in Equity."),
1498
+ )
1499
+
1500
+
1501
+ @validation(
1502
+ hook=ValidationHook.COMPLETE,
1503
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1504
+ )
1505
+ def rule_EC8046W(
1506
+ pluginData: ControllerPluginData,
1507
+ cntlr: Cntlr,
1508
+ fileSource: FileSource,
1509
+ *args: Any,
1510
+ **kwargs: Any,
1511
+ ) -> Iterable[Validation]:
1512
+ """
1513
+ EDINET.EC8046W: The statement of changes in unitholders' equity has not been tagged in detail.
1514
+ If industry code is "inv", then facts must exist in one of the specified roles.
1515
+ """
1516
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1517
+ return
1518
+
1519
+ industryCodeConsolidated = pluginData.getDeiValue('IndustryCodeWhenConsolidatedFinancialStatementsArePreparedInAccordanceWithIndustrySpecificRegulationsDEI')
1520
+ industryCodeNonConsolidated = pluginData.getDeiValue('IndustryCodeWhenFinancialStatementsArePreparedInAccordanceWithIndustrySpecificRegulationsDEI')
1521
+
1522
+ if industryCodeConsolidated != 'INV' and industryCodeNonConsolidated != 'INV':
1523
+ return
1524
+
1525
+ roleUris = (
1526
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfUnitholdersEquity',
1527
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfUnitholdersEquity',
1528
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfUnitholdersEquity',
1529
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfUnitholdersEquity',
1530
+ )
1531
+
1532
+ for modelXbrl in pluginData.loadedModelXbrls:
1533
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1534
+ return
1535
+
1536
+ yield Validation.warning(
1537
+ codes='EDINET.EC8046W',
1538
+ msg=_("The statement of changes in unitholders' equity has not been tagged in detail. "
1539
+ "Please provide detailed tagging for the Statement of Changes in Unitholders' Equity."),
1540
+ )
1541
+
1542
+
1543
+ @validation(
1544
+ hook=ValidationHook.COMPLETE,
1545
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1546
+ )
1547
+ def rule_EC8047W(
1548
+ pluginData: ControllerPluginData,
1549
+ cntlr: Cntlr,
1550
+ fileSource: FileSource,
1551
+ *args: Any,
1552
+ **kwargs: Any,
1553
+ ) -> Iterable[Validation]:
1554
+ """
1555
+ EDINET.EC8047W: The statement of changes in employee capital etc. has not been tagged in detail.
1556
+ If industry code is "liq", then facts must exist in one of the specified roles.
1557
+ """
1558
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1559
+ return
1560
+
1561
+ industryCodeConsolidated = pluginData.getDeiValue('IndustryCodeWhenConsolidatedFinancialStatementsArePreparedInAccordanceWithIndustrySpecificRegulationsDEI')
1562
+ industryCodeNonConsolidated = pluginData.getDeiValue('IndustryCodeWhenFinancialStatementsArePreparedInAccordanceWithIndustrySpecificRegulationsDEI')
1563
+
1564
+ if industryCodeConsolidated != 'LIQ' and industryCodeNonConsolidated != 'LIQ':
1565
+ return
1566
+
1567
+ roleUris = (
1568
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfMembersEquity',
1569
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfMembersEquity',
1570
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfMembersEquity',
1571
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfMembersEquity',
1572
+ )
1573
+
1574
+ for modelXbrl in pluginData.loadedModelXbrls:
1575
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1576
+ return
1577
+
1578
+ yield Validation.warning(
1579
+ codes='EDINET.EC8047W',
1580
+ msg=_("The statement of changes in employee capital etc. has not been tagged in detail. "
1581
+ "Please provide detailed tagging for the Statement of Changes in Employee Capital, etc."),
1582
+ )
1583
+
1584
+
1585
+ @validation(
1586
+ hook=ValidationHook.COMPLETE,
1587
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1588
+ )
1589
+ def rule_EC8048W(
1590
+ pluginData: ControllerPluginData,
1591
+ cntlr: Cntlr,
1592
+ fileSource: FileSource,
1593
+ *args: Any,
1594
+ **kwargs: Any,
1595
+ ) -> Iterable[Validation]:
1596
+ """
1597
+ EDINET.EC8048W: The consolidated cash flow statement is not detailed.
1598
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is TRUE, then an SCF must exist using one of the specified roles.
1599
+ """
1600
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1601
+ return
1602
+
1603
+ if pluginData.isConsolidated() != True:
1604
+ return
1605
+
1606
+ roleUris = (
1607
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedStatementOfCashFlows-direct',
1608
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedStatementOfCashFlows-direct',
1609
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedStatementOfCashFlows-direct',
1610
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedStatementOfCashFlows-direct',
1611
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualConsolidatedStatementOfCashFlows-direct',
1612
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualConsolidatedStatementOfCashFlows-direct',
1613
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyConsolidatedStatementOfCashFlows-direct',
1614
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyConsolidatedStatementOfCashFlows-direct',
1615
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_ConsolidatedStatementOfCashFlows-indirect',
1616
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_ConsolidatedStatementOfCashFlows-indirect',
1617
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualConsolidatedStatementOfCashFlows-indirect',
1618
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualConsolidatedStatementOfCashFlows-indirect',
1619
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualConsolidatedStatementOfCashFlows-indirect',
1620
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualConsolidatedStatementOfCashFlows-indirect',
1621
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyConsolidatedStatementOfCashFlows-indirect',
1622
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyConsolidatedStatementOfCashFlows-indirect',
1623
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_ConsolidatedStatementOfCashFlowsIFRS',
1624
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_ConsolidatedStatementOfCashFlowsIFRS',
1625
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualConsolidatedStatementOfCashFlowsIFRS',
1626
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyConsolidatedStatementOfCashFlowsIFRS',
1627
+ )
1628
+
1629
+ for modelXbrl in pluginData.loadedModelXbrls:
1630
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1631
+ return
1632
+
1633
+ yield Validation.warning(
1634
+ codes='EDINET.EC8048W',
1635
+ msg=_("The consolidated cash flow statement is not detailed. "
1636
+ "Please tag the details of the consolidated cash flow statement. "
1637
+ "If you do not provide a consolidated cash flow statement, please make sure that "
1638
+ 'the "Consolidated Financial Statements" in the DEI information is correct.'),
1639
+ )
1640
+
1641
+
1642
+ @validation(
1643
+ hook=ValidationHook.COMPLETE,
1644
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1645
+ )
1646
+ def rule_EC8049W(
1647
+ pluginData: ControllerPluginData,
1648
+ cntlr: Cntlr,
1649
+ fileSource: FileSource,
1650
+ *args: Any,
1651
+ **kwargs: Any,
1652
+ ) -> Iterable[Validation]:
1653
+ """
1654
+ EDINET.EC8049W: The cash flow statement is not tagged in detail.
1655
+ If WhetherConsolidatedFinancialStatementsArePreparedDEI is FALSE, then an SCF must exist using one of the specified roles.
1656
+ """
1657
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1658
+ return
1659
+
1660
+ if pluginData.isConsolidated() != False:
1661
+ return
1662
+
1663
+ roleUris = (
1664
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfCashFlows-direct',
1665
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfCashFlows-direct',
1666
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfCashFlows-direct',
1667
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfCashFlows-direct',
1668
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualStatementOfCashFlows-direct',
1669
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualStatementOfCashFlows-direct',
1670
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyStatementOfCashFlows-direct',
1671
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyStatementOfCashFlows-direct',
1672
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_StatementOfCashFlows-indirect',
1673
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_StatementOfCashFlows-indirect',
1674
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_SemiAnnualStatementOfCashFlows-indirect',
1675
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_SemiAnnualStatementOfCashFlows-indirect',
1676
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_Type1SemiAnnualStatementOfCashFlows-indirect',
1677
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_Type1SemiAnnualStatementOfCashFlows-indirect',
1678
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_QuarterlyStatementOfCashFlows-indirect',
1679
+ 'http://disclosure.edinet-fsa.go.jp/role/jppfs/rol_std_QuarterlyStatementOfCashFlows-indirect',
1680
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_StatementOfCashFlowsIFRS',
1681
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualStatementOfCashFlowsIFRS',
1682
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyStatementOfCashFlowsIFRS',
1683
+ )
1684
+
1685
+ for modelXbrl in pluginData.loadedModelXbrls:
1686
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1687
+ return
1688
+
1689
+ yield Validation.warning(
1690
+ codes='EDINET.EC8049W',
1691
+ msg=_("The cash flow statement is not tagged in detail. "
1692
+ "Please provide detailed tagging for the cash flow statement. "
1693
+ "If you do not provide a cash flow statement, please provide the DEI information with "
1694
+ '"Whether or not consolidated financial statements are provided."'),
1695
+ )
1696
+
1697
+
1698
+ @validation(
1699
+ hook=ValidationHook.COMPLETE,
1700
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1701
+ )
1702
+ def rule_EC8050W(
1703
+ pluginData: ControllerPluginData,
1704
+ cntlr: Cntlr,
1705
+ fileSource: FileSource,
1706
+ *args: Any,
1707
+ **kwargs: Any,
1708
+ ) -> Iterable[Validation]:
1709
+ """
1710
+ EDINET.EC8050W: Segment information is not tagged in detail.
1711
+ Based on AccountingStandardsDEI, segment information with ReportableSegmentsMember must exist.
1712
+ """
1713
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT, }):
1714
+ return
1715
+
1716
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1717
+ if accountingStandard == AccountingStandard.JAPAN_GAAP.value:
1718
+ roleUris: tuple[str, ...] = (
1719
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-01',
1720
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-02',
1721
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-03',
1722
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-01',
1723
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-02',
1724
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-03',
1725
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-01',
1726
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-02',
1727
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-03',
1728
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-04',
1729
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-05',
1730
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-06',
1731
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-07',
1732
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-08',
1733
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualFinancialStatements-09',
1734
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-01',
1735
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-02',
1736
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-03',
1737
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-04',
1738
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-05',
1739
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-06',
1740
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-07',
1741
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-08',
1742
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-09',
1743
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyFinancialStatements-01',
1744
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyFinancialStatements-02',
1745
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyFinancialStatements-03',
1746
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-01',
1747
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-02',
1748
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-03',
1749
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-01',
1750
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-02',
1751
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-03',
1752
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-04',
1753
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-05',
1754
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-06',
1755
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-07',
1756
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-08',
1757
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcFinancialStatements-09',
1758
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-01',
1759
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-02',
1760
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-03',
1761
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-04',
1762
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-05',
1763
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-06',
1764
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-07',
1765
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-08',
1766
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_std_NotesSegmentInformationEtcConsolidatedFinancialStatements-09',
1767
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-01',
1768
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-02',
1769
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualFinancialStatements-03',
1770
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-01',
1771
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-02',
1772
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcType1SemiAnnualConsolidatedFinancialStatements-03',
1773
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-01',
1774
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-02',
1775
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-03',
1776
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-04',
1777
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-05',
1778
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-06',
1779
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-07',
1780
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-08',
1781
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualFinancialStatements-09',
1782
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-01',
1783
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-02',
1784
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-03',
1785
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-04',
1786
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-05',
1787
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-06',
1788
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-07',
1789
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-08',
1790
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcSemiAnnualConsolidatedFinancialStatements-09',
1791
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyFinancialStatements-01',
1792
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyFinancialStatements-02',
1793
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyFinancialStatements-03',
1794
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-01',
1795
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-02',
1796
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcQuarterlyConsolidatedFinancialStatements-03',
1797
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-01',
1798
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-02',
1799
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-03',
1800
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-04',
1801
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-05',
1802
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-06',
1803
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-07',
1804
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-08',
1805
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcFinancialStatements-09',
1806
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-01',
1807
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-02',
1808
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-03',
1809
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-04',
1810
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-05',
1811
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-06',
1812
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-07',
1813
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-08',
1814
+ 'http://disclosure.edinet-fsa.go.jp/role/jpcrp/rol_NotesSegmentInformationEtcConsolidatedFinancialStatements-09',
1815
+ )
1816
+ elif accountingStandard == AccountingStandard.IFRS.value:
1817
+ roleUris = (
1818
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-01',
1819
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-02',
1820
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-03',
1821
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationFinancialStatementsIFRS-01',
1822
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationFinancialStatementsIFRS-02',
1823
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationFinancialStatementsIFRS-03',
1824
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-01',
1825
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-02',
1826
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationConsolidatedFinancialStatementsIFRS-03',
1827
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualFinancialStatementsIFRS-01',
1828
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualFinancialStatementsIFRS-02',
1829
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualFinancialStatementsIFRS-03',
1830
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualConsolidatedFinancialStatementsIFRS-01',
1831
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualConsolidatedFinancialStatementsIFRS-02',
1832
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedSemiAnnualConsolidatedFinancialStatementsIFRS-03',
1833
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyFinancialStatementsIFRS-01',
1834
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyFinancialStatementsIFRS-02',
1835
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyFinancialStatementsIFRS-03',
1836
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyConsolidatedFinancialStatementsIFRS-01',
1837
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyConsolidatedFinancialStatementsIFRS-02',
1838
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_NotesSegmentInformationCondensedQuarterlyConsolidatedFinancialStatementsIFRS-03',
1839
+ )
1840
+ else:
1841
+ return
1842
+
1843
+ reportableSegmentsMemberQn = qname(pluginData.namespaces.jpcrp, "ReportableSegmentsMember")
1844
+
1845
+ def _getConceptAndDescendantQNames(
1846
+ modelXbrl: ModelXbrl,
1847
+ concept: ModelConcept,
1848
+ relSet: ModelRelationshipSet,
1849
+ ) -> Iterable[QName]:
1850
+ # This is crude (doesn't handle target roles), but appears to be good enough for EDINET.
1851
+ if concept.qname is None:
1852
+ return
1853
+ yield concept.qname
1854
+ for rel in relSet.fromModelObject(concept):
1855
+ if isinstance(rel.toModelObject, ModelConcept):
1856
+ yield from _getConceptAndDescendantQNames(modelXbrl, rel.toModelObject, relSet)
1857
+
1858
+ for modelXbrl in pluginData.loadedModelXbrls:
1859
+ reportableSegmentsMember = modelXbrl.qnameConcepts.get(reportableSegmentsMemberQn)
1860
+ if reportableSegmentsMember is None:
1861
+ continue
1862
+ for roleUri in roleUris:
1863
+ domainMemberRelSet = modelXbrl.relationshipSet(XbrlConst.domainMember, roleUri)
1864
+ members = set(_getConceptAndDescendantQNames(modelXbrl, reportableSegmentsMember, domainMemberRelSet))
1865
+ if members and hasPresentationalConceptsWithFacts(modelXbrl, [roleUri], members):
1866
+ return
1867
+
1868
+ yield Validation.warning(
1869
+ codes='EDINET.EC8050W',
1870
+ msg=_("Segment information is not tagged in detail. "
1871
+ "Please provide detailed tagging of segment information."),
1872
+ )
1873
+
1874
+
1875
+ @validation(
1876
+ hook=ValidationHook.COMPLETE,
1877
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1878
+ )
1879
+ def rule_EC8061W(
1880
+ pluginData: ControllerPluginData,
1881
+ cntlr: Cntlr,
1882
+ fileSource: FileSource,
1883
+ *args: Any,
1884
+ **kwargs: Any,
1885
+ ) -> Iterable[Validation]:
1886
+ """
1887
+ EDINET.EC8061W: The consolidated statement of financial position has not been tagged in detail.
1888
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "true",
1889
+ then a section must exist using one of the specified roles.
1890
+ """
1891
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1892
+ return
1893
+
1894
+ if pluginData.isConsolidated() != True:
1895
+ return
1896
+
1897
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1898
+ if accountingStandard != AccountingStandard.IFRS.value:
1899
+ return
1900
+
1901
+ roleUris = (
1902
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_ConsolidatedStatementOfFinancialPositionIFRS',
1903
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_ConsolidatedStatementOfFinancialPositionIFRS',
1904
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualConsolidatedStatementOfFinancialPositionIFRS',
1905
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyConsolidatedStatementOfFinancialPositionIFRS',
1906
+ )
1907
+
1908
+ for modelXbrl in pluginData.loadedModelXbrls:
1909
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1910
+ return
1911
+
1912
+ yield Validation.warning(
1913
+ codes='EDINET.EC8061W',
1914
+ msg=_("The consolidated statement of financial position has not been tagged in detail. "
1915
+ "Please provide a detailed tag for the consolidated statement of financial position. "
1916
+ "If you do not provide a consolidated statement of financial position, please confirm that "
1917
+ 'the "Consolidated Financial Statements" field in the DEI information is correct.'),
1918
+ )
1919
+
1920
+
1921
+ @validation(
1922
+ hook=ValidationHook.COMPLETE,
1923
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1924
+ )
1925
+ def rule_EC8063W(
1926
+ pluginData: ControllerPluginData,
1927
+ cntlr: Cntlr,
1928
+ fileSource: FileSource,
1929
+ *args: Any,
1930
+ **kwargs: Any,
1931
+ ) -> Iterable[Validation]:
1932
+ """
1933
+ EDINET.EC8063W: The statement of financial position has not been tagged in detail.
1934
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "false",
1935
+ then a section must exist using one of the specified roles.
1936
+ """
1937
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1938
+ return
1939
+
1940
+ if pluginData.isConsolidated() != False:
1941
+ return
1942
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1943
+ if accountingStandard != AccountingStandard.IFRS.value:
1944
+ return
1945
+
1946
+ roleUris = (
1947
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_StatementOfFinancialPositionIFRS',
1948
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualStatementOfFinancialPositionIFRS',
1949
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyStatementOfFinancialPositionIFRS',
1950
+ )
1951
+
1952
+ for modelXbrl in pluginData.loadedModelXbrls:
1953
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1954
+ return
1955
+
1956
+ yield Validation.warning(
1957
+ codes='EDINET.EC8063W',
1958
+ msg=_("The statement of financial position has not been tagged in detail. "
1959
+ "Please provide detailed tagging of the statement of financial position."),
1960
+ )
1961
+
1962
+
1963
+ @validation(
1964
+ hook=ValidationHook.COMPLETE,
1965
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
1966
+ )
1967
+ def rule_EC8065W(
1968
+ pluginData: ControllerPluginData,
1969
+ cntlr: Cntlr,
1970
+ fileSource: FileSource,
1971
+ *args: Any,
1972
+ **kwargs: Any,
1973
+ ) -> Iterable[Validation]:
1974
+ """
1975
+ EDINET.EC8065W: The consolidated statement of comprehensive income has not been tagged in detail.
1976
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "true",
1977
+ then a section must exist using one of the specified roles.
1978
+ """
1979
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
1980
+ return
1981
+
1982
+ if pluginData.isConsolidated() != True:
1983
+ return
1984
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
1985
+ if accountingStandard != AccountingStandard.IFRS.value:
1986
+ return
1987
+
1988
+ roleUris = (
1989
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_ConsolidatedStatementOfComprehensiveIncomeSingleStatementIFRS',
1990
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualConsolidatedStatementOfComprehensiveIncomeSingleStatementIFRS',
1991
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedYearToQuarterEndConsolidatedStatementOfComprehensiveIncomeSingleStatementIFRS',
1992
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterPeriodConsolidatedStatementOfComprehensiveIncomeSingleStatementIFRS',
1993
+ )
1994
+
1995
+ for modelXbrl in pluginData.loadedModelXbrls:
1996
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
1997
+ return
1998
+
1999
+ yield Validation.warning(
2000
+ codes='EDINET.EC8065W',
2001
+ msg=_("The consolidated statement of comprehensive income has not been tagged in detail. "
2002
+ "Please provide detailed tagging for the consolidated statement of comprehensive income. "
2003
+ "If you do not provide a consolidated statement of comprehensive income, please confirm that "
2004
+ 'the "Consolidated Financial Statements" field in the DEI information is correct.'),
2005
+ )
2006
+
2007
+
2008
+ @validation(
2009
+ hook=ValidationHook.COMPLETE,
2010
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
2011
+ )
2012
+ def rule_EC8066W(
2013
+ pluginData: ControllerPluginData,
2014
+ cntlr: Cntlr,
2015
+ fileSource: FileSource,
2016
+ *args: Any,
2017
+ **kwargs: Any,
2018
+ ) -> Iterable[Validation]:
2019
+ """
2020
+ EDINET.EC8066W: The statement of comprehensive income has not been tagged in detail.
2021
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "false",
2022
+ then a section must exist using one of the specified roles.
2023
+ """
2024
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
2025
+ return
2026
+
2027
+ if pluginData.isConsolidated() != False:
2028
+ return
2029
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
2030
+ if accountingStandard != AccountingStandard.IFRS.value:
2031
+ return
2032
+
2033
+ roleUris = (
2034
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_StatementOfComprehensiveIncomeSingleStatementIFRS',
2035
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualStatementOfComprehensiveIncomeSingleStatementIFRS',
2036
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedYearToQuarterEndStatementOfComprehensiveIncomeSingleStatementIFRS',
2037
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterPeriodStatementOfComprehensiveIncomeSingleStatementIFRS',
2038
+ )
2039
+
2040
+ for modelXbrl in pluginData.loadedModelXbrls:
2041
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
2042
+ return
2043
+
2044
+ yield Validation.warning(
2045
+ codes='EDINET.EC8066W',
2046
+ msg=_("The statement of comprehensive income has not been tagged in detail. "
2047
+ "Please provide detailed tagging for the statement of comprehensive income."),
2048
+ )
2049
+
2050
+
2051
+ @validation(
2052
+ hook=ValidationHook.COMPLETE,
2053
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
2054
+ )
2055
+ def rule_EC8067W(
2056
+ pluginData: ControllerPluginData,
2057
+ cntlr: Cntlr,
2058
+ fileSource: FileSource,
2059
+ *args: Any,
2060
+ **kwargs: Any,
2061
+ ) -> Iterable[Validation]:
2062
+ """
2063
+ EDINET.EC8067W: The consolidated statement of changes in equity has not been tagged in detail.
2064
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "true",
2065
+ then a section must exist using one of the specified roles.
2066
+ """
2067
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
2068
+ return
2069
+
2070
+ if pluginData.isConsolidated() != True:
2071
+ return
2072
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
2073
+ if accountingStandard != AccountingStandard.IFRS.value:
2074
+ return
2075
+
2076
+ roleUris = (
2077
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyConsolidatedStatementOfChangesInEquityIFRS',
2078
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualConsolidatedStatementOfChangesInEquityIFRS',
2079
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_std_ConsolidatedStatementOfChangesInEquityIFRS',
2080
+ )
2081
+
2082
+ for modelXbrl in pluginData.loadedModelXbrls:
2083
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
2084
+ return
2085
+
2086
+ yield Validation.warning(
2087
+ codes='EDINET.EC8067W',
2088
+ msg=_("The consolidated statement of changes in equity has not been tagged in detail. "
2089
+ "Please tag the details of the consolidated statement of changes in equity. "
2090
+ "If you do not include a consolidated statement of changes in equity, please confirm that "
2091
+ 'the "Consolidated" field in the DEI information is correct.'),
2092
+ )
2093
+
2094
+
2095
+ @validation(
2096
+ hook=ValidationHook.COMPLETE,
2097
+ disclosureSystems=[DISCLOSURE_SYSTEM_EDINET],
2098
+ )
2099
+ def rule_EC8068W(
2100
+ pluginData: ControllerPluginData,
2101
+ cntlr: Cntlr,
2102
+ fileSource: FileSource,
2103
+ *args: Any,
2104
+ **kwargs: Any,
2105
+ ) -> Iterable[Validation]:
2106
+ """
2107
+ EDINET.EC8068W: The statement of changes in equity is not tagged in detail.
2108
+ If AccountingStandardsDEI = "IFRS" and WhetherConsolidatedFinancialStatementsArePreparedDEI = "false",
2109
+ then a section must exist using one of the specified roles.
2110
+ """
2111
+ if not pluginData.hasDocumentType({DocumentType.ANNUAL_SECURITIES_REPORT, DocumentType.SEMI_ANNUAL_REPORT}):
2112
+ return
2113
+
2114
+ if pluginData.isConsolidated() != False:
2115
+ return
2116
+ accountingStandard = pluginData.getDeiValue('AccountingStandardsDEI')
2117
+ if accountingStandard != AccountingStandard.IFRS.value:
2118
+ return
2119
+
2120
+ roleUris = (
2121
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_StatementOfChangesInEquityIFRS',
2122
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedSemiAnnualStatementOfChangesInEquityIFRS',
2123
+ 'http://disclosure.edinet-fsa.go.jp/role/jpigp/rol_CondensedQuarterlyStatementOfChangesInEquityIFRS',
2124
+ )
2125
+
2126
+ for modelXbrl in pluginData.loadedModelXbrls:
2127
+ if hasPresentationalConceptsWithFacts(modelXbrl, roleUris):
2128
+ return
2129
+
2130
+ yield Validation.warning(
2131
+ codes='EDINET.EC8068W',
2132
+ msg=_("The statement of changes in equity is not tagged in detail. "
2133
+ "Please provide detailed tagging of the statement of changes in equity."),
2134
+ )