@accounter/opcn1214-generator 0.0.0-bootstrap.0 → 0.0.0-stage
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.
- package/README.md +2 -336
- package/package.json +3 -74
- package/.bob/cjs/api/generate.d.ts +0 -44
- package/.bob/cjs/api/generate.js +0 -115
- package/.bob/cjs/api/parse.d.ts +0 -28
- package/.bob/cjs/api/parse.js +0 -38
- package/.bob/cjs/api/response.d.ts +0 -24
- package/.bob/cjs/api/response.js +0 -75
- package/.bob/cjs/api/validate.d.ts +0 -16
- package/.bob/cjs/api/validate.js +0 -15
- package/.bob/cjs/codec/boolean.d.ts +0 -7
- package/.bob/cjs/codec/boolean.js +0 -49
- package/.bob/cjs/codec/date.d.ts +0 -6
- package/.bob/cjs/codec/date.js +0 -68
- package/.bob/cjs/codec/enum.d.ts +0 -4
- package/.bob/cjs/codec/enum.js +0 -26
- package/.bob/cjs/codec/numeric.d.ts +0 -56
- package/.bob/cjs/codec/numeric.js +0 -186
- package/.bob/cjs/codec/padding.d.ts +0 -10
- package/.bob/cjs/codec/padding.js +0 -26
- package/.bob/cjs/codec/percent.d.ts +0 -6
- package/.bob/cjs/codec/percent.js +0 -33
- package/.bob/cjs/codec/phone.d.ts +0 -4
- package/.bob/cjs/codec/phone.js +0 -48
- package/.bob/cjs/codec/record.d.ts +0 -18
- package/.bob/cjs/codec/record.js +0 -176
- package/.bob/cjs/codec/registry.d.ts +0 -8
- package/.bob/cjs/codec/registry.js +0 -27
- package/.bob/cjs/codec/sections.d.ts +0 -41
- package/.bob/cjs/codec/sections.js +0 -177
- package/.bob/cjs/codec/text.d.ts +0 -5
- package/.bob/cjs/codec/text.js +0 -29
- package/.bob/cjs/codec/types.d.ts +0 -36
- package/.bob/cjs/codec/types.js +0 -16
- package/.bob/cjs/codec/windows1255.d.ts +0 -9
- package/.bob/cjs/codec/windows1255.js +0 -38
- package/.bob/cjs/errors.d.ts +0 -32
- package/.bob/cjs/errors.js +0 -103
- package/.bob/cjs/file/assemble.d.ts +0 -17
- package/.bob/cjs/file/assemble.js +0 -28
- package/.bob/cjs/file/control.d.ts +0 -13
- package/.bob/cjs/file/control.js +0 -45
- package/.bob/cjs/file/parse.d.ts +0 -18
- package/.bob/cjs/file/parse.js +0 -478
- package/.bob/cjs/file/split.d.ts +0 -17
- package/.bob/cjs/file/split.js +0 -71
- package/.bob/cjs/index.d.ts +0 -16
- package/.bob/cjs/index.js +0 -28
- package/.bob/cjs/layout/2024/layout.generated.d.ts +0 -6919
- package/.bob/cjs/layout/2024/layout.generated.js +0 -7224
- package/.bob/cjs/layout/2025/index.d.ts +0 -6
- package/.bob/cjs/layout/2025/index.js +0 -10
- package/.bob/cjs/layout/capital-gains.d.ts +0 -9
- package/.bob/cjs/layout/capital-gains.js +0 -15
- package/.bob/cjs/layout/countries.d.ts +0 -5
- package/.bob/cjs/layout/countries.js +0 -10
- package/.bob/cjs/layout/freeze.d.ts +0 -5
- package/.bob/cjs/layout/freeze.js +0 -16
- package/.bob/cjs/layout/registry.d.ts +0 -10
- package/.bob/cjs/layout/registry.js +0 -32
- package/.bob/cjs/layout/types.d.ts +0 -82
- package/.bob/cjs/layout/types.js +0 -35
- package/.bob/cjs/model/codes.generated.d.ts +0 -48
- package/.bob/cjs/model/codes.generated.js +0 -628
- package/.bob/cjs/model/index.d.ts +0 -3
- package/.bob/cjs/model/index.js +0 -5
- package/.bob/cjs/model/input.d.ts +0 -543
- package/.bob/cjs/model/input.js +0 -24
- package/.bob/cjs/model/normalized.d.ts +0 -43
- package/.bob/cjs/model/normalized.js +0 -0
- package/.bob/cjs/model/options.d.ts +0 -14
- package/.bob/cjs/model/options.js +0 -0
- package/.bob/cjs/model/schema.d.ts +0 -594
- package/.bob/cjs/model/schema.js +0 -339
- package/.bob/cjs/normalize/canonical.d.ts +0 -13
- package/.bob/cjs/normalize/canonical.js +0 -288
- package/.bob/cjs/normalize/capital-gains/assets.d.ts +0 -37
- package/.bob/cjs/normalize/capital-gains/assets.js +0 -94
- package/.bob/cjs/normalize/capital-gains/index.d.ts +0 -61
- package/.bob/cjs/normalize/capital-gains/index.js +0 -149
- package/.bob/cjs/normalize/capital-gains/no-withholding.d.ts +0 -18
- package/.bob/cjs/normalize/capital-gains/no-withholding.js +0 -36
- package/.bob/cjs/normalize/capital-gains/other.d.ts +0 -54
- package/.bob/cjs/normalize/capital-gains/other.js +0 -122
- package/.bob/cjs/normalize/capital-gains/section6.d.ts +0 -7
- package/.bob/cjs/normalize/capital-gains/section6.js +0 -13
- package/.bob/cjs/normalize/capital-gains/securities.d.ts +0 -26
- package/.bob/cjs/normalize/capital-gains/securities.js +0 -58
- package/.bob/cjs/normalize/denormalize.d.ts +0 -42
- package/.bob/cjs/normalize/denormalize.js +0 -359
- package/.bob/cjs/normalize/derive.d.ts +0 -57
- package/.bob/cjs/normalize/derive.js +0 -111
- package/.bob/cjs/normalize/enums.d.ts +0 -58
- package/.bob/cjs/normalize/enums.js +0 -69
- package/.bob/cjs/normalize/fields.d.ts +0 -28
- package/.bob/cjs/normalize/fields.js +0 -86
- package/.bob/cjs/normalize/foreign.d.ts +0 -22
- package/.bob/cjs/normalize/foreign.js +0 -85
- package/.bob/cjs/normalize/main.d.ts +0 -24
- package/.bob/cjs/normalize/main.js +0 -208
- package/.bob/cjs/normalize/paths.d.ts +0 -74
- package/.bob/cjs/normalize/paths.js +0 -169
- package/.bob/cjs/normalize/phone.d.ts +0 -12
- package/.bob/cjs/normalize/phone.js +0 -35
- package/.bob/cjs/normalize/rd-investments.d.ts +0 -10
- package/.bob/cjs/normalize/rd-investments.js +0 -25
- package/.bob/cjs/normalize/related-companies.d.ts +0 -10
- package/.bob/cjs/normalize/related-companies.js +0 -25
- package/.bob/cjs/normalize/report.d.ts +0 -9
- package/.bob/cjs/normalize/report.js +0 -53
- package/.bob/cjs/normalize/shareholders.d.ts +0 -10
- package/.bob/cjs/normalize/shareholders.js +0 -30
- package/.bob/cjs/normalize/text.d.ts +0 -11
- package/.bob/cjs/normalize/text.js +0 -41
- package/.bob/cjs/normalize/today.d.ts +0 -4
- package/.bob/cjs/normalize/today.js +0 -14
- package/.bob/cjs/pipeline.d.ts +0 -13
- package/.bob/cjs/pipeline.js +0 -37
- package/.bob/cjs/response/codes.d.ts +0 -2
- package/.bob/cjs/response/codes.js +0 -31
- package/.bob/cjs/validate/capital-gains-rules.d.ts +0 -6
- package/.bob/cjs/validate/capital-gains-rules.js +0 -162
- package/.bob/cjs/validate/check-digit.d.ts +0 -10
- package/.bob/cjs/validate/check-digit.js +0 -26
- package/.bob/cjs/validate/engine.d.ts +0 -5
- package/.bob/cjs/validate/engine.js +0 -35
- package/.bob/cjs/validate/field-rules.d.ts +0 -4
- package/.bob/cjs/validate/field-rules.js +0 -331
- package/.bob/cjs/validate/foreign-rules.d.ts +0 -6
- package/.bob/cjs/validate/foreign-rules.js +0 -171
- package/.bob/cjs/validate/issue.d.ts +0 -51
- package/.bob/cjs/validate/issue.js +0 -78
- package/.bob/cjs/validate/main-rules.d.ts +0 -24
- package/.bob/cjs/validate/main-rules.js +0 -425
- package/.bob/cjs/validate/parse-rules.d.ts +0 -31
- package/.bob/cjs/validate/parse-rules.js +0 -114
- package/.bob/cjs/validate/rules.d.ts +0 -746
- package/.bob/cjs/validate/rules.js +0 -680
- package/.bob/cjs/validate/shape.d.ts +0 -19
- package/.bob/cjs/validate/shape.js +0 -231
- package/.bob/cjs/validate/shareholder-rules.d.ts +0 -6
- package/.bob/cjs/validate/shareholder-rules.js +0 -83
- package/.bob/cjs/validate/structure-rules.d.ts +0 -26
- package/.bob/cjs/validate/structure-rules.js +0 -130
- package/.bob/esm/api/generate.d.ts +0 -44
- package/.bob/esm/api/generate.js +0 -111
- package/.bob/esm/api/parse.d.ts +0 -28
- package/.bob/esm/api/parse.js +0 -34
- package/.bob/esm/api/response.d.ts +0 -24
- package/.bob/esm/api/response.js +0 -72
- package/.bob/esm/api/validate.d.ts +0 -16
- package/.bob/esm/api/validate.js +0 -11
- package/.bob/esm/codec/boolean.d.ts +0 -7
- package/.bob/esm/codec/boolean.js +0 -46
- package/.bob/esm/codec/date.d.ts +0 -6
- package/.bob/esm/codec/date.js +0 -64
- package/.bob/esm/codec/enum.d.ts +0 -4
- package/.bob/esm/codec/enum.js +0 -23
- package/.bob/esm/codec/numeric.d.ts +0 -56
- package/.bob/esm/codec/numeric.js +0 -175
- package/.bob/esm/codec/padding.d.ts +0 -10
- package/.bob/esm/codec/padding.js +0 -21
- package/.bob/esm/codec/percent.d.ts +0 -6
- package/.bob/esm/codec/percent.js +0 -30
- package/.bob/esm/codec/phone.d.ts +0 -4
- package/.bob/esm/codec/phone.js +0 -45
- package/.bob/esm/codec/record.d.ts +0 -18
- package/.bob/esm/codec/record.js +0 -172
- package/.bob/esm/codec/registry.d.ts +0 -8
- package/.bob/esm/codec/registry.js +0 -23
- package/.bob/esm/codec/sections.d.ts +0 -41
- package/.bob/esm/codec/sections.js +0 -170
- package/.bob/esm/codec/text.d.ts +0 -5
- package/.bob/esm/codec/text.js +0 -26
- package/.bob/esm/codec/types.d.ts +0 -36
- package/.bob/esm/codec/types.js +0 -12
- package/.bob/esm/codec/windows1255.d.ts +0 -9
- package/.bob/esm/codec/windows1255.js +0 -32
- package/.bob/esm/errors.d.ts +0 -32
- package/.bob/esm/errors.js +0 -94
- package/.bob/esm/file/assemble.d.ts +0 -17
- package/.bob/esm/file/assemble.js +0 -25
- package/.bob/esm/file/control.d.ts +0 -13
- package/.bob/esm/file/control.js +0 -41
- package/.bob/esm/file/parse.d.ts +0 -18
- package/.bob/esm/file/parse.js +0 -474
- package/.bob/esm/file/split.d.ts +0 -17
- package/.bob/esm/file/split.js +0 -68
- package/.bob/esm/index.d.ts +0 -16
- package/.bob/esm/index.js +0 -11
- package/.bob/esm/layout/2024/layout.generated.d.ts +0 -6919
- package/.bob/esm/layout/2024/layout.generated.js +0 -7221
- package/.bob/esm/layout/2025/index.d.ts +0 -6
- package/.bob/esm/layout/2025/index.js +0 -7
- package/.bob/esm/layout/capital-gains.d.ts +0 -9
- package/.bob/esm/layout/capital-gains.js +0 -11
- package/.bob/esm/layout/countries.d.ts +0 -5
- package/.bob/esm/layout/countries.js +0 -7
- package/.bob/esm/layout/freeze.d.ts +0 -5
- package/.bob/esm/layout/freeze.js +0 -13
- package/.bob/esm/layout/registry.d.ts +0 -10
- package/.bob/esm/layout/registry.js +0 -27
- package/.bob/esm/layout/types.d.ts +0 -82
- package/.bob/esm/layout/types.js +0 -32
- package/.bob/esm/model/codes.generated.d.ts +0 -48
- package/.bob/esm/model/codes.generated.js +0 -625
- package/.bob/esm/model/index.d.ts +0 -3
- package/.bob/esm/model/index.js +0 -2
- package/.bob/esm/model/input.d.ts +0 -543
- package/.bob/esm/model/input.js +0 -21
- package/.bob/esm/model/normalized.d.ts +0 -43
- package/.bob/esm/model/normalized.js +0 -0
- package/.bob/esm/model/options.d.ts +0 -14
- package/.bob/esm/model/options.js +0 -0
- package/.bob/esm/model/schema.d.ts +0 -594
- package/.bob/esm/model/schema.js +0 -335
- package/.bob/esm/normalize/canonical.d.ts +0 -13
- package/.bob/esm/normalize/canonical.js +0 -285
- package/.bob/esm/normalize/capital-gains/assets.d.ts +0 -37
- package/.bob/esm/normalize/capital-gains/assets.js +0 -87
- package/.bob/esm/normalize/capital-gains/index.d.ts +0 -61
- package/.bob/esm/normalize/capital-gains/index.js +0 -142
- package/.bob/esm/normalize/capital-gains/no-withholding.d.ts +0 -18
- package/.bob/esm/normalize/capital-gains/no-withholding.js +0 -31
- package/.bob/esm/normalize/capital-gains/other.d.ts +0 -54
- package/.bob/esm/normalize/capital-gains/other.js +0 -112
- package/.bob/esm/normalize/capital-gains/section6.d.ts +0 -7
- package/.bob/esm/normalize/capital-gains/section6.js +0 -9
- package/.bob/esm/normalize/capital-gains/securities.d.ts +0 -26
- package/.bob/esm/normalize/capital-gains/securities.js +0 -52
- package/.bob/esm/normalize/denormalize.d.ts +0 -42
- package/.bob/esm/normalize/denormalize.js +0 -354
- package/.bob/esm/normalize/derive.d.ts +0 -57
- package/.bob/esm/normalize/derive.js +0 -99
- package/.bob/esm/normalize/enums.d.ts +0 -58
- package/.bob/esm/normalize/enums.js +0 -64
- package/.bob/esm/normalize/fields.d.ts +0 -28
- package/.bob/esm/normalize/fields.js +0 -81
- package/.bob/esm/normalize/foreign.d.ts +0 -22
- package/.bob/esm/normalize/foreign.js +0 -81
- package/.bob/esm/normalize/main.d.ts +0 -24
- package/.bob/esm/normalize/main.js +0 -204
- package/.bob/esm/normalize/paths.d.ts +0 -74
- package/.bob/esm/normalize/paths.js +0 -161
- package/.bob/esm/normalize/phone.d.ts +0 -12
- package/.bob/esm/normalize/phone.js +0 -32
- package/.bob/esm/normalize/rd-investments.d.ts +0 -10
- package/.bob/esm/normalize/rd-investments.js +0 -22
- package/.bob/esm/normalize/related-companies.d.ts +0 -10
- package/.bob/esm/normalize/related-companies.js +0 -22
- package/.bob/esm/normalize/report.d.ts +0 -9
- package/.bob/esm/normalize/report.js +0 -50
- package/.bob/esm/normalize/shareholders.d.ts +0 -10
- package/.bob/esm/normalize/shareholders.js +0 -27
- package/.bob/esm/normalize/text.d.ts +0 -11
- package/.bob/esm/normalize/text.js +0 -37
- package/.bob/esm/normalize/today.d.ts +0 -4
- package/.bob/esm/normalize/today.js +0 -11
- package/.bob/esm/pipeline.d.ts +0 -13
- package/.bob/esm/pipeline.js +0 -34
- package/.bob/esm/response/codes.d.ts +0 -2
- package/.bob/esm/response/codes.js +0 -28
- package/.bob/esm/validate/capital-gains-rules.d.ts +0 -6
- package/.bob/esm/validate/capital-gains-rules.js +0 -159
- package/.bob/esm/validate/check-digit.d.ts +0 -10
- package/.bob/esm/validate/check-digit.js +0 -23
- package/.bob/esm/validate/engine.d.ts +0 -5
- package/.bob/esm/validate/engine.js +0 -32
- package/.bob/esm/validate/field-rules.d.ts +0 -4
- package/.bob/esm/validate/field-rules.js +0 -328
- package/.bob/esm/validate/foreign-rules.d.ts +0 -6
- package/.bob/esm/validate/foreign-rules.js +0 -168
- package/.bob/esm/validate/issue.d.ts +0 -51
- package/.bob/esm/validate/issue.js +0 -72
- package/.bob/esm/validate/main-rules.d.ts +0 -24
- package/.bob/esm/validate/main-rules.js +0 -420
- package/.bob/esm/validate/parse-rules.d.ts +0 -31
- package/.bob/esm/validate/parse-rules.js +0 -110
- package/.bob/esm/validate/rules.d.ts +0 -746
- package/.bob/esm/validate/rules.js +0 -676
- package/.bob/esm/validate/shape.d.ts +0 -19
- package/.bob/esm/validate/shape.js +0 -227
- package/.bob/esm/validate/shareholder-rules.d.ts +0 -6
- package/.bob/esm/validate/shareholder-rules.js +0 -80
- package/.bob/esm/validate/structure-rules.d.ts +0 -26
- package/.bob/esm/validate/structure-rules.js +0 -122
- package/.bob/tsconfig.tsbuildinfo +0 -1
- package/.gitattributes +0 -1
- package/CLAUDE.md +0 -39
- package/dist/cjs/index.js +0 -28
- package/dist/esm/index.js +0 -11
- package/documentation/IMPLEMENTATION_PLAN.md +0 -2258
- package/documentation/SPEC.md +0 -1803
- package/documentation/layout/2024/codes.csv +0 -261
- package/documentation/layout/2024/countries.csv +0 -256
- package/documentation/layout/2024/fields.csv +0 -271
- package/documentation/layout/2024/records.csv +0 -18
- package/documentation/layout/README.md +0 -87
- package/documentation/specifications/1214-2024.pdf +0 -0
- package/documentation/tools/extract_layout.py +0 -191
- package/scripts/generate-layout.ts +0 -23
- package/scripts/layout/csv.ts +0 -111
- package/scripts/layout/derived-codes.ts +0 -12
- package/scripts/layout/render.ts +0 -364
- package/scripts/layout/sources.ts +0 -51
- package/scripts/layout/values.ts +0 -42
- package/scripts/render-rules-table.ts +0 -66
- package/src/api/generate.ts +0 -169
- package/src/api/parse.ts +0 -58
- package/src/api/response.ts +0 -110
- package/src/api/validate.ts +0 -26
- package/src/codec/boolean.ts +0 -62
- package/src/codec/date.ts +0 -75
- package/src/codec/enum.ts +0 -28
- package/src/codec/numeric.ts +0 -208
- package/src/codec/padding.ts +0 -33
- package/src/codec/percent.ts +0 -35
- package/src/codec/phone.ts +0 -54
- package/src/codec/record.ts +0 -206
- package/src/codec/registry.ts +0 -27
- package/src/codec/sections.ts +0 -208
- package/src/codec/text.ts +0 -31
- package/src/codec/types.ts +0 -47
- package/src/codec/windows1255.ts +0 -38
- package/src/errors.ts +0 -114
- package/src/file/assemble.ts +0 -42
- package/src/file/control.ts +0 -59
- package/src/file/parse.ts +0 -620
- package/src/file/split.ts +0 -86
- package/src/index.ts +0 -70
- package/src/layout/2024/layout.generated.ts +0 -7238
- package/src/layout/2025/index.ts +0 -9
- package/src/layout/capital-gains.ts +0 -20
- package/src/layout/countries.ts +0 -7
- package/src/layout/freeze.ts +0 -13
- package/src/layout/registry.ts +0 -33
- package/src/layout/types.ts +0 -134
- package/src/model/codes.generated.ts +0 -1190
- package/src/model/index.ts +0 -4
- package/src/model/input.ts +0 -594
- package/src/model/normalized.ts +0 -38
- package/src/model/options.ts +0 -17
- package/src/model/schema.ts +0 -381
- package/src/normalize/canonical.ts +0 -374
- package/src/normalize/capital-gains/assets.ts +0 -112
- package/src/normalize/capital-gains/index.ts +0 -212
- package/src/normalize/capital-gains/no-withholding.ts +0 -46
- package/src/normalize/capital-gains/other.ts +0 -153
- package/src/normalize/capital-gains/section6.ts +0 -14
- package/src/normalize/capital-gains/securities.ts +0 -73
- package/src/normalize/denormalize.ts +0 -426
- package/src/normalize/derive.ts +0 -136
- package/src/normalize/enums.ts +0 -87
- package/src/normalize/fields.ts +0 -110
- package/src/normalize/foreign.ts +0 -114
- package/src/normalize/main.ts +0 -284
- package/src/normalize/paths.ts +0 -184
- package/src/normalize/phone.ts +0 -45
- package/src/normalize/rd-investments.ts +0 -38
- package/src/normalize/related-companies.ts +0 -37
- package/src/normalize/report.ts +0 -59
- package/src/normalize/shareholders.ts +0 -42
- package/src/normalize/text.ts +0 -40
- package/src/normalize/today.ts +0 -15
- package/src/pipeline.ts +0 -42
- package/src/response/codes.ts +0 -30
- package/src/validate/capital-gains-rules.ts +0 -199
- package/src/validate/check-digit.ts +0 -25
- package/src/validate/engine.ts +0 -45
- package/src/validate/field-rules.ts +0 -383
- package/src/validate/foreign-rules.ts +0 -274
- package/src/validate/issue.ts +0 -121
- package/src/validate/main-rules.ts +0 -678
- package/src/validate/parse-rules.ts +0 -169
- package/src/validate/rules.ts +0 -747
- package/src/validate/shape.ts +0 -278
- package/src/validate/shareholder-rules.ts +0 -92
- package/src/validate/structure-rules.ts +0 -136
- package/tests/api/batch.test.ts +0 -227
- package/tests/api/exports.test.ts +0 -355
- package/tests/api/generate.test.ts +0 -409
- package/tests/api/parse.test.ts +0 -789
- package/tests/api/response.test.ts +0 -152
- package/tests/api/validate.test.ts +0 -86
- package/tests/codec/numeric.test.ts +0 -325
- package/tests/codec/record.test.ts +0 -318
- package/tests/codec/registry.test.ts +0 -17
- package/tests/codec/sections.test.ts +0 -333
- package/tests/codec/text.test.ts +0 -454
- package/tests/codec/windows1255.test.ts +0 -46
- package/tests/docs/readme.test.ts +0 -69
- package/tests/edge-cases.test.ts +0 -359
- package/tests/errors.test.ts +0 -138
- package/tests/file/assemble.test.ts +0 -188
- package/tests/file/split.test.ts +0 -61
- package/tests/fixtures/builders.ts +0 -512
- package/tests/fixtures/files.ts +0 -78
- package/tests/fixtures/golden/README.md +0 -37
- package/tests/fixtures/golden/VERIFICATION.md +0 -72
- package/tests/fixtures/golden/batch-50.input.ts +0 -92
- package/tests/fixtures/golden/batch-50.opcn +0 -150
- package/tests/fixtures/golden/capital-gains-max.input.ts +0 -177
- package/tests/fixtures/golden/capital-gains-max.opcn +0 -17
- package/tests/fixtures/golden/cg-27.input.ts +0 -63
- package/tests/fixtures/golden/cg-27.opcn +0 -4
- package/tests/fixtures/golden/cg-50.input.ts +0 -59
- package/tests/fixtures/golden/cg-50.opcn +0 -4
- package/tests/fixtures/golden/cg-51.input.ts +0 -60
- package/tests/fixtures/golden/cg-51.opcn +0 -4
- package/tests/fixtures/golden/cg-54.input.ts +0 -53
- package/tests/fixtures/golden/cg-54.opcn +0 -4
- package/tests/fixtures/golden/cg-60.input.ts +0 -77
- package/tests/fixtures/golden/cg-60.opcn +0 -4
- package/tests/fixtures/golden/cg-63.input.ts +0 -51
- package/tests/fixtures/golden/cg-63.opcn +0 -4
- package/tests/fixtures/golden/cg-64.input.ts +0 -62
- package/tests/fixtures/golden/cg-64.opcn +0 -4
- package/tests/fixtures/golden/cg-65.input.ts +0 -79
- package/tests/fixtures/golden/cg-65.opcn +0 -4
- package/tests/fixtures/golden/cg-66.input.ts +0 -53
- package/tests/fixtures/golden/cg-66.opcn +0 -4
- package/tests/fixtures/golden/cg-77.input.ts +0 -109
- package/tests/fixtures/golden/cg-77.opcn +0 -4
- package/tests/fixtures/golden/foreign.input.ts +0 -202
- package/tests/fixtures/golden/foreign.opcn +0 -27
- package/tests/fixtures/golden/hebrew-edge.input.ts +0 -90
- package/tests/fixtures/golden/hebrew-edge.opcn +0 -8
- package/tests/fixtures/golden/kibbutz.input.ts +0 -31
- package/tests/fixtures/golden/kibbutz.opcn +0 -2
- package/tests/fixtures/golden/main-full.input.ts +0 -780
- package/tests/fixtures/golden/main-full.opcn +0 -101
- package/tests/fixtures/golden/minimal.input.ts +0 -37
- package/tests/fixtures/golden/minimal.opcn +0 -3
- package/tests/fixtures/golden/related-and-rd.input.ts +0 -59
- package/tests/fixtures/golden/related-and-rd.opcn +0 -11
- package/tests/fixtures/random.ts +0 -843
- package/tests/golden/fixtures.test.ts +0 -627
- package/tests/golden/golden.test.ts +0 -95
- package/tests/helpers/coverage.ts +0 -18
- package/tests/helpers/sample-values.ts +0 -114
- package/tests/layout/codegen-sync.test.ts +0 -19
- package/tests/layout/integrity.test.ts +0 -232
- package/tests/layout/registry.test.ts +0 -98
- package/tests/model/code-unions.test.ts +0 -91
- package/tests/model/schema.test.ts +0 -1031
- package/tests/normalize/canonical.test.ts +0 -728
- package/tests/normalize/capital-gains.test.ts +0 -1850
- package/tests/normalize/coverage.test.ts +0 -88
- package/tests/normalize/denormalize.test.ts +0 -318
- package/tests/normalize/enums.test.ts +0 -118
- package/tests/normalize/foreign.test.ts +0 -273
- package/tests/normalize/main.test.ts +0 -839
- package/tests/normalize/paths.test.ts +0 -257
- package/tests/normalize/rd-investments.test.ts +0 -99
- package/tests/normalize/related-companies.test.ts +0 -106
- package/tests/normalize/shareholders.test.ts +0 -117
- package/tests/normalize/text.test.ts +0 -86
- package/tests/pipeline.test.ts +0 -96
- package/tests/roundtrip/determinism.test.ts +0 -207
- package/tests/roundtrip/property.test.ts +0 -126
- package/tests/roundtrip/roundtrip.test.ts +0 -573
- package/tests/rules/cases.ts +0 -873
- package/tests/rules/rules.test.ts +0 -69
- package/tests/rules/spec-sync.test.ts +0 -80
- package/tests/scripts/csv.test.ts +0 -78
- package/tests/scripts/values.test.ts +0 -80
- package/tests/validate/capital-gains-rules.test.ts +0 -307
- package/tests/validate/check-digit.test.ts +0 -42
- package/tests/validate/field-rules.test.ts +0 -867
- package/tests/validate/foreign-rules.test.ts +0 -255
- package/tests/validate/issue.test.ts +0 -96
- package/tests/validate/main-rules.test.ts +0 -761
- package/tests/validate/parse-rules.test.ts +0 -293
- package/tests/validate/shareholder-rules.test.ts +0 -143
- package/tsconfig.json +0 -10
- package/tsconfig.typecheck.json +0 -9
- package/vitest.config.ts +0 -11
|
@@ -1,746 +0,0 @@
|
|
|
1
|
-
import type { RecordType } from '../layout/types.js';
|
|
2
|
-
import type { Severity } from './issue.js';
|
|
3
|
-
/** RuleMeta with a plain string id, so RULES can be checked without referring to RuleId. */
|
|
4
|
-
interface RuleMetaInput {
|
|
5
|
-
id: string;
|
|
6
|
-
severity: Severity;
|
|
7
|
-
/**
|
|
8
|
-
* 'spec' = stated in the PDF; 'derived' = our consistency check; 'checker' = enforced by SHAAM's
|
|
9
|
-
* structure checker (shopcn) but not stated in the PDF.
|
|
10
|
-
*/
|
|
11
|
-
source: 'spec' | 'derived' | 'checker';
|
|
12
|
-
scope: RecordType | 'report' | 'input' | 'parse';
|
|
13
|
-
description: string;
|
|
14
|
-
specRef?: {
|
|
15
|
-
page: number;
|
|
16
|
-
note?: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
/** Every rule of SPEC §10, in catalogue order. */
|
|
20
|
-
export declare const RULES: readonly [{
|
|
21
|
-
readonly id: "struct.taxYear.unsupported";
|
|
22
|
-
readonly severity: "error";
|
|
23
|
-
readonly source: "derived";
|
|
24
|
-
readonly scope: "input";
|
|
25
|
-
readonly description: "taxYear is not one of supportedTaxYears().";
|
|
26
|
-
}, {
|
|
27
|
-
readonly id: "input.shape";
|
|
28
|
-
readonly severity: "error";
|
|
29
|
-
readonly source: "derived";
|
|
30
|
-
readonly scope: "input";
|
|
31
|
-
readonly description: "Wrong JavaScript type, missing required property, unknown property, null, or array too long.";
|
|
32
|
-
}, {
|
|
33
|
-
readonly id: "input.unknownCode";
|
|
34
|
-
readonly severity: "error";
|
|
35
|
-
readonly source: "spec";
|
|
36
|
-
readonly scope: "input";
|
|
37
|
-
readonly description: "A code-map key (amounts, foreignAppendix.amounts, capitalGains[i].amounts) that is not a code of that record for the tax year, or a foreignAppendix.countryBreakdown key that is not a per-country code of record 2000.";
|
|
38
|
-
readonly specRef: {
|
|
39
|
-
readonly page: 13;
|
|
40
|
-
};
|
|
41
|
-
}, {
|
|
42
|
-
readonly id: "input.derivedCode";
|
|
43
|
-
readonly severity: "error";
|
|
44
|
-
readonly source: "derived";
|
|
45
|
-
readonly scope: "input";
|
|
46
|
-
readonly description: "A derived code (008, 028, 273, 277, 278, 280, 297; 3077: 501–505) passed in a code map; the message names the input property that controls it.";
|
|
47
|
-
}, {
|
|
48
|
-
readonly id: "struct.relatedCompanies.max";
|
|
49
|
-
readonly severity: "error";
|
|
50
|
-
readonly source: "spec";
|
|
51
|
-
readonly scope: "1010";
|
|
52
|
-
readonly description: "More than 3 related companies.";
|
|
53
|
-
readonly specRef: {
|
|
54
|
-
readonly page: 2;
|
|
55
|
-
};
|
|
56
|
-
}, {
|
|
57
|
-
readonly id: "struct.shareholders.min";
|
|
58
|
-
readonly severity: "error";
|
|
59
|
-
readonly source: "spec";
|
|
60
|
-
readonly scope: "1020";
|
|
61
|
-
readonly description: "No shareholders while declarations.isKibbutz is not true.";
|
|
62
|
-
readonly specRef: {
|
|
63
|
-
readonly page: 21;
|
|
64
|
-
};
|
|
65
|
-
}, {
|
|
66
|
-
readonly id: "struct.shareholders.max";
|
|
67
|
-
readonly severity: "error";
|
|
68
|
-
readonly source: "spec";
|
|
69
|
-
readonly scope: "1020";
|
|
70
|
-
readonly description: "More than 99 shareholders.";
|
|
71
|
-
readonly specRef: {
|
|
72
|
-
readonly page: 21;
|
|
73
|
-
};
|
|
74
|
-
}, {
|
|
75
|
-
readonly id: "struct.rdInvestments.max";
|
|
76
|
-
readonly severity: "error";
|
|
77
|
-
readonly source: "spec";
|
|
78
|
-
readonly scope: "1030";
|
|
79
|
-
readonly description: "More than 5 R&D investments.";
|
|
80
|
-
readonly specRef: {
|
|
81
|
-
readonly page: 2;
|
|
82
|
-
};
|
|
83
|
-
}, {
|
|
84
|
-
readonly id: "struct.capitalGains.max";
|
|
85
|
-
readonly severity: "error";
|
|
86
|
-
readonly source: "spec";
|
|
87
|
-
readonly scope: "report";
|
|
88
|
-
readonly description: "More than 14 capital-gains appendices (records 30xx); report the excess on 1000@962 with reasons 964–967 instead.";
|
|
89
|
-
readonly specRef: {
|
|
90
|
-
readonly page: 32;
|
|
91
|
-
};
|
|
92
|
-
}, {
|
|
93
|
-
readonly id: "struct.mainCodePairs.max";
|
|
94
|
-
readonly severity: "error";
|
|
95
|
-
readonly source: "spec";
|
|
96
|
-
readonly scope: "1000";
|
|
97
|
-
readonly description: "More than 61 code-amount pairs in record 1000 (after derivations).";
|
|
98
|
-
readonly specRef: {
|
|
99
|
-
readonly page: 13;
|
|
100
|
-
};
|
|
101
|
-
}, {
|
|
102
|
-
readonly id: "struct.batch.size";
|
|
103
|
-
readonly severity: "error";
|
|
104
|
-
readonly source: "spec";
|
|
105
|
-
readonly scope: "input";
|
|
106
|
-
readonly description: "A batch (generate1214Batch) with no reports or more than 50 reports.";
|
|
107
|
-
readonly specRef: {
|
|
108
|
-
readonly page: 1;
|
|
109
|
-
};
|
|
110
|
-
}, {
|
|
111
|
-
readonly id: "field.required";
|
|
112
|
-
readonly severity: "error";
|
|
113
|
-
readonly source: "spec";
|
|
114
|
-
readonly scope: "report";
|
|
115
|
-
readonly description: "A field or code with required=yes is absent (for codes that are not zeroAllowed, 0 counts as absent); inside a repeated slot only when the slot is in use.";
|
|
116
|
-
}, {
|
|
117
|
-
readonly id: "field.numeric";
|
|
118
|
-
readonly severity: "error";
|
|
119
|
-
readonly source: "spec";
|
|
120
|
-
readonly scope: "report";
|
|
121
|
-
readonly description: "A digit-string field (id9, shareholderId, digits) contains non-digits.";
|
|
122
|
-
}, {
|
|
123
|
-
readonly id: "field.length";
|
|
124
|
-
readonly severity: "error";
|
|
125
|
-
readonly source: "spec";
|
|
126
|
-
readonly scope: "report";
|
|
127
|
-
readonly description: "Normalized text longer than the field width, or a number with more digits than the width.";
|
|
128
|
-
}, {
|
|
129
|
-
readonly id: "field.checkDigit";
|
|
130
|
-
readonly severity: "error";
|
|
131
|
-
readonly source: "checker";
|
|
132
|
-
readonly scope: "report";
|
|
133
|
-
readonly description: "An identifier (id9, shareholderId) of 1–9 digits fails the Israeli check digit (left-padded to 9 digits, weights 1, 2, 1, 2, …); SHAAM rejects the file.";
|
|
134
|
-
readonly specRef: {
|
|
135
|
-
readonly page: 5;
|
|
136
|
-
readonly note: "shopcn";
|
|
137
|
-
};
|
|
138
|
-
}, {
|
|
139
|
-
readonly id: "field.integer";
|
|
140
|
-
readonly severity: "error";
|
|
141
|
-
readonly source: "spec";
|
|
142
|
-
readonly scope: "report";
|
|
143
|
-
readonly description: "An amount, amountX or num value is not an integer (with rounding 'halfUp', amounts are rounded instead).";
|
|
144
|
-
readonly specRef: {
|
|
145
|
-
readonly page: 13;
|
|
146
|
-
readonly note: "no dots";
|
|
147
|
-
};
|
|
148
|
-
}, {
|
|
149
|
-
readonly id: "field.decimals";
|
|
150
|
-
readonly severity: "error";
|
|
151
|
-
readonly source: "spec";
|
|
152
|
-
readonly scope: "report";
|
|
153
|
-
readonly description: "An amountX100, percentX100, percentLiteral or rateX100 value has more than 2 decimals.";
|
|
154
|
-
readonly specRef: {
|
|
155
|
-
readonly page: 10;
|
|
156
|
-
};
|
|
157
|
-
}, {
|
|
158
|
-
readonly id: "field.negative";
|
|
159
|
-
readonly severity: "error";
|
|
160
|
-
readonly source: "spec";
|
|
161
|
-
readonly scope: "report";
|
|
162
|
-
readonly description: "A number is negative (losses have their own codes).";
|
|
163
|
-
readonly specRef: {
|
|
164
|
-
readonly page: 13;
|
|
165
|
-
};
|
|
166
|
-
}, {
|
|
167
|
-
readonly id: "field.enum";
|
|
168
|
-
readonly severity: "error";
|
|
169
|
-
readonly source: "spec";
|
|
170
|
-
readonly scope: "report";
|
|
171
|
-
readonly description: "An enum or rateX100 value is not one of the values of its field or code (the values of other kinds are documentation).";
|
|
172
|
-
}, {
|
|
173
|
-
readonly id: "field.date";
|
|
174
|
-
readonly severity: "error";
|
|
175
|
-
readonly source: "spec";
|
|
176
|
-
readonly scope: "report";
|
|
177
|
-
readonly description: "A date is not a real calendar date in ISO YYYY-MM-DD form.";
|
|
178
|
-
}, {
|
|
179
|
-
readonly id: "field.percentRange";
|
|
180
|
-
readonly severity: "error";
|
|
181
|
-
readonly source: "spec";
|
|
182
|
-
readonly scope: "report";
|
|
183
|
-
readonly description: "A percentage (percentX100, percentLiteral) is outside 1–100.";
|
|
184
|
-
readonly specRef: {
|
|
185
|
-
readonly page: 10;
|
|
186
|
-
};
|
|
187
|
-
}, {
|
|
188
|
-
readonly id: "field.hebrewFirstLetter";
|
|
189
|
-
readonly severity: "error";
|
|
190
|
-
readonly source: "spec";
|
|
191
|
-
readonly scope: "report";
|
|
192
|
-
readonly description: "A hebrewText value does not start with a Hebrew letter (U+05D0–U+05EA).";
|
|
193
|
-
readonly specRef: {
|
|
194
|
-
readonly page: 9;
|
|
195
|
-
};
|
|
196
|
-
}, {
|
|
197
|
-
readonly id: "field.charset";
|
|
198
|
-
readonly severity: "error";
|
|
199
|
-
readonly source: "derived";
|
|
200
|
-
readonly scope: "report";
|
|
201
|
-
readonly description: "A text value (after SPEC §4.3 normalization) contains a control character or a character not representable in windows-1255.";
|
|
202
|
-
}, {
|
|
203
|
-
readonly id: "field.phonePrefix";
|
|
204
|
-
readonly severity: "warning";
|
|
205
|
-
readonly source: "spec";
|
|
206
|
-
readonly scope: "report";
|
|
207
|
-
readonly description: "A phone or fax prefix is not in the allowed list: it is dropped (SHAAM deletes it); for the required 1000@493 the follow-up field.required is the error.";
|
|
208
|
-
readonly specRef: {
|
|
209
|
-
readonly page: 6;
|
|
210
|
-
};
|
|
211
|
-
}, {
|
|
212
|
-
readonly id: "field.phoneNumber";
|
|
213
|
-
readonly severity: "error";
|
|
214
|
-
readonly source: "derived";
|
|
215
|
-
readonly scope: "report";
|
|
216
|
-
readonly description: "A phone or fax number is not exactly 7 digits (shorter numbers would be silently zero-padded).";
|
|
217
|
-
readonly specRef: {
|
|
218
|
-
readonly page: 6;
|
|
219
|
-
};
|
|
220
|
-
}, {
|
|
221
|
-
readonly id: "main.withholdingFile.companyNumber";
|
|
222
|
-
readonly severity: "error";
|
|
223
|
-
readonly source: "checker";
|
|
224
|
-
readonly scope: "1000";
|
|
225
|
-
readonly description: "The withholding file number (1000@225) does not start with 9 and the first 7 digits of the company file number (1000@137, left-padded to 9 digits); its 9th digit is the check digit (field.checkDigit). SHAAM rejects the file.";
|
|
226
|
-
readonly specRef: {
|
|
227
|
-
readonly page: 6;
|
|
228
|
-
readonly note: "shopcn";
|
|
229
|
-
};
|
|
230
|
-
}, {
|
|
231
|
-
readonly id: "main.familyCompany.fileNumber";
|
|
232
|
-
readonly severity: "error";
|
|
233
|
-
readonly source: "spec";
|
|
234
|
-
readonly scope: "1000";
|
|
235
|
-
readonly description: "A family company (836 marked) without the taxpayer file number (837).";
|
|
236
|
-
readonly specRef: {
|
|
237
|
-
readonly page: 7;
|
|
238
|
-
};
|
|
239
|
-
}, {
|
|
240
|
-
readonly id: "main.familyCompany.code080";
|
|
241
|
-
readonly severity: "error";
|
|
242
|
-
readonly source: "spec";
|
|
243
|
-
readonly scope: "1000";
|
|
244
|
-
readonly description: "A family company (836 marked) without code 080 (0 allowed).";
|
|
245
|
-
readonly specRef: {
|
|
246
|
-
readonly page: 15;
|
|
247
|
-
};
|
|
248
|
-
}, {
|
|
249
|
-
readonly id: "main.houseCompany.code084";
|
|
250
|
-
readonly severity: "error";
|
|
251
|
-
readonly source: "spec";
|
|
252
|
-
readonly scope: "1000";
|
|
253
|
-
readonly description: "A house company (846 marked) without code 084 (0 allowed).";
|
|
254
|
-
readonly specRef: {
|
|
255
|
-
readonly page: 15;
|
|
256
|
-
};
|
|
257
|
-
}, {
|
|
258
|
-
readonly id: "main.investmentLaw.flag";
|
|
259
|
-
readonly severity: "error";
|
|
260
|
-
readonly source: "spec";
|
|
261
|
-
readonly scope: "1000";
|
|
262
|
-
readonly description: "Code 101 or 102 filled but 849 (capital investment law benefits) not marked.";
|
|
263
|
-
readonly specRef: {
|
|
264
|
-
readonly page: 8;
|
|
265
|
-
};
|
|
266
|
-
}, {
|
|
267
|
-
readonly id: "main.beneficiaryEnterprise.noticeDate";
|
|
268
|
-
readonly severity: "error";
|
|
269
|
-
readonly source: "spec";
|
|
270
|
-
readonly scope: "1000";
|
|
271
|
-
readonly description: "851 (beneficiary enterprise) marked without the notice date (852); guaranteed by the input type, checked for JS callers and parsed files.";
|
|
272
|
-
readonly specRef: {
|
|
273
|
-
readonly page: 8;
|
|
274
|
-
};
|
|
275
|
-
}, {
|
|
276
|
-
readonly id: "main.beneficiaryEnterprise.noticeDateBeforeTaxYear";
|
|
277
|
-
readonly severity: "error";
|
|
278
|
-
readonly source: "checker";
|
|
279
|
-
readonly scope: "1000";
|
|
280
|
-
readonly description: "The beneficiary-enterprise notice date (852) is before the start of the tax year: 1 January of taxYear, or the start of a special year ending on the balance-sheet date (864) when that is earlier. SHAAM rejects the file.";
|
|
281
|
-
readonly specRef: {
|
|
282
|
-
readonly page: 8;
|
|
283
|
-
readonly note: "shopcn";
|
|
284
|
-
};
|
|
285
|
-
}, {
|
|
286
|
-
readonly id: "main.specialYear.balanceSheetDate";
|
|
287
|
-
readonly severity: "error";
|
|
288
|
-
readonly source: "spec";
|
|
289
|
-
readonly scope: "1000";
|
|
290
|
-
readonly description: "863 (special year) marked without the balance sheet date (864); guaranteed by the input type, checked for JS callers and parsed files.";
|
|
291
|
-
readonly specRef: {
|
|
292
|
-
readonly page: 8;
|
|
293
|
-
};
|
|
294
|
-
}, {
|
|
295
|
-
readonly id: "main.kibbutz.code226";
|
|
296
|
-
readonly severity: "error";
|
|
297
|
-
readonly source: "spec";
|
|
298
|
-
readonly scope: "1000";
|
|
299
|
-
readonly description: "isKibbutz (877 marked) but code 226 not filled (SPEC §15 A-13).";
|
|
300
|
-
readonly specRef: {
|
|
301
|
-
readonly page: 9;
|
|
302
|
-
};
|
|
303
|
-
}, {
|
|
304
|
-
readonly id: "main.kibbutz.code226Other";
|
|
305
|
-
readonly severity: "warning";
|
|
306
|
-
readonly source: "derived";
|
|
307
|
-
readonly scope: "1000";
|
|
308
|
-
readonly description: "Code 226 = 9 (\"other cooperative, not kibbutz\") while isKibbutz (877 marked).";
|
|
309
|
-
readonly specRef: {
|
|
310
|
-
readonly page: 18;
|
|
311
|
-
};
|
|
312
|
-
}, {
|
|
313
|
-
readonly id: "main.buildingIncome.code259";
|
|
314
|
-
readonly severity: "error";
|
|
315
|
-
readonly source: "spec";
|
|
316
|
-
readonly scope: "1000";
|
|
317
|
-
readonly description: "hasBuildingIncome (884 = yes) without code 259.";
|
|
318
|
-
readonly specRef: {
|
|
319
|
-
readonly page: 9;
|
|
320
|
-
};
|
|
321
|
-
}, {
|
|
322
|
-
readonly id: "main.cgReasons.otherText";
|
|
323
|
-
readonly severity: "error";
|
|
324
|
-
readonly source: "spec";
|
|
325
|
-
readonly scope: "1000";
|
|
326
|
-
readonly description: "Capital-gains reason \"other\" (967) marked without its text (968).";
|
|
327
|
-
readonly specRef: {
|
|
328
|
-
readonly page: 11;
|
|
329
|
-
};
|
|
330
|
-
}, {
|
|
331
|
-
readonly id: "main.reportablePositions.required";
|
|
332
|
-
readonly severity: "error";
|
|
333
|
-
readonly source: "spec";
|
|
334
|
-
readonly scope: "1000";
|
|
335
|
-
readonly description: "tookReportablePosition (1030 = yes) and no reportable position numbers (1034–1046).";
|
|
336
|
-
readonly specRef: {
|
|
337
|
-
readonly page: 11;
|
|
338
|
-
};
|
|
339
|
-
}, {
|
|
340
|
-
readonly id: "main.reportablePositions.max";
|
|
341
|
-
readonly severity: "error";
|
|
342
|
-
readonly source: "spec";
|
|
343
|
-
readonly scope: "1000";
|
|
344
|
-
readonly description: "More than 5 reportable positions (only five fields exist, 1034–1046).";
|
|
345
|
-
readonly specRef: {
|
|
346
|
-
readonly page: 11;
|
|
347
|
-
};
|
|
348
|
-
}, {
|
|
349
|
-
readonly id: "main.reportablePositions.unexpected";
|
|
350
|
-
readonly severity: "warning";
|
|
351
|
-
readonly source: "derived";
|
|
352
|
-
readonly scope: "1000";
|
|
353
|
-
readonly description: "Reportable positions (1034–1046) given while tookReportablePosition (1030) is no.";
|
|
354
|
-
readonly specRef: {
|
|
355
|
-
readonly page: 11;
|
|
356
|
-
};
|
|
357
|
-
}, {
|
|
358
|
-
readonly id: "main.rd.records";
|
|
359
|
-
readonly severity: "error";
|
|
360
|
-
readonly source: "spec";
|
|
361
|
-
readonly scope: "1000";
|
|
362
|
-
readonly description: "Code 165 > 0 but no R&D investment (1030) records.";
|
|
363
|
-
readonly specRef: {
|
|
364
|
-
readonly page: 17;
|
|
365
|
-
};
|
|
366
|
-
}, {
|
|
367
|
-
readonly id: "main.rd.total";
|
|
368
|
-
readonly severity: "warning";
|
|
369
|
-
readonly source: "derived";
|
|
370
|
-
readonly scope: "1000";
|
|
371
|
-
readonly description: "The R&D investment amounts (1030) do not add up to code 165, compared in whole shekels.";
|
|
372
|
-
readonly specRef: {
|
|
373
|
-
readonly page: 17;
|
|
374
|
-
};
|
|
375
|
-
}, {
|
|
376
|
-
readonly id: "main.capitalGains.flag";
|
|
377
|
-
readonly severity: "error";
|
|
378
|
-
readonly source: "derived";
|
|
379
|
-
readonly scope: "1000";
|
|
380
|
-
readonly description: "declarations.hasCapitalGainsAppendix is false while capital-gains appendices exist (833 is derived from them as yes).";
|
|
381
|
-
readonly specRef: {
|
|
382
|
-
readonly page: 7;
|
|
383
|
-
};
|
|
384
|
-
}, {
|
|
385
|
-
readonly id: "main.cgUntransmitted.reason";
|
|
386
|
-
readonly severity: "warning";
|
|
387
|
-
readonly source: "derived";
|
|
388
|
-
readonly scope: "1000";
|
|
389
|
-
readonly description: "capitalGainsSummary.untransmittedCount (962) > 0 and none of the reasons 964–967 marked.";
|
|
390
|
-
readonly specRef: {
|
|
391
|
-
readonly page: 10;
|
|
392
|
-
};
|
|
393
|
-
}, {
|
|
394
|
-
readonly id: "main.cgUntransmitted.reasonWithoutCount";
|
|
395
|
-
readonly severity: "warning";
|
|
396
|
-
readonly source: "derived";
|
|
397
|
-
readonly scope: "1000";
|
|
398
|
-
readonly description: "A reason 964–967 marked while capitalGainsSummary.untransmittedCount (962) is 0 or absent.";
|
|
399
|
-
readonly specRef: {
|
|
400
|
-
readonly page: 10;
|
|
401
|
-
};
|
|
402
|
-
}, {
|
|
403
|
-
readonly id: "main.appendixTotal.min";
|
|
404
|
-
readonly severity: "warning";
|
|
405
|
-
readonly source: "derived";
|
|
406
|
-
readonly scope: "1000";
|
|
407
|
-
readonly description: "capitalGainsSummary.totalAppendicesCount (960) is given (> 0) and lower than the transmitted appendices (2000 and 30xx records) plus capitalGainsSummary.untransmittedCount (962).";
|
|
408
|
-
readonly specRef: {
|
|
409
|
-
readonly page: 10;
|
|
410
|
-
};
|
|
411
|
-
}, {
|
|
412
|
-
readonly id: "main.bankAccount.withNoBank";
|
|
413
|
-
readonly severity: "warning";
|
|
414
|
-
readonly source: "derived";
|
|
415
|
-
readonly scope: "1000";
|
|
416
|
-
readonly description: "noBankAccount (1064) marked while a bank account (codes 277/278/280) is given.";
|
|
417
|
-
readonly specRef: {
|
|
418
|
-
readonly page: 12;
|
|
419
|
-
};
|
|
420
|
-
}, {
|
|
421
|
-
readonly id: "main.bankAccount.format";
|
|
422
|
-
readonly severity: "error";
|
|
423
|
-
readonly source: "spec";
|
|
424
|
-
readonly scope: "1000";
|
|
425
|
-
readonly description: "bankAccount.bank is not exactly 2 digits, branch not exactly 3 digits, or account not 1–9 digits.";
|
|
426
|
-
readonly specRef: {
|
|
427
|
-
readonly page: 19;
|
|
428
|
-
};
|
|
429
|
-
}, {
|
|
430
|
-
readonly id: "main.qualifyingCompany.purchaseAmounts";
|
|
431
|
-
readonly severity: "warning";
|
|
432
|
-
readonly source: "derived";
|
|
433
|
-
readonly scope: "1000";
|
|
434
|
-
readonly description: "qualifyingCompany.purchased (1065 = yes) but neither purchase amount (1066, 1078) given.";
|
|
435
|
-
readonly specRef: {
|
|
436
|
-
readonly page: 12;
|
|
437
|
-
};
|
|
438
|
-
}, {
|
|
439
|
-
readonly id: "main.qualifyingCompany.amortizationAmount";
|
|
440
|
-
readonly severity: "warning";
|
|
441
|
-
readonly source: "derived";
|
|
442
|
-
readonly scope: "1000";
|
|
443
|
-
readonly description: "qualifyingCompany.amortizationClaimed (1090 = yes) but no amortization amount (1091; 0 counts as given).";
|
|
444
|
-
readonly specRef: {
|
|
445
|
-
readonly page: 12;
|
|
446
|
-
};
|
|
447
|
-
}, {
|
|
448
|
-
readonly id: "main.attachments.code070";
|
|
449
|
-
readonly severity: "warning";
|
|
450
|
-
readonly source: "derived";
|
|
451
|
-
readonly scope: "1000";
|
|
452
|
-
readonly description: "attachments.donationReceiptsCount (954) > 0 but code 070 absent.";
|
|
453
|
-
readonly specRef: {
|
|
454
|
-
readonly page: 10;
|
|
455
|
-
};
|
|
456
|
-
}, {
|
|
457
|
-
readonly id: "main.attachments.code010";
|
|
458
|
-
readonly severity: "warning";
|
|
459
|
-
readonly source: "derived";
|
|
460
|
-
readonly scope: "1000";
|
|
461
|
-
readonly description: "attachments.withholdingCertificatesCount (957) > 0 but code 010 absent.";
|
|
462
|
-
readonly specRef: {
|
|
463
|
-
readonly page: 10;
|
|
464
|
-
};
|
|
465
|
-
}, {
|
|
466
|
-
readonly id: "shareholders.dividendRights.total";
|
|
467
|
-
readonly severity: "error";
|
|
468
|
-
readonly source: "spec";
|
|
469
|
-
readonly scope: "1020";
|
|
470
|
-
readonly description: "At least one shareholder states dividendRightsPercent and the total is not 100.00 (computed in hundredths; SPEC §15 A-15).";
|
|
471
|
-
readonly specRef: {
|
|
472
|
-
readonly page: 23;
|
|
473
|
-
};
|
|
474
|
-
}, {
|
|
475
|
-
readonly id: "shareholders.duplicateId";
|
|
476
|
-
readonly severity: "warning";
|
|
477
|
-
readonly source: "derived";
|
|
478
|
-
readonly scope: "1020";
|
|
479
|
-
readonly description: "The same shareholder idNumber twice (999999964 and 999999998 excluded).";
|
|
480
|
-
}, {
|
|
481
|
-
readonly id: "foreign.otherIncome.description";
|
|
482
|
-
readonly severity: "error";
|
|
483
|
-
readonly source: "spec";
|
|
484
|
-
readonly scope: "2000";
|
|
485
|
-
readonly description: "otherTaxableIncome (2000@187) > 0 without otherTaxableIncomeDescription (2000@137).";
|
|
486
|
-
readonly specRef: {
|
|
487
|
-
readonly page: 26;
|
|
488
|
-
};
|
|
489
|
-
}, {
|
|
490
|
-
readonly id: "foreign.refund.amount";
|
|
491
|
-
readonly severity: "warning";
|
|
492
|
-
readonly source: "derived";
|
|
493
|
-
readonly scope: "2000";
|
|
494
|
-
readonly description: "taxRefundDeclaration (2000@247) is yes without a taxRefundDeclarationAmount (2000@248) > 0; 0 is written as absent.";
|
|
495
|
-
readonly specRef: {
|
|
496
|
-
readonly page: 26;
|
|
497
|
-
};
|
|
498
|
-
}, {
|
|
499
|
-
readonly id: "foreign.breakdown.required";
|
|
500
|
-
readonly severity: "error";
|
|
501
|
-
readonly source: "spec";
|
|
502
|
-
readonly scope: "2000";
|
|
503
|
-
readonly description: "A per-country code written in the 2000 section (442 = 0 included) without a countryBreakdown entry (record 2200).";
|
|
504
|
-
readonly specRef: {
|
|
505
|
-
readonly page: 27;
|
|
506
|
-
};
|
|
507
|
-
}, {
|
|
508
|
-
readonly id: "foreign.breakdown.orphan";
|
|
509
|
-
readonly severity: "error";
|
|
510
|
-
readonly source: "spec";
|
|
511
|
-
readonly scope: "2200";
|
|
512
|
-
readonly description: "A countryBreakdown entry for a code not written in the 2000 section.";
|
|
513
|
-
readonly specRef: {
|
|
514
|
-
readonly page: 30;
|
|
515
|
-
};
|
|
516
|
-
}, {
|
|
517
|
-
readonly id: "foreign.breakdown.countries.min";
|
|
518
|
-
readonly severity: "error";
|
|
519
|
-
readonly source: "derived";
|
|
520
|
-
readonly scope: "2200";
|
|
521
|
-
readonly description: "A country breakdown with no countries.";
|
|
522
|
-
readonly specRef: {
|
|
523
|
-
readonly page: 31;
|
|
524
|
-
};
|
|
525
|
-
}, {
|
|
526
|
-
readonly id: "foreign.breakdown.countries.max";
|
|
527
|
-
readonly severity: "error";
|
|
528
|
-
readonly source: "spec";
|
|
529
|
-
readonly scope: "2200";
|
|
530
|
-
readonly description: "More than 10 countries in one country breakdown.";
|
|
531
|
-
readonly specRef: {
|
|
532
|
-
readonly page: 30;
|
|
533
|
-
};
|
|
534
|
-
}, {
|
|
535
|
-
readonly id: "foreign.breakdown.country.unknown";
|
|
536
|
-
readonly severity: "error";
|
|
537
|
-
readonly source: "spec";
|
|
538
|
-
readonly scope: "2200";
|
|
539
|
-
readonly description: "A country code that is not in the country table of the tax year (countries.csv).";
|
|
540
|
-
readonly specRef: {
|
|
541
|
-
readonly page: 32;
|
|
542
|
-
};
|
|
543
|
-
}, {
|
|
544
|
-
readonly id: "foreign.breakdown.country.unknownOnlyFor439";
|
|
545
|
-
readonly severity: "error";
|
|
546
|
-
readonly source: "spec";
|
|
547
|
-
readonly scope: "2200";
|
|
548
|
-
readonly description: "The country code -88 (country unknown) in the breakdown of a code other than 439.";
|
|
549
|
-
readonly specRef: {
|
|
550
|
-
readonly page: 32;
|
|
551
|
-
};
|
|
552
|
-
}, {
|
|
553
|
-
readonly id: "foreign.breakdown.country.duplicate";
|
|
554
|
-
readonly severity: "warning";
|
|
555
|
-
readonly source: "derived";
|
|
556
|
-
readonly scope: "2200";
|
|
557
|
-
readonly description: "The same country twice within one country breakdown.";
|
|
558
|
-
}, {
|
|
559
|
-
readonly id: "cg.improvements.max";
|
|
560
|
-
readonly severity: "error";
|
|
561
|
-
readonly source: "spec";
|
|
562
|
-
readonly scope: "3077";
|
|
563
|
-
readonly description: "More than 5 improvements in a 3077 appendix (only five slots exist, 247–416); report the excess via 962 with reason 965 instead.";
|
|
564
|
-
readonly specRef: {
|
|
565
|
-
readonly page: 55;
|
|
566
|
-
};
|
|
567
|
-
}, {
|
|
568
|
-
readonly id: "cg.improvements.code50Amount";
|
|
569
|
-
readonly severity: "warning";
|
|
570
|
-
readonly source: "derived";
|
|
571
|
-
readonly scope: "3077";
|
|
572
|
-
readonly description: "An improvement without code50Amount (code 501–505), or a code50Amount with neither expense nor accumulated depreciation.";
|
|
573
|
-
readonly specRef: {
|
|
574
|
-
readonly page: 58;
|
|
575
|
-
};
|
|
576
|
-
}, {
|
|
577
|
-
readonly id: "cg.improvements.expense";
|
|
578
|
-
readonly severity: "error";
|
|
579
|
-
readonly source: "checker";
|
|
580
|
-
readonly scope: "3077";
|
|
581
|
-
readonly description: "An improvement of a 3077 appendix without an expense greater than 0, or with an accumulated depreciation above its expense. SHAAM counts only improvements with an expense against the improvement count (245) and rejects the file.";
|
|
582
|
-
readonly specRef: {
|
|
583
|
-
readonly page: 58;
|
|
584
|
-
readonly note: "shopcn";
|
|
585
|
-
};
|
|
586
|
-
}, {
|
|
587
|
-
readonly id: "cg.virtualCurrency.wallet";
|
|
588
|
-
readonly severity: "error";
|
|
589
|
-
readonly source: "spec";
|
|
590
|
-
readonly scope: "3077";
|
|
591
|
-
readonly description: "A 3077 appendix with code 071 = 1 (virtual currency) and no wallet address.";
|
|
592
|
-
readonly specRef: {
|
|
593
|
-
readonly page: 57;
|
|
594
|
-
};
|
|
595
|
-
}, {
|
|
596
|
-
readonly id: "cg.codePairs.max";
|
|
597
|
-
readonly severity: "error";
|
|
598
|
-
readonly source: "checker";
|
|
599
|
-
readonly scope: "report";
|
|
600
|
-
readonly description: "More than 20 code-amount pairs written in one capital-gains appendix (30xx record; omitted zero codes do not count); only 3060 and 3065 have more than 20 codes. SHAAM rejects the file.";
|
|
601
|
-
readonly specRef: {
|
|
602
|
-
readonly page: 44;
|
|
603
|
-
readonly note: "shopcn";
|
|
604
|
-
};
|
|
605
|
-
}, {
|
|
606
|
-
readonly id: "parse.empty";
|
|
607
|
-
readonly severity: "error";
|
|
608
|
-
readonly source: "derived";
|
|
609
|
-
readonly scope: "parse";
|
|
610
|
-
readonly description: "The file has no records.";
|
|
611
|
-
}, {
|
|
612
|
-
readonly id: "parse.encoding";
|
|
613
|
-
readonly severity: "error";
|
|
614
|
-
readonly source: "derived";
|
|
615
|
-
readonly scope: "parse";
|
|
616
|
-
readonly description: "Bytes that do not decode in the selected encoding (windows-1255, or UTF-8 when options.encoding says so).";
|
|
617
|
-
}, {
|
|
618
|
-
readonly id: "parse.lineLength";
|
|
619
|
-
readonly severity: "error";
|
|
620
|
-
readonly source: "spec";
|
|
621
|
-
readonly scope: "parse";
|
|
622
|
-
readonly description: "A line whose length is not the record length of its record type.";
|
|
623
|
-
readonly specRef: {
|
|
624
|
-
readonly page: 2;
|
|
625
|
-
};
|
|
626
|
-
}, {
|
|
627
|
-
readonly id: "parse.formType";
|
|
628
|
-
readonly severity: "error";
|
|
629
|
-
readonly source: "spec";
|
|
630
|
-
readonly scope: "parse";
|
|
631
|
-
readonly description: "Positions 1–4 of a line are not 1214.";
|
|
632
|
-
readonly specRef: {
|
|
633
|
-
readonly page: 2;
|
|
634
|
-
};
|
|
635
|
-
}, {
|
|
636
|
-
readonly id: "parse.recordType";
|
|
637
|
-
readonly severity: "error";
|
|
638
|
-
readonly source: "spec";
|
|
639
|
-
readonly scope: "parse";
|
|
640
|
-
readonly description: "Positions 5–8 of a line are not a record type of the layout.";
|
|
641
|
-
readonly specRef: {
|
|
642
|
-
readonly page: 2;
|
|
643
|
-
};
|
|
644
|
-
}, {
|
|
645
|
-
readonly id: "parse.prefixFiller";
|
|
646
|
-
readonly severity: "error";
|
|
647
|
-
readonly source: "spec";
|
|
648
|
-
readonly scope: "parse";
|
|
649
|
-
readonly description: "Positions 9–136 of a line are not all 0.";
|
|
650
|
-
readonly specRef: {
|
|
651
|
-
readonly page: 2;
|
|
652
|
-
};
|
|
653
|
-
}, {
|
|
654
|
-
readonly id: "parse.order";
|
|
655
|
-
readonly severity: "error";
|
|
656
|
-
readonly source: "spec";
|
|
657
|
-
readonly scope: "parse";
|
|
658
|
-
readonly description: "A record out of the SPEC §3.3 order (the file must start with 1000; a 2200 record must follow a 2000 record), or a second 1000 before a 9999.";
|
|
659
|
-
}, {
|
|
660
|
-
readonly id: "parse.occurrences";
|
|
661
|
-
readonly severity: "error";
|
|
662
|
-
readonly source: "spec";
|
|
663
|
-
readonly scope: "parse";
|
|
664
|
-
readonly description: "More records of a type than SPEC §3.2 allows (1010 > 3, 1020 > 99, 1030 > 5, 2000 > 1, 2200 > 30, capital-gains records 30xx > 14 together), or more than 50 reports in a batch file; minimums are business rules.";
|
|
665
|
-
readonly specRef: {
|
|
666
|
-
readonly page: 2;
|
|
667
|
-
};
|
|
668
|
-
}, {
|
|
669
|
-
readonly id: "parse.control.missing";
|
|
670
|
-
readonly severity: "error";
|
|
671
|
-
readonly source: "spec";
|
|
672
|
-
readonly scope: "parse";
|
|
673
|
-
readonly description: "The report is not terminated by a 9999 control record.";
|
|
674
|
-
readonly specRef: {
|
|
675
|
-
readonly page: 59;
|
|
676
|
-
};
|
|
677
|
-
}, {
|
|
678
|
-
readonly id: "parse.control.counts";
|
|
679
|
-
readonly severity: "error";
|
|
680
|
-
readonly source: "spec";
|
|
681
|
-
readonly scope: "parse";
|
|
682
|
-
readonly description: "A count of the 9999 control record differs from the records present.";
|
|
683
|
-
readonly specRef: {
|
|
684
|
-
readonly page: 59;
|
|
685
|
-
};
|
|
686
|
-
}, {
|
|
687
|
-
readonly id: "parse.multipleReports";
|
|
688
|
-
readonly severity: "error";
|
|
689
|
-
readonly source: "derived";
|
|
690
|
-
readonly scope: "parse";
|
|
691
|
-
readonly description: "parse1214 was given a file with more than one report (a 1000 record after a 9999 record); use parse1214Batch.";
|
|
692
|
-
}, {
|
|
693
|
-
readonly id: "parse.numeric";
|
|
694
|
-
readonly severity: "error";
|
|
695
|
-
readonly source: "spec";
|
|
696
|
-
readonly scope: "parse";
|
|
697
|
-
readonly description: "A non-digit in a numeric field or code value.";
|
|
698
|
-
readonly specRef: {
|
|
699
|
-
readonly page: 61;
|
|
700
|
-
};
|
|
701
|
-
}, {
|
|
702
|
-
readonly id: "parse.date";
|
|
703
|
-
readonly severity: "error";
|
|
704
|
-
readonly source: "spec";
|
|
705
|
-
readonly scope: "parse";
|
|
706
|
-
readonly description: "A date field that is not a valid DD/MM/YYYY date or all spaces.";
|
|
707
|
-
}, {
|
|
708
|
-
readonly id: "parse.codeSection";
|
|
709
|
-
readonly severity: "error";
|
|
710
|
-
readonly source: "spec";
|
|
711
|
-
readonly scope: "parse";
|
|
712
|
-
readonly description: "A code-amount section with an unknown code, a duplicate code, a truncated entry, or non-zero data after the last entry.";
|
|
713
|
-
readonly specRef: {
|
|
714
|
-
readonly page: 13;
|
|
715
|
-
};
|
|
716
|
-
}, {
|
|
717
|
-
readonly id: "parse.fieldValue";
|
|
718
|
-
readonly severity: "error";
|
|
719
|
-
readonly source: "spec";
|
|
720
|
-
readonly scope: "parse";
|
|
721
|
-
readonly description: "A header field that is well-formed for its type but not a value the field can hold: flag or yes/no digits other than the ones written, a phone prefix outside the allowed list, a 2200 code (2200@137) that is not a per-country code of record 2000 or that an earlier 2200 record already has.";
|
|
722
|
-
}, {
|
|
723
|
-
readonly id: "parse.countrySection";
|
|
724
|
-
readonly severity: "error";
|
|
725
|
-
readonly source: "spec";
|
|
726
|
-
readonly scope: "parse";
|
|
727
|
-
readonly description: "A country-amount section (record 2200) with an affiliation other than 1, a malformed country code, a truncated entry, more than 10 entries, or non-zero data after the last entry.";
|
|
728
|
-
readonly specRef: {
|
|
729
|
-
readonly page: 31;
|
|
730
|
-
};
|
|
731
|
-
}, {
|
|
732
|
-
readonly id: "parse.derivedMismatch";
|
|
733
|
-
readonly severity: "error";
|
|
734
|
-
readonly source: "derived";
|
|
735
|
-
readonly scope: "parse";
|
|
736
|
-
readonly description: "A derived value (SPEC §7.4) that disagrees with the value derived again from its source in the file: 832 vs a 2000 record, 833 = no with capital-gains records or untransmitted appendices, codes 008/028/273/277/278/280/297, 1010/1020 serial numbers, 1030 affiliation, 30xx transaction symbol, appendix and \"מספר בתל\"ם\" sequence numbers, 3077@245 improvement count.";
|
|
737
|
-
}];
|
|
738
|
-
/** Stable rule ID (SPEC §10). */
|
|
739
|
-
export type RuleId = (typeof RULES)[number]['id'];
|
|
740
|
-
/** Metadata of one rule (SPEC §9.1). */
|
|
741
|
-
export type RuleMeta = Omit<RuleMetaInput, 'id'> & {
|
|
742
|
-
id: RuleId;
|
|
743
|
-
};
|
|
744
|
-
/** The catalogue entry of a rule. */
|
|
745
|
-
export declare function ruleMeta(id: RuleId): RuleMeta;
|
|
746
|
-
export {};
|