@accounter/opcn1214-generator 0.0.0-bootstrap.0
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/.bob/cjs/api/generate.d.ts +44 -0
- package/.bob/cjs/api/generate.js +115 -0
- package/.bob/cjs/api/parse.d.ts +28 -0
- package/.bob/cjs/api/parse.js +38 -0
- package/.bob/cjs/api/response.d.ts +24 -0
- package/.bob/cjs/api/response.js +75 -0
- package/.bob/cjs/api/validate.d.ts +16 -0
- package/.bob/cjs/api/validate.js +15 -0
- package/.bob/cjs/codec/boolean.d.ts +7 -0
- package/.bob/cjs/codec/boolean.js +49 -0
- package/.bob/cjs/codec/date.d.ts +6 -0
- package/.bob/cjs/codec/date.js +68 -0
- package/.bob/cjs/codec/enum.d.ts +4 -0
- package/.bob/cjs/codec/enum.js +26 -0
- package/.bob/cjs/codec/numeric.d.ts +56 -0
- package/.bob/cjs/codec/numeric.js +186 -0
- package/.bob/cjs/codec/padding.d.ts +10 -0
- package/.bob/cjs/codec/padding.js +26 -0
- package/.bob/cjs/codec/percent.d.ts +6 -0
- package/.bob/cjs/codec/percent.js +33 -0
- package/.bob/cjs/codec/phone.d.ts +4 -0
- package/.bob/cjs/codec/phone.js +48 -0
- package/.bob/cjs/codec/record.d.ts +18 -0
- package/.bob/cjs/codec/record.js +176 -0
- package/.bob/cjs/codec/registry.d.ts +8 -0
- package/.bob/cjs/codec/registry.js +27 -0
- package/.bob/cjs/codec/sections.d.ts +41 -0
- package/.bob/cjs/codec/sections.js +177 -0
- package/.bob/cjs/codec/text.d.ts +5 -0
- package/.bob/cjs/codec/text.js +29 -0
- package/.bob/cjs/codec/types.d.ts +36 -0
- package/.bob/cjs/codec/types.js +16 -0
- package/.bob/cjs/codec/windows1255.d.ts +9 -0
- package/.bob/cjs/codec/windows1255.js +38 -0
- package/.bob/cjs/errors.d.ts +32 -0
- package/.bob/cjs/errors.js +103 -0
- package/.bob/cjs/file/assemble.d.ts +17 -0
- package/.bob/cjs/file/assemble.js +28 -0
- package/.bob/cjs/file/control.d.ts +13 -0
- package/.bob/cjs/file/control.js +45 -0
- package/.bob/cjs/file/parse.d.ts +18 -0
- package/.bob/cjs/file/parse.js +478 -0
- package/.bob/cjs/file/split.d.ts +17 -0
- package/.bob/cjs/file/split.js +71 -0
- package/.bob/cjs/index.d.ts +16 -0
- package/.bob/cjs/index.js +28 -0
- package/.bob/cjs/layout/2024/layout.generated.d.ts +6919 -0
- package/.bob/cjs/layout/2024/layout.generated.js +7224 -0
- package/.bob/cjs/layout/2025/index.d.ts +6 -0
- package/.bob/cjs/layout/2025/index.js +10 -0
- package/.bob/cjs/layout/capital-gains.d.ts +9 -0
- package/.bob/cjs/layout/capital-gains.js +15 -0
- package/.bob/cjs/layout/countries.d.ts +5 -0
- package/.bob/cjs/layout/countries.js +10 -0
- package/.bob/cjs/layout/freeze.d.ts +5 -0
- package/.bob/cjs/layout/freeze.js +16 -0
- package/.bob/cjs/layout/registry.d.ts +10 -0
- package/.bob/cjs/layout/registry.js +32 -0
- package/.bob/cjs/layout/types.d.ts +82 -0
- package/.bob/cjs/layout/types.js +35 -0
- package/.bob/cjs/model/codes.generated.d.ts +48 -0
- package/.bob/cjs/model/codes.generated.js +628 -0
- package/.bob/cjs/model/index.d.ts +3 -0
- package/.bob/cjs/model/index.js +5 -0
- package/.bob/cjs/model/input.d.ts +543 -0
- package/.bob/cjs/model/input.js +24 -0
- package/.bob/cjs/model/normalized.d.ts +43 -0
- package/.bob/cjs/model/normalized.js +0 -0
- package/.bob/cjs/model/options.d.ts +14 -0
- package/.bob/cjs/model/options.js +0 -0
- package/.bob/cjs/model/schema.d.ts +594 -0
- package/.bob/cjs/model/schema.js +339 -0
- package/.bob/cjs/normalize/canonical.d.ts +13 -0
- package/.bob/cjs/normalize/canonical.js +288 -0
- package/.bob/cjs/normalize/capital-gains/assets.d.ts +37 -0
- package/.bob/cjs/normalize/capital-gains/assets.js +94 -0
- package/.bob/cjs/normalize/capital-gains/index.d.ts +61 -0
- package/.bob/cjs/normalize/capital-gains/index.js +149 -0
- package/.bob/cjs/normalize/capital-gains/no-withholding.d.ts +18 -0
- package/.bob/cjs/normalize/capital-gains/no-withholding.js +36 -0
- package/.bob/cjs/normalize/capital-gains/other.d.ts +54 -0
- package/.bob/cjs/normalize/capital-gains/other.js +122 -0
- package/.bob/cjs/normalize/capital-gains/section6.d.ts +7 -0
- package/.bob/cjs/normalize/capital-gains/section6.js +13 -0
- package/.bob/cjs/normalize/capital-gains/securities.d.ts +26 -0
- package/.bob/cjs/normalize/capital-gains/securities.js +58 -0
- package/.bob/cjs/normalize/denormalize.d.ts +42 -0
- package/.bob/cjs/normalize/denormalize.js +359 -0
- package/.bob/cjs/normalize/derive.d.ts +57 -0
- package/.bob/cjs/normalize/derive.js +111 -0
- package/.bob/cjs/normalize/enums.d.ts +58 -0
- package/.bob/cjs/normalize/enums.js +69 -0
- package/.bob/cjs/normalize/fields.d.ts +28 -0
- package/.bob/cjs/normalize/fields.js +86 -0
- package/.bob/cjs/normalize/foreign.d.ts +22 -0
- package/.bob/cjs/normalize/foreign.js +85 -0
- package/.bob/cjs/normalize/main.d.ts +24 -0
- package/.bob/cjs/normalize/main.js +208 -0
- package/.bob/cjs/normalize/paths.d.ts +74 -0
- package/.bob/cjs/normalize/paths.js +169 -0
- package/.bob/cjs/normalize/phone.d.ts +12 -0
- package/.bob/cjs/normalize/phone.js +35 -0
- package/.bob/cjs/normalize/rd-investments.d.ts +10 -0
- package/.bob/cjs/normalize/rd-investments.js +25 -0
- package/.bob/cjs/normalize/related-companies.d.ts +10 -0
- package/.bob/cjs/normalize/related-companies.js +25 -0
- package/.bob/cjs/normalize/report.d.ts +9 -0
- package/.bob/cjs/normalize/report.js +53 -0
- package/.bob/cjs/normalize/shareholders.d.ts +10 -0
- package/.bob/cjs/normalize/shareholders.js +30 -0
- package/.bob/cjs/normalize/text.d.ts +11 -0
- package/.bob/cjs/normalize/text.js +41 -0
- package/.bob/cjs/normalize/today.d.ts +4 -0
- package/.bob/cjs/normalize/today.js +14 -0
- package/.bob/cjs/pipeline.d.ts +13 -0
- package/.bob/cjs/pipeline.js +37 -0
- package/.bob/cjs/response/codes.d.ts +2 -0
- package/.bob/cjs/response/codes.js +31 -0
- package/.bob/cjs/validate/capital-gains-rules.d.ts +6 -0
- package/.bob/cjs/validate/capital-gains-rules.js +162 -0
- package/.bob/cjs/validate/check-digit.d.ts +10 -0
- package/.bob/cjs/validate/check-digit.js +26 -0
- package/.bob/cjs/validate/engine.d.ts +5 -0
- package/.bob/cjs/validate/engine.js +35 -0
- package/.bob/cjs/validate/field-rules.d.ts +4 -0
- package/.bob/cjs/validate/field-rules.js +331 -0
- package/.bob/cjs/validate/foreign-rules.d.ts +6 -0
- package/.bob/cjs/validate/foreign-rules.js +171 -0
- package/.bob/cjs/validate/issue.d.ts +51 -0
- package/.bob/cjs/validate/issue.js +78 -0
- package/.bob/cjs/validate/main-rules.d.ts +24 -0
- package/.bob/cjs/validate/main-rules.js +425 -0
- package/.bob/cjs/validate/parse-rules.d.ts +31 -0
- package/.bob/cjs/validate/parse-rules.js +114 -0
- package/.bob/cjs/validate/rules.d.ts +746 -0
- package/.bob/cjs/validate/rules.js +680 -0
- package/.bob/cjs/validate/shape.d.ts +19 -0
- package/.bob/cjs/validate/shape.js +231 -0
- package/.bob/cjs/validate/shareholder-rules.d.ts +6 -0
- package/.bob/cjs/validate/shareholder-rules.js +83 -0
- package/.bob/cjs/validate/structure-rules.d.ts +26 -0
- package/.bob/cjs/validate/structure-rules.js +130 -0
- package/.bob/esm/api/generate.d.ts +44 -0
- package/.bob/esm/api/generate.js +111 -0
- package/.bob/esm/api/parse.d.ts +28 -0
- package/.bob/esm/api/parse.js +34 -0
- package/.bob/esm/api/response.d.ts +24 -0
- package/.bob/esm/api/response.js +72 -0
- package/.bob/esm/api/validate.d.ts +16 -0
- package/.bob/esm/api/validate.js +11 -0
- package/.bob/esm/codec/boolean.d.ts +7 -0
- package/.bob/esm/codec/boolean.js +46 -0
- package/.bob/esm/codec/date.d.ts +6 -0
- package/.bob/esm/codec/date.js +64 -0
- package/.bob/esm/codec/enum.d.ts +4 -0
- package/.bob/esm/codec/enum.js +23 -0
- package/.bob/esm/codec/numeric.d.ts +56 -0
- package/.bob/esm/codec/numeric.js +175 -0
- package/.bob/esm/codec/padding.d.ts +10 -0
- package/.bob/esm/codec/padding.js +21 -0
- package/.bob/esm/codec/percent.d.ts +6 -0
- package/.bob/esm/codec/percent.js +30 -0
- package/.bob/esm/codec/phone.d.ts +4 -0
- package/.bob/esm/codec/phone.js +45 -0
- package/.bob/esm/codec/record.d.ts +18 -0
- package/.bob/esm/codec/record.js +172 -0
- package/.bob/esm/codec/registry.d.ts +8 -0
- package/.bob/esm/codec/registry.js +23 -0
- package/.bob/esm/codec/sections.d.ts +41 -0
- package/.bob/esm/codec/sections.js +170 -0
- package/.bob/esm/codec/text.d.ts +5 -0
- package/.bob/esm/codec/text.js +26 -0
- package/.bob/esm/codec/types.d.ts +36 -0
- package/.bob/esm/codec/types.js +12 -0
- package/.bob/esm/codec/windows1255.d.ts +9 -0
- package/.bob/esm/codec/windows1255.js +32 -0
- package/.bob/esm/errors.d.ts +32 -0
- package/.bob/esm/errors.js +94 -0
- package/.bob/esm/file/assemble.d.ts +17 -0
- package/.bob/esm/file/assemble.js +25 -0
- package/.bob/esm/file/control.d.ts +13 -0
- package/.bob/esm/file/control.js +41 -0
- package/.bob/esm/file/parse.d.ts +18 -0
- package/.bob/esm/file/parse.js +474 -0
- package/.bob/esm/file/split.d.ts +17 -0
- package/.bob/esm/file/split.js +68 -0
- package/.bob/esm/index.d.ts +16 -0
- package/.bob/esm/index.js +11 -0
- package/.bob/esm/layout/2024/layout.generated.d.ts +6919 -0
- package/.bob/esm/layout/2024/layout.generated.js +7221 -0
- package/.bob/esm/layout/2025/index.d.ts +6 -0
- package/.bob/esm/layout/2025/index.js +7 -0
- package/.bob/esm/layout/capital-gains.d.ts +9 -0
- package/.bob/esm/layout/capital-gains.js +11 -0
- package/.bob/esm/layout/countries.d.ts +5 -0
- package/.bob/esm/layout/countries.js +7 -0
- package/.bob/esm/layout/freeze.d.ts +5 -0
- package/.bob/esm/layout/freeze.js +13 -0
- package/.bob/esm/layout/registry.d.ts +10 -0
- package/.bob/esm/layout/registry.js +27 -0
- package/.bob/esm/layout/types.d.ts +82 -0
- package/.bob/esm/layout/types.js +32 -0
- package/.bob/esm/model/codes.generated.d.ts +48 -0
- package/.bob/esm/model/codes.generated.js +625 -0
- package/.bob/esm/model/index.d.ts +3 -0
- package/.bob/esm/model/index.js +2 -0
- package/.bob/esm/model/input.d.ts +543 -0
- package/.bob/esm/model/input.js +21 -0
- package/.bob/esm/model/normalized.d.ts +43 -0
- package/.bob/esm/model/normalized.js +0 -0
- package/.bob/esm/model/options.d.ts +14 -0
- package/.bob/esm/model/options.js +0 -0
- package/.bob/esm/model/schema.d.ts +594 -0
- package/.bob/esm/model/schema.js +335 -0
- package/.bob/esm/normalize/canonical.d.ts +13 -0
- package/.bob/esm/normalize/canonical.js +285 -0
- package/.bob/esm/normalize/capital-gains/assets.d.ts +37 -0
- package/.bob/esm/normalize/capital-gains/assets.js +87 -0
- package/.bob/esm/normalize/capital-gains/index.d.ts +61 -0
- package/.bob/esm/normalize/capital-gains/index.js +142 -0
- package/.bob/esm/normalize/capital-gains/no-withholding.d.ts +18 -0
- package/.bob/esm/normalize/capital-gains/no-withholding.js +31 -0
- package/.bob/esm/normalize/capital-gains/other.d.ts +54 -0
- package/.bob/esm/normalize/capital-gains/other.js +112 -0
- package/.bob/esm/normalize/capital-gains/section6.d.ts +7 -0
- package/.bob/esm/normalize/capital-gains/section6.js +9 -0
- package/.bob/esm/normalize/capital-gains/securities.d.ts +26 -0
- package/.bob/esm/normalize/capital-gains/securities.js +52 -0
- package/.bob/esm/normalize/denormalize.d.ts +42 -0
- package/.bob/esm/normalize/denormalize.js +354 -0
- package/.bob/esm/normalize/derive.d.ts +57 -0
- package/.bob/esm/normalize/derive.js +99 -0
- package/.bob/esm/normalize/enums.d.ts +58 -0
- package/.bob/esm/normalize/enums.js +64 -0
- package/.bob/esm/normalize/fields.d.ts +28 -0
- package/.bob/esm/normalize/fields.js +81 -0
- package/.bob/esm/normalize/foreign.d.ts +22 -0
- package/.bob/esm/normalize/foreign.js +81 -0
- package/.bob/esm/normalize/main.d.ts +24 -0
- package/.bob/esm/normalize/main.js +204 -0
- package/.bob/esm/normalize/paths.d.ts +74 -0
- package/.bob/esm/normalize/paths.js +161 -0
- package/.bob/esm/normalize/phone.d.ts +12 -0
- package/.bob/esm/normalize/phone.js +32 -0
- package/.bob/esm/normalize/rd-investments.d.ts +10 -0
- package/.bob/esm/normalize/rd-investments.js +22 -0
- package/.bob/esm/normalize/related-companies.d.ts +10 -0
- package/.bob/esm/normalize/related-companies.js +22 -0
- package/.bob/esm/normalize/report.d.ts +9 -0
- package/.bob/esm/normalize/report.js +50 -0
- package/.bob/esm/normalize/shareholders.d.ts +10 -0
- package/.bob/esm/normalize/shareholders.js +27 -0
- package/.bob/esm/normalize/text.d.ts +11 -0
- package/.bob/esm/normalize/text.js +37 -0
- package/.bob/esm/normalize/today.d.ts +4 -0
- package/.bob/esm/normalize/today.js +11 -0
- package/.bob/esm/pipeline.d.ts +13 -0
- package/.bob/esm/pipeline.js +34 -0
- package/.bob/esm/response/codes.d.ts +2 -0
- package/.bob/esm/response/codes.js +28 -0
- package/.bob/esm/validate/capital-gains-rules.d.ts +6 -0
- package/.bob/esm/validate/capital-gains-rules.js +159 -0
- package/.bob/esm/validate/check-digit.d.ts +10 -0
- package/.bob/esm/validate/check-digit.js +23 -0
- package/.bob/esm/validate/engine.d.ts +5 -0
- package/.bob/esm/validate/engine.js +32 -0
- package/.bob/esm/validate/field-rules.d.ts +4 -0
- package/.bob/esm/validate/field-rules.js +328 -0
- package/.bob/esm/validate/foreign-rules.d.ts +6 -0
- package/.bob/esm/validate/foreign-rules.js +168 -0
- package/.bob/esm/validate/issue.d.ts +51 -0
- package/.bob/esm/validate/issue.js +72 -0
- package/.bob/esm/validate/main-rules.d.ts +24 -0
- package/.bob/esm/validate/main-rules.js +420 -0
- package/.bob/esm/validate/parse-rules.d.ts +31 -0
- package/.bob/esm/validate/parse-rules.js +110 -0
- package/.bob/esm/validate/rules.d.ts +746 -0
- package/.bob/esm/validate/rules.js +676 -0
- package/.bob/esm/validate/shape.d.ts +19 -0
- package/.bob/esm/validate/shape.js +227 -0
- package/.bob/esm/validate/shareholder-rules.d.ts +6 -0
- package/.bob/esm/validate/shareholder-rules.js +80 -0
- package/.bob/esm/validate/structure-rules.d.ts +26 -0
- package/.bob/esm/validate/structure-rules.js +122 -0
- package/.bob/tsconfig.tsbuildinfo +1 -0
- package/.gitattributes +1 -0
- package/CLAUDE.md +39 -0
- package/README.md +337 -0
- package/dist/cjs/index.js +28 -0
- package/dist/esm/index.js +11 -0
- package/documentation/IMPLEMENTATION_PLAN.md +2258 -0
- package/documentation/SPEC.md +1803 -0
- package/documentation/layout/2024/codes.csv +261 -0
- package/documentation/layout/2024/countries.csv +256 -0
- package/documentation/layout/2024/fields.csv +271 -0
- package/documentation/layout/2024/records.csv +18 -0
- package/documentation/layout/README.md +87 -0
- package/documentation/specifications/1214-2024.pdf +0 -0
- package/documentation/tools/extract_layout.py +191 -0
- package/package.json +77 -0
- package/scripts/generate-layout.ts +23 -0
- package/scripts/layout/csv.ts +111 -0
- package/scripts/layout/derived-codes.ts +12 -0
- package/scripts/layout/render.ts +364 -0
- package/scripts/layout/sources.ts +51 -0
- package/scripts/layout/values.ts +42 -0
- package/scripts/render-rules-table.ts +66 -0
- package/src/api/generate.ts +169 -0
- package/src/api/parse.ts +58 -0
- package/src/api/response.ts +110 -0
- package/src/api/validate.ts +26 -0
- package/src/codec/boolean.ts +62 -0
- package/src/codec/date.ts +75 -0
- package/src/codec/enum.ts +28 -0
- package/src/codec/numeric.ts +208 -0
- package/src/codec/padding.ts +33 -0
- package/src/codec/percent.ts +35 -0
- package/src/codec/phone.ts +54 -0
- package/src/codec/record.ts +206 -0
- package/src/codec/registry.ts +27 -0
- package/src/codec/sections.ts +208 -0
- package/src/codec/text.ts +31 -0
- package/src/codec/types.ts +47 -0
- package/src/codec/windows1255.ts +38 -0
- package/src/errors.ts +114 -0
- package/src/file/assemble.ts +42 -0
- package/src/file/control.ts +59 -0
- package/src/file/parse.ts +620 -0
- package/src/file/split.ts +86 -0
- package/src/index.ts +70 -0
- package/src/layout/2024/layout.generated.ts +7238 -0
- package/src/layout/2025/index.ts +9 -0
- package/src/layout/capital-gains.ts +20 -0
- package/src/layout/countries.ts +7 -0
- package/src/layout/freeze.ts +13 -0
- package/src/layout/registry.ts +33 -0
- package/src/layout/types.ts +134 -0
- package/src/model/codes.generated.ts +1190 -0
- package/src/model/index.ts +4 -0
- package/src/model/input.ts +594 -0
- package/src/model/normalized.ts +38 -0
- package/src/model/options.ts +17 -0
- package/src/model/schema.ts +381 -0
- package/src/normalize/canonical.ts +374 -0
- package/src/normalize/capital-gains/assets.ts +112 -0
- package/src/normalize/capital-gains/index.ts +212 -0
- package/src/normalize/capital-gains/no-withholding.ts +46 -0
- package/src/normalize/capital-gains/other.ts +153 -0
- package/src/normalize/capital-gains/section6.ts +14 -0
- package/src/normalize/capital-gains/securities.ts +73 -0
- package/src/normalize/denormalize.ts +426 -0
- package/src/normalize/derive.ts +136 -0
- package/src/normalize/enums.ts +87 -0
- package/src/normalize/fields.ts +110 -0
- package/src/normalize/foreign.ts +114 -0
- package/src/normalize/main.ts +284 -0
- package/src/normalize/paths.ts +184 -0
- package/src/normalize/phone.ts +45 -0
- package/src/normalize/rd-investments.ts +38 -0
- package/src/normalize/related-companies.ts +37 -0
- package/src/normalize/report.ts +59 -0
- package/src/normalize/shareholders.ts +42 -0
- package/src/normalize/text.ts +40 -0
- package/src/normalize/today.ts +15 -0
- package/src/pipeline.ts +42 -0
- package/src/response/codes.ts +30 -0
- package/src/validate/capital-gains-rules.ts +199 -0
- package/src/validate/check-digit.ts +25 -0
- package/src/validate/engine.ts +45 -0
- package/src/validate/field-rules.ts +383 -0
- package/src/validate/foreign-rules.ts +274 -0
- package/src/validate/issue.ts +121 -0
- package/src/validate/main-rules.ts +678 -0
- package/src/validate/parse-rules.ts +169 -0
- package/src/validate/rules.ts +747 -0
- package/src/validate/shape.ts +278 -0
- package/src/validate/shareholder-rules.ts +92 -0
- package/src/validate/structure-rules.ts +136 -0
- package/tests/api/batch.test.ts +227 -0
- package/tests/api/exports.test.ts +355 -0
- package/tests/api/generate.test.ts +409 -0
- package/tests/api/parse.test.ts +789 -0
- package/tests/api/response.test.ts +152 -0
- package/tests/api/validate.test.ts +86 -0
- package/tests/codec/numeric.test.ts +325 -0
- package/tests/codec/record.test.ts +318 -0
- package/tests/codec/registry.test.ts +17 -0
- package/tests/codec/sections.test.ts +333 -0
- package/tests/codec/text.test.ts +454 -0
- package/tests/codec/windows1255.test.ts +46 -0
- package/tests/docs/readme.test.ts +69 -0
- package/tests/edge-cases.test.ts +359 -0
- package/tests/errors.test.ts +138 -0
- package/tests/file/assemble.test.ts +188 -0
- package/tests/file/split.test.ts +61 -0
- package/tests/fixtures/builders.ts +512 -0
- package/tests/fixtures/files.ts +78 -0
- package/tests/fixtures/golden/README.md +37 -0
- package/tests/fixtures/golden/VERIFICATION.md +72 -0
- package/tests/fixtures/golden/batch-50.input.ts +92 -0
- package/tests/fixtures/golden/batch-50.opcn +150 -0
- package/tests/fixtures/golden/capital-gains-max.input.ts +177 -0
- package/tests/fixtures/golden/capital-gains-max.opcn +17 -0
- package/tests/fixtures/golden/cg-27.input.ts +63 -0
- package/tests/fixtures/golden/cg-27.opcn +4 -0
- package/tests/fixtures/golden/cg-50.input.ts +59 -0
- package/tests/fixtures/golden/cg-50.opcn +4 -0
- package/tests/fixtures/golden/cg-51.input.ts +60 -0
- package/tests/fixtures/golden/cg-51.opcn +4 -0
- package/tests/fixtures/golden/cg-54.input.ts +53 -0
- package/tests/fixtures/golden/cg-54.opcn +4 -0
- package/tests/fixtures/golden/cg-60.input.ts +77 -0
- package/tests/fixtures/golden/cg-60.opcn +4 -0
- package/tests/fixtures/golden/cg-63.input.ts +51 -0
- package/tests/fixtures/golden/cg-63.opcn +4 -0
- package/tests/fixtures/golden/cg-64.input.ts +62 -0
- package/tests/fixtures/golden/cg-64.opcn +4 -0
- package/tests/fixtures/golden/cg-65.input.ts +79 -0
- package/tests/fixtures/golden/cg-65.opcn +4 -0
- package/tests/fixtures/golden/cg-66.input.ts +53 -0
- package/tests/fixtures/golden/cg-66.opcn +4 -0
- package/tests/fixtures/golden/cg-77.input.ts +109 -0
- package/tests/fixtures/golden/cg-77.opcn +4 -0
- package/tests/fixtures/golden/foreign.input.ts +202 -0
- package/tests/fixtures/golden/foreign.opcn +27 -0
- package/tests/fixtures/golden/hebrew-edge.input.ts +90 -0
- package/tests/fixtures/golden/hebrew-edge.opcn +8 -0
- package/tests/fixtures/golden/kibbutz.input.ts +31 -0
- package/tests/fixtures/golden/kibbutz.opcn +2 -0
- package/tests/fixtures/golden/main-full.input.ts +780 -0
- package/tests/fixtures/golden/main-full.opcn +101 -0
- package/tests/fixtures/golden/minimal.input.ts +37 -0
- package/tests/fixtures/golden/minimal.opcn +3 -0
- package/tests/fixtures/golden/related-and-rd.input.ts +59 -0
- package/tests/fixtures/golden/related-and-rd.opcn +11 -0
- package/tests/fixtures/random.ts +843 -0
- package/tests/golden/fixtures.test.ts +627 -0
- package/tests/golden/golden.test.ts +95 -0
- package/tests/helpers/coverage.ts +18 -0
- package/tests/helpers/sample-values.ts +114 -0
- package/tests/layout/codegen-sync.test.ts +19 -0
- package/tests/layout/integrity.test.ts +232 -0
- package/tests/layout/registry.test.ts +98 -0
- package/tests/model/code-unions.test.ts +91 -0
- package/tests/model/schema.test.ts +1031 -0
- package/tests/normalize/canonical.test.ts +728 -0
- package/tests/normalize/capital-gains.test.ts +1850 -0
- package/tests/normalize/coverage.test.ts +88 -0
- package/tests/normalize/denormalize.test.ts +318 -0
- package/tests/normalize/enums.test.ts +118 -0
- package/tests/normalize/foreign.test.ts +273 -0
- package/tests/normalize/main.test.ts +839 -0
- package/tests/normalize/paths.test.ts +257 -0
- package/tests/normalize/rd-investments.test.ts +99 -0
- package/tests/normalize/related-companies.test.ts +106 -0
- package/tests/normalize/shareholders.test.ts +117 -0
- package/tests/normalize/text.test.ts +86 -0
- package/tests/pipeline.test.ts +96 -0
- package/tests/roundtrip/determinism.test.ts +207 -0
- package/tests/roundtrip/property.test.ts +126 -0
- package/tests/roundtrip/roundtrip.test.ts +573 -0
- package/tests/rules/cases.ts +873 -0
- package/tests/rules/rules.test.ts +69 -0
- package/tests/rules/spec-sync.test.ts +80 -0
- package/tests/scripts/csv.test.ts +78 -0
- package/tests/scripts/values.test.ts +80 -0
- package/tests/validate/capital-gains-rules.test.ts +307 -0
- package/tests/validate/check-digit.test.ts +42 -0
- package/tests/validate/field-rules.test.ts +867 -0
- package/tests/validate/foreign-rules.test.ts +255 -0
- package/tests/validate/issue.test.ts +96 -0
- package/tests/validate/main-rules.test.ts +761 -0
- package/tests/validate/parse-rules.test.ts +293 -0
- package/tests/validate/shareholder-rules.test.ts +143 -0
- package/tsconfig.json +10 -0
- package/tsconfig.typecheck.json +9 -0
- package/vitest.config.ts +11 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
record,position,length,end,type,required,requiredNote,key,kind,values,nameHe,notesHe,changes2024,specPage,extractionNote
|
|
2
|
+
1000,137,9,145,numeric,yes,,company.fileNumber,id9,,מספר תיק,,,5,
|
|
3
|
+
1000,146,4,149,numeric,yes,,taxYear,year,,שנת מס,,,5,
|
|
4
|
+
1000,150,15,164,alphanumeric,yes,,meta.softwareName,text,,שם בית תוכנה,,,5,
|
|
5
|
+
1000,165,10,174,alphanumeric,yes,,meta.saveDate,date,,תאריך שמירה,DD/MM/YYYY,,5,
|
|
6
|
+
1000,175,50,224,alphanumeric,yes,,company.registeredName,text,,שם רשום,"במידה ולא תואם למרשמים, השם נלקח מהמרשים.",,5,
|
|
7
|
+
1000,225,9,233,numeric,no,,company.withholdingFileNumber,id9,,תיק ניכויים,,,6,
|
|
8
|
+
1000,234,9,242,numeric,no,,company.vatFileNumber,id9,,"תיק מע""מ",,,6,
|
|
9
|
+
1000,243,50,292,alphanumeric,no,,company.occupationDescription,text,,תיאור עיסוק,,,6,
|
|
10
|
+
1000,293,50,342,alphanumeric,yes,,company.mailingAddress,text,,כתובת למשלוח דואר,,,6,
|
|
11
|
+
1000,343,50,392,alphanumeric,yes,,company.businessAddress,text,,כתובת העסק,,,6,
|
|
12
|
+
1000,393,50,442,alphanumeric,no,,company.booksAddress,text,,כתובת בה מוחזקת מערכת החשבונות,,,6,
|
|
13
|
+
1000,443,50,492,alphanumeric,no,,company.email,text,,כתובת מייל,,,6,
|
|
14
|
+
1000,493,3,495,alphanumeric,yes,,company.phone.prefix,phonePrefix,02;03;04;08;09;072;073;074;076;077;050;052;053;054;055;057;058;059,קידומת טלפון,"ערכים תקינים: 02,03,04,08,09 ,072,073 074,076,077,0 50,052,053 054,055,057,0 58,059 במידה והערך לא תקין, הוא ימחק.",,6,
|
|
15
|
+
1000,496,7,502,numeric,yes,,company.phone.number,digits,,מספר טלפון,,,6,
|
|
16
|
+
1000,503,3,505,alphanumeric,no,,company.fax.prefix,phonePrefix,02;03;04;08;09;072;073;074;076;077;050;052;053;054;055;057;058;059,קידומת טלפון/פקס,"ערכים תקינים: 02,03,04,08,09 ,072,073 074,076,077,0 50,052,053 054,055,057,0 58,059 במידה והערך לא תקין, הוא ימחק.",,6,
|
|
17
|
+
1000,506,7,512,numeric,no,,company.fax.number,digits,,מספר טלפון/פקס,,,6,
|
|
18
|
+
1000,513,50,562,alphanumeric,no,,filler,filler,,Filler,,,6,
|
|
19
|
+
1000,563,50,612,alphanumeric,no,,preparer.officeName,text,,שם המשרד המסייע,,,6,
|
|
20
|
+
1000,613,50,662,alphanumeric,no,,preparer.contactName,text,,שם איש קשר במשרד המסייע,,,6,
|
|
21
|
+
1000,663,50,712,alphanumeric,no,,preparer.name,text,,שם המסייע,,,6,
|
|
22
|
+
1000,713,50,762,alphanumeric,no,,preparer.profession,text,,מקצוע המסייע,,,6,
|
|
23
|
+
1000,763,9,771,numeric,no,,preparer.licensedDealerNumber,id9,,מספר עוסק מורשה (מסייע),,,6,
|
|
24
|
+
1000,772,50,821,alphanumeric,no,,preparer.address,text,,כתובת המסייע,,,7,
|
|
25
|
+
1000,822,3,824,numeric,no,,preparer.phone.prefix,phonePrefix,02;03;04;08;09;072;073;074;076;077;050;052;053;054;055;057;058;059,קידומת טלפון מסייע,"ערכים תקינים: 02,03,04,08,09 ,072,073 074,076,077,0 50,052,053 054,055,057,0 58,059 במידה והערך לא תקין, הוא ימחק.",,7,
|
|
26
|
+
1000,825,7,831,numeric,no,,preparer.phone.number,digits,,טלפון מסייע,,,7,
|
|
27
|
+
1000,832,1,832,numeric,yes,,(derived) hasForeignAppendix,yesNo,1=yes;2=no,"קיים נספח חו""ל","1- כן, 2- לא",,7,
|
|
28
|
+
1000,833,1,833,numeric,yes,,declarations.hasCapitalGainsAppendix,yesNo,1=yes;2=no,קיים נספח רווח הון,"1- כן, 2- לא",,7,
|
|
29
|
+
1000,834,1,834,numeric,no,,declarations.form6111Obligation,enum,"1=turnover above threshold, must file 6111 (code 297=8);2=not obliged (code 297=9);3=not relevant","המחזור מכלל העסקים הוא מעל 256,410 ₪",1-חייב בטופס 6111 (יש למלא בנוסף שדה 297 עם ערך 8) 2-לא חייב (יש למלא בנוסף שדה 297 עם ערך 9) 3 – לא רלוונטי,,7,
|
|
30
|
+
1000,835,1,835,numeric,no,,declarations.financialStatementsAttached,flag,1=marked,"סימון צורפו לדו""ח דוחות כספיים ודו""ח התאמה",1-סומן,,7,
|
|
31
|
+
1000,836,1,836,numeric,conditional,חובה במקרה של חברה משפחתית,declarations.familyCompany.isFamilyCompany,flag,1=marked,סימון החברה חברה משפחתית,1-סומן,,7,
|
|
32
|
+
1000,837,9,845,numeric,conditional,חובה במקרה של חברה משפחתית,declarations.familyCompany.representativeFileNumber,id9,,מספר תיק הנישום,,,7,
|
|
33
|
+
1000,846,1,846,numeric,conditional,חובה במקרה של חברת בית,declarations.isHouseCompany,flag,1=marked,סימון חברת בית,1-סומן,,7,
|
|
34
|
+
1000,847,1,847,numeric,no,,declarations.form1343Attached,flag,1=marked,סימון טופס – 1343,1-סומן,,8,
|
|
35
|
+
1000,848,1,848,numeric,no,,declarations.form1344Attached,flag,1=marked,סימון טופס – 1344,1-סומן,,8,
|
|
36
|
+
1000,849,1,849,numeric,conditional,חובה כאשר שדה 101 או 102 מלאים,declarations.claimsCapitalInvestmentLawBenefits,flag,1=marked,סימון נתבעות הטבות לפי חוק לעידוד השקעות הון,1-סומן,,8,
|
|
37
|
+
1000,850,1,850,numeric,no,,declarations.preferredEnterprise,flag,1=marked,סימון במפעל מועדף,1-סומן,,8,
|
|
38
|
+
1000,851,1,851,numeric,no,,declarations.beneficiaryEnterprise.marked,flag,1=marked,סימון במפעל מוטב,1-סומן,,8,
|
|
39
|
+
1000,852,10,861,alphanumeric,conditional,חובה במקרה שסומן מפעל מוטב,declarations.beneficiaryEnterprise.noticeDate,date,,תאריך הודעה במפעל מוטב,DD/MM/YYYY,,8,
|
|
40
|
+
1000,862,1,862,numeric,no,,declarations.dividendDistributed,flag,1=marked,סימון חולק דיבידנד,1-סומן,,8,
|
|
41
|
+
1000,863,1,863,numeric,no,,declarations.specialYear.marked,flag,1=marked,סימון שנה מיוחדת,1-סומן,,8,
|
|
42
|
+
1000,864,10,873,alphanumeric,conditional,חובה במקרה שסומן שנה מיוחדת,declarations.specialYear.balanceSheetDate,date,,תאריך המאזן,DD/MM/YYYY,,8,
|
|
43
|
+
1000,874,1,874,numeric,no,,declarations.foreignInvestors,flag,1=marked,סימון משקיעי חוץ,1-סומן,,8,
|
|
44
|
+
1000,875,1,875,numeric,no,,declarations.consolidatedReport,enum,1=this report is consolidated under section 23 of the law;2=the company consolidates with its parent;3=not relevant,"דו""ח מאוחד",1-דו''ח זה מאוחד לפי סעיף 23 לחוק 2-החברה מאחדת עם חברת האם 3-לא רלוונטי,,8,
|
|
45
|
+
1000,876,1,876,numeric,no,,declarations.partnerInPartnership,flag,1=marked,סימון התאגיד שותף בשותפות,1-סומן,,8,
|
|
46
|
+
1000,877,1,877,numeric,conditional,חובה במקרה של קיבוץ וכאשר שדה 226 מלא,declarations.isKibbutz,flag,1=marked,סימון קיבוץ,1-סומן,,9,
|
|
47
|
+
1000,878,1,878,numeric,yes,,declarations.hasTaxPlanningAction,yesNo,1=yes;2=no,קיימת פעולת תכנון מס,1-כן 2-לא,,9,
|
|
48
|
+
1000,879,1,879,numeric,yes,,declarations.hadRelatedPartyTransactions,yesNo,1=yes;2=no,סימון לחברה היו עסקאות עם צדדים קשורים,1-כן 2-לא,,9,
|
|
49
|
+
1000,880,1,880,numeric,yes,,declarations.controlsBodyOfPersons,yesNo,1=yes;2=no,החברה בעלת שליטה בחבר בני אדם,1-כן 2-לא,,9,
|
|
50
|
+
1000,881,1,881,numeric,yes,,declarations.holdsRightsInBodyOfPersons,yesNo,1=yes;2=no,החברה בעלת זכויות בחבר בני אדם,1-כן 2-לא,,9,
|
|
51
|
+
1000,882,1,882,numeric,yes,,declarations.appliesAccountingStandards,yesNo,1=yes;2=no,סימון תקנים חשבונאים,1-כן (יש למלא בנוסף שדה 008 עם ערך 1) 2-לא,,9,
|
|
52
|
+
1000,883,1,883,numeric,no,,declarations.requestsAdvancePayments,yesNo,1=yes;2=no,סימון החברה דורשת מקדמות,1-כן 2-לא,,9,
|
|
53
|
+
1000,884,1,884,numeric,no,,declarations.hasBuildingIncome,yesNo,1=yes;2=no,לחברה יש הכנסות מבניין,1-כן (יש למלא בנוסף שדה 259) 2-לא,,9,
|
|
54
|
+
1000,885,1,885,numeric,no,,filler,filler,,Filler,,,9,
|
|
55
|
+
1000,886,1,886,numeric,no,,declarations.isTrustBeneficiary,flag,1=marked,סימון החברה היא נהנה בנאמנות,1-סומן,,9,
|
|
56
|
+
1000,887,50,936,alphanumeric,no,,otherTaxableIncome.source,hebrewText,,"הכנסה חייבת אחרת בארץ ובחו""ל - מקור","במקרה של מילוי, חייב אות עברית ראשונה",,9,
|
|
57
|
+
1000,937,12,948,numeric,no,,otherTaxableIncome.amount,amount,,"הכנסה חייבת אחרת בארץ ובחו""ל - סכום",,,9,
|
|
58
|
+
1000,949,5,953,alphanumeric,no,,otherTaxableIncome.ratePercent,percentX100,,"הכנסה חייבת אחרת בארץ ובחו""ל - שיעור",אחוז. 1%- 100% יכול להיות עשרוני (שתי ספרות אחרי הנקודה) נשמר פי 100 מערכו. לדוגמא: 10.23% נשמר 1023,,10,
|
|
59
|
+
1000,954,3,956,numeric,no,,attachments.donationReceiptsCount,num,,מספר אישורים מצורפים – בשדה 070 – תרומות לפי ס' 46,,,10,
|
|
60
|
+
1000,957,3,959,numeric,no,,attachments.withholdingCertificatesCount,num,,מספר אישורים מצורפים – בשדה 010 – מס הכנסה שנוכה במקור מהחברה,,,10,
|
|
61
|
+
1000,960,2,961,numeric,no,,capitalGainsSummary.totalAppendicesCount,num,,מספר כולל של נספחים,סך כל הנספחים ששודרו ולא שודרו,,10,
|
|
62
|
+
1000,962,2,963,numeric,no,,capitalGainsSummary.untransmittedCount,num,,מספר נספחי רווח הון שלא שודרו,,,10,
|
|
63
|
+
1000,964,1,964,numeric,no,,capitalGainsSummary.reasons.lossOrNoGain,flag,1=marked,סומן סיבה עסקת הפסד או שאין בה רווח,1-סומן,,10,
|
|
64
|
+
1000,965,1,965,numeric,no,,capitalGainsSummary.reasons.overFiveImprovementBalances,flag,1=marked,סומן סיבה מעל 5 יתרות הוצאות השבחה (שבגינה לא שודרו נספחי רווח הון),1-סומן,,10,
|
|
65
|
+
1000,966,1,966,numeric,no,,capitalGainsSummary.reasons.over14Appendices,flag,1=marked,סומן סיבה שיש לו מעל 14 נספחים,1-סומן,,10,
|
|
66
|
+
1000,967,1,967,numeric,no,,capitalGainsSummary.reasons.other,flag,1=marked,סומן סיבה אחרת (שבגינה לא שודרו נספחי רווח הון),1-סומן,,11,
|
|
67
|
+
1000,968,50,1017,alphanumeric,conditional,חובה כאשר סומן סיבה אחרת,capitalGainsSummary.reasons.otherText,text,,סיבה שבגללה לא שודרו נספחי רווח הון,,,11,
|
|
68
|
+
1000,1018,1,1018,numeric,no,,filler,filler,,Filler,,,11,
|
|
69
|
+
1000,1019,10,1028,alphanumeric,no,,filler,filler,,Filler,,,11,
|
|
70
|
+
1000,1029,1,1029,numeric,yes,,declarations.directorsReceivedOpinion,yesNo,1=yes;2=no,"הצהרת מנהלי החברה – החברה קבלה ""חוות דעת""","1- כן, 2- לא",,11,
|
|
71
|
+
1000,1030,1,1030,numeric,yes,,declarations.tookReportablePosition,yesNo,1=yes;2=no,החברה נקטה בעמדה חייבת בדיווח,"1- כן, 2- לא",,11,
|
|
72
|
+
1000,1031,1,1031,numeric,no,,declarations.nonDeductibleSalaryExpenses,flag,1=marked,סימון קיימות הוצאות שכר שלא מותרות בניכוי,1 - סומן,,11,
|
|
73
|
+
1000,1032,1,1032,numeric,no,,declarations.fewMembersCompany62A,flag,1=marked,סימון חברת מעטים לפי סעיף 62א',1 - סומן (בחלק א' בטופס 1214),,11,
|
|
74
|
+
1000,1033,1,1033,numeric,no,,declarations.partOfMultinationalGroup,yesNo,1=yes;2=no,סימון החברה היא חלק מקבוצה רב לאומית,1-כן 2-לא (בחלק א' בטופס 1214),,11,
|
|
75
|
+
1000,1034,3,1036,numeric,no,,declarations.reportablePositions[0],num,,מספר עמדה חייבת בדיווח - עמדה ראשונה,תואם למספרי עמדות בטופס 1346 כאשר יש סימון על 'נקטתי עמדה חייבת בדיווח' – יש צורך למלא את העמדות. ניתן למלא עד חמש עמדות החייבות בדיווח,,11,
|
|
76
|
+
1000,1037,3,1039,numeric,no,,declarations.reportablePositions[1],num,,מספר עמדה חייבת בדיווח - עמדה שנייה,תואם למספרי עמדות בטופס 1346,,11,
|
|
77
|
+
1000,1040,3,1042,numeric,no,,declarations.reportablePositions[2],num,,מספר עמדה חייבת בדיווח - עמדה שלישית,תואם למספרי עמדות בטופס 1346,,12,
|
|
78
|
+
1000,1043,3,1045,numeric,no,,declarations.reportablePositions[3],num,,מספר עמדה חייבת בדיווח - עמדה רביעית,תואם למספרי עמדות בטופס 1346,,12,
|
|
79
|
+
1000,1046,3,1048,numeric,no,,declarations.reportablePositions[4],num,,מספר עמדה חייבת בדיווח - עמדה חמישית,תואם למספרי עמדות בטופס 1346,,12,
|
|
80
|
+
1000,1049,15,1063,numeric,no,,filler,filler,,Filler,,,12,
|
|
81
|
+
1000,1064,1,1064,numeric,no,,declarations.noBankAccount,flag,1=marked,סימון – לא קיים חשבון בנק,"1- סומן: במידה ואין פרטי חשבון בנק בטופס או במרשמים, יש צורך לסמן זאת",,12,
|
|
82
|
+
1000,1065,1,1065,numeric,no,,qualifyingCompany.purchased,yesNo,1=yes;2=no,"סימון – רכישה של ""חברה מזכה""",1-כן 2-לא (בחלק א' בטופס 1214),,12,
|
|
83
|
+
1000,1066,12,1077,numeric,no,,qualifyingCompany.israeliPurchaseAmount,amount,,סכום רכישה מחברה ישראלית,(בחלק א' בטופס 1214),,12,
|
|
84
|
+
1000,1078,12,1089,numeric,no,,qualifyingCompany.foreignPurchaseAmount,amount,,סכום רכישה מחברה זרה,(בחלק א' בטופס 1214),,12,
|
|
85
|
+
1000,1090,1,1090,numeric,no,,qualifyingCompany.amortizationClaimed,yesNo,1=yes;2=no,"סימון – רכישה של ""חברה מזכה""",1-כן 2-לא (בחלק א' בטופס 1214),,12,
|
|
86
|
+
1000,1091,12,1102,alphanumeric,no,,qualifyingCompany.amortizationAmount,amountX,,"סכום הפחתה בגין רכישה של ""חברה מזכה""",ניתן למלא 0 (בחלק א' בטופס 1214),,12,
|
|
87
|
+
1000,1103,1082,2184,numeric,no,,filler,filler,,Filler1,,,12,
|
|
88
|
+
1010,137,2,138,numeric,yes,,(derived) serialNumber,serial,,מספר סידורי,,,21,
|
|
89
|
+
1010,139,50,188,alphanumeric,yes,,companyName,hebrewText,,שם החברה,,,21,
|
|
90
|
+
1010,189,9,197,numeric,no,,companyFileNumber,id9,,מספר תיק חברה,,,21,
|
|
91
|
+
1010,198,1,198,numeric,yes,,relationType,enum,1=parent;2=subsidiary;3=partnership;4=corporation related to a kibbutz;5=jointly controlled company;6=granddaughter company;7=grandmother company;8=other,סוג הקשר,1- אם 2- בת 3- שותפות 4- תאגיד קשור לקיבוץ 5- חברות שיש בהן שליטה משותפת 6- חברת נכדה 7- חברת סבתא 8- אחר,,21,
|
|
92
|
+
1010,199,2,200,numeric,no,,assessingOfficeCode,num,,משרד השומה בו מתנהל תיק החברה,,,21,
|
|
93
|
+
1010,201,960,1160,numeric,no,,filler,filler,,Filler1,,,21,
|
|
94
|
+
1020,137,2,138,numeric,yes,,(derived) serialNumber,serial,,מספר סידורי,,,22,
|
|
95
|
+
1020,139,9,147,numeric,yes,,idNumber,shareholderId,999999964=individual/corporation not registered in Israel;999999998=public shareholding,מספר זהות/תיק,מספר זהות/תיק (יחיד / תאגיד רשום בישראל (כולל יחיד הרשום במרשם תושבי חוץ ברשות המסים)) למעט: - יחיד / תאגיד לא רשום בישראל יקבל את המספר: 999999964 - החזקה של מניות ציבור יקבל את המספר: 999999998,,23,
|
|
96
|
+
1020,148,50,197,alphanumeric,yes,,fullName,hebrewText,,שם מלא,חייב אות עברית ראשונה,,23,
|
|
97
|
+
1020,198,1,198,numeric,yes,,isControllingShareholder,yesNo,1=yes;2=no,נישום בעל שליטה בחברה,1-כן 2- לא,,23,
|
|
98
|
+
1020,199,5,203,numeric,no,,dividendRightsPercent,percentLiteral,,זכות לדיבידנד,אחוז. 100%%-1 יכול להיות עשרוני (שתי ספרות אחרי הנקודה) לדוגמא: 10.23% ישמר 10.23 100% ישמר 00100 זכויות לדיבידנד של כל בעלי המניות צריכות להסתכם ל 100%.,,23,
|
|
99
|
+
1020,204,5,208,numeric,no,,votingRightsPercent,percentLiteral,,זכות הצבעה,אחוז. 100%%-1 יכול להיות עשרוני (שתי ספרות אחרי הנקודה) לדוגמא: 10.23% ישמר 10.23 100% ישמר 00100,,23,
|
|
100
|
+
1020,209,5,213,numeric,no,,otherRightsPercent,percentLiteral,,זכויות אחרות,אחוז. 100%%-1 יכול להיות עשרוני (שתי ספרות אחרי הנקודה) לדוגמא: 10.23% ישמר 10.23 100% ישמר 00100,,24,
|
|
101
|
+
1020,214,1,214,numeric,no,,isMaterialShareholder,flag,1=marked,סימון נישום בעל מניות מהותי,1 - סומן,,24,
|
|
102
|
+
1020,215,12,226,numeric,no,,salaryMonths1To9,amount,,משכורת לחודשים 1-9,,,24,
|
|
103
|
+
1020,227,12,238,numeric,no,,salaryMonths10To12,amount,,משכורת לחודשים 10-12,,,24,
|
|
104
|
+
1020,239,12,250,numeric,no,,otherPayments,amount,,תשלומים אחרים,,,24,
|
|
105
|
+
1020,251,910,1160,numeric,no,,filler,filler,,Filler1,,,24,
|
|
106
|
+
1030,137,1,137,numeric,yes,,(derived) affiliation,const,1=company,שייכות,1 - חברה,,25,
|
|
107
|
+
1030,138,50,187,alphanumeric,yes,,companyName,hebrewText,,שם החברה,,,25,
|
|
108
|
+
1030,188,9,196,numeric,no,,companyFileNumber,id9,,מספר תיק חברה,,,25,
|
|
109
|
+
1030,197,12,208,numeric,yes,,investmentAmount,amount,,סכום ההשקעה,,,25,
|
|
110
|
+
1030,209,128,336,numeric,no,,filler,filler,,Filler1,,,25,
|
|
111
|
+
2000,137,50,186,alphanumeric,conditional,חובה למלא כאשר יש הכנסה חייבת אחרת,otherTaxableIncomeDescription,text,,פירוט הכנסה חייבת אחרת,,,26,
|
|
112
|
+
2000,187,12,198,numeric,no,,otherTaxableIncome,amount,,הכנסה חייבת אחרת,,,26,
|
|
113
|
+
2000,199,12,210,numeric,no,,foreignTaxPaidOnOtherIncome,amount,,"מס ששולם מחו""ל בגין הכנסה חייבת אחרת",,,26,
|
|
114
|
+
2000,211,12,222,numeric,no,,totalForeignTaxableIncome,amount,,"סה""כ הכנסות חייבות מחו""ל",,,26,
|
|
115
|
+
2000,223,12,234,numeric,no,,totalForeignLoss,amount,,"סה""כ הפסד מחו""ל",,,26,
|
|
116
|
+
2000,235,12,246,numeric,no,,participationExemptionHoldingCompany,amount,,פטור השתתפות לחברת החזקות ישראלית,,,26,
|
|
117
|
+
2000,247,1,247,numeric,yes,,taxRefundDeclaration,yesNo,1=yes;2=no,הצהרה – החזר מסים,1- כן 2- לא,,26,
|
|
118
|
+
2000,248,12,259,numeric,no,,taxRefundDeclarationAmount,amount,,סכום החזר מסים הצהרה,,,26,
|
|
119
|
+
2000,260,901,1160,numeric,no,,filler,filler,,Filler1,,,26,
|
|
120
|
+
2200,137,3,139,numeric,no,,code,foreignCode,,"קוד (תואם לקוד בנספח ד – חו""ל)",,,31,
|
|
121
|
+
2200,140,12,151,numeric,no,,deductionsOffsetsAndExemptions,amount,,"סכום ניכויים, קיזוזים ופטורים",,,31,
|
|
122
|
+
2200,152,35,186,numeric,no,,filler,filler,,Filler,,,31,
|
|
123
|
+
3027,137,2,138,numeric,yes,,(derived) transactionSymbol,const,27,סמל עסקה,מספר סמל עסקה - 27,,34,
|
|
124
|
+
3027,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,34,
|
|
125
|
+
3027,142,1,142,numeric,no,,expropriation,yesNo,1=yes;2=no,הפקעה,1 – כן 2 - לא,,34,
|
|
126
|
+
3027,143,50,192,alphanumeric,no,,assetDetails,hebrewText,,פרטי הנכס,חייב אות עברית ראשונה,,34,
|
|
127
|
+
3027,193,1,193,numeric,no,,assetLocation,enum,1=abroad;2=Israel,מקום הנכס,"1-חו""ל 2-ישראל",,34,
|
|
128
|
+
3027,194,1,194,numeric,no,,relatedParty,yesNo,1=yes;2=no,צד קשור,1 – כן 2 - לא,,34,
|
|
129
|
+
3027,195,30,224,alphanumeric,no,,buyerName,text,,שם הרוכש,,,34,
|
|
130
|
+
3027,225,10,234,alphanumeric,no,,dates.code15,date,,תאריך קוד 15,DD/MM/YYYY,,34,
|
|
131
|
+
3027,235,10,244,alphanumeric,no,,dates.code20,date,,תאריך קוד 20,DD/MM/YYYY,,35,
|
|
132
|
+
3027,245,10,254,alphanumeric,no,,dates.code53,date,,תאריך קוד 53,DD/MM/YYYY,,35,
|
|
133
|
+
3027,255,2,256,numeric,yes,,(derived) sequenceNumber,serial,,"מספר בתל""ם",יש לתת מספר רציף לפי סדר מילוי רווחי ההון,,35,
|
|
134
|
+
3027,257,904,1160,numeric,no,,filler,filler,,Filler1,,,35,
|
|
135
|
+
3050,137,2,138,numeric,yes,,(derived) transactionSymbol,const,50,סמל עסקה,מספר סמל עסקה - 50,,37,
|
|
136
|
+
3050,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,37,
|
|
137
|
+
3050,142,1,142,numeric,no,,expropriation,yesNo,1=yes;2=no,הפקעה,1 – כן 2 - לא,,37,
|
|
138
|
+
3050,143,50,192,alphanumeric,no,,assetDetails,hebrewText,,פרטי הנכס,חייב אות עברית ראשונה,,37,
|
|
139
|
+
3050,193,10,202,alphanumeric,yes,,purchaseDate,date,,תאריך קניה,DD/MM/YYYY,,37,
|
|
140
|
+
3050,203,10,212,alphanumeric,yes,,dates.code15,date,,תאריך קוד 15,DD/MM/YYYY,,37,
|
|
141
|
+
3050,213,948,1160,numeric,no,,filler,filler,,Filler1,,,37,
|
|
142
|
+
3051,137,2,138,numeric,yes,,(derived) transactionSymbol,const,51,סמל עסקה,מספר סמל עסקה - 51,,39,position from PDF text layer (table cell lost)
|
|
143
|
+
3051,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,39,position from PDF text layer (table cell lost)
|
|
144
|
+
3051,142,50,191,alphanumeric,no,,assetDetails,hebrewText,,פרטי הנכס,חייב אות עברית ראשונה,,39,position from PDF text layer (table cell lost)
|
|
145
|
+
3051,192,1,192,numeric,no,,assetLocation,enum,1=abroad;2=Israel,מקום הנכס,"1 – חו""ל 2 – ישראל",,39,position from PDF text layer (table cell lost)
|
|
146
|
+
3051,193,1,193,numeric,no,,relatedParty,yesNo,1=yes;2=no,צד קשור,1 – כן 2 - לא,,39,position from PDF text layer (table cell lost)
|
|
147
|
+
3051,194,30,223,alphanumeric,no,,buyerName,hebrewText,,שם הרוכש,חייב אות עברית ראשונה,,39,position from PDF text layer (table cell lost)
|
|
148
|
+
3051,224,10,233,alphanumeric,yes,,dates.code15,date,,תאריך קוד 15,DD/MM/YYYY,,39,position from PDF text layer (table cell lost)
|
|
149
|
+
3051,234,2,235,numeric,yes,,(derived) sequenceNumber,serial,,"מספר בתל""ם",יש לתת מספר רציף לפי סדר מילוי רווחי ההון,,40,
|
|
150
|
+
3051,236,150,385,alphanumeric,no,,walletAddresses[0],text,,כתובת ארנק וירטואלי,מיועד לכתובת הארנק הוירטואלי,שדה חדש,40,
|
|
151
|
+
3051,386,150,535,alphanumeric,no,,walletAddresses[1],text,,כתובת ארנק וירטואלי נוסף,מיועד לכתובת הארנק הוירטואלי במידה ויש עוד אחד,שדה חדש,40,
|
|
152
|
+
3051,536,625,1160,numeric,no,,filler,filler,,Filler1,,,40,
|
|
153
|
+
3054,137,2,138,numeric,yes,,(derived) transactionSymbol,const,54,סמל עסקה,מספר סמל עסקה - 54,,41,
|
|
154
|
+
3054,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,42,
|
|
155
|
+
3054,142,50,191,alphanumeric,no,,assetDetails,hebrewText,,פרטי הנכס,חייב אות עברית ראשונה,,42,
|
|
156
|
+
3054,192,10,201,alphanumeric,yes,,purchaseDate,date,,תאריך קניה,DD/MM/YYYY,,42,
|
|
157
|
+
3054,202,10,211,alphanumeric,yes,,dates.code15,date,,תאריך קוד 15,DD/MM/YYYY,,42,
|
|
158
|
+
3054,212,949,1160,numeric,no,,filler,filler,,Filler1,,,42,
|
|
159
|
+
3060,137,2,138,numeric,yes,,(derived) transactionSymbol,const,60,סמל עסקה,מספר סמל עסקה - 60,,43,
|
|
160
|
+
3060,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,43,
|
|
161
|
+
3060,142,1,142,numeric,no,,foreignAsset,yesNo,1=yes;2=no,"נכס חו""ל",1 – כן 2 - לא,,43,
|
|
162
|
+
3060,143,1,143,numeric,no,,soldToRelatedParty,yesNo,1=yes;2=no,מכירה לצד קשור,1 – כן 2 - לא,,43,
|
|
163
|
+
3060,144,1,144,numeric,no,,boughtFromRelatedParty,yesNo,1=yes;2=no,רכישה מצד קשור,1 – כן 2 - לא,,43,
|
|
164
|
+
3060,145,1,145,numeric,no,,gainFromInvestmentFund,yesNo,1=yes;2=no,רווח מקרן השקעות,2 - לא,,43,
|
|
165
|
+
3060,146,30,175,alphanumeric,no,,withholders[0].name,hebrewText,,מנכה- א,חייב אות עברית ראשונה,,44,
|
|
166
|
+
3060,176,3,178,numeric,no,,withholders[0].branch,digits,,סניף – א,,,44,
|
|
167
|
+
3060,179,9,187,numeric,no,,withholders[0].account,digits,,חשבון – א,,,44,
|
|
168
|
+
3060,188,30,217,alphanumeric,no,,withholders[1].name,hebrewText,,מנכה- ב,חייב אות עברית ראשונה,,44,
|
|
169
|
+
3060,218,3,220,numeric,no,,withholders[1].branch,digits,,סניף – ב,,,44,
|
|
170
|
+
3060,221,9,229,numeric,no,,withholders[1].account,digits,,חשבון – ב,,,44,
|
|
171
|
+
3060,230,30,259,alphanumeric,no,,withholders[2].name,hebrewText,,מנכה- ג,חייב אות עברית ראשונה,,44,
|
|
172
|
+
3060,260,3,262,numeric,no,,withholders[2].branch,digits,,סניף – ג,,,44,
|
|
173
|
+
3060,263,9,271,numeric,no,,withholders[2].account,digits,,חשבון – ג,,,44,
|
|
174
|
+
3060,272,30,301,alphanumeric,no,,withholders[3].name,hebrewText,,מנכה- ד,חייב אות עברית ראשונה,,44,
|
|
175
|
+
3060,302,3,304,numeric,no,,withholders[3].branch,digits,,סניף – ד,,,44,
|
|
176
|
+
3060,305,9,313,numeric,no,,withholders[3].account,digits,,חשבון – ד,,,44,
|
|
177
|
+
3060,314,10,323,numeric,no,,lossesCarriedForward,amount,,הפסדים להעברה,,,44,
|
|
178
|
+
3060,324,837,1160,numeric,no,,filler,filler,,Filler1,,,44,
|
|
179
|
+
3063,137,2,138,numeric,yes,,(derived) transactionSymbol,const,63,סמל עסקה,מספר סמל עסקה - 63,,46,
|
|
180
|
+
3063,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,46,
|
|
181
|
+
3063,142,1,142,numeric,no,,foreignAsset,yesNo,1=yes;2=no,"נכס חו""ל",1 – כן 2 - לא,,46,
|
|
182
|
+
3063,143,10,152,numeric,no,,lossesCarriedForward,amount,,הפסדים להעברה,,,46,
|
|
183
|
+
3063,153,1008,1160,numeric,no,,filler,filler,,Filler1,,,46,
|
|
184
|
+
3064,137,2,138,numeric,yes,,(derived) transactionSymbol,const,64,סמל עסקה,מספר סמל עסקה - 64,,48,
|
|
185
|
+
3064,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,48,
|
|
186
|
+
3064,142,1,142,numeric,no,,foreignAsset,yesNo,1=yes;2=no,"נכס חו""ל",1 – כן 2 - לא,,48,
|
|
187
|
+
3064,143,1,143,numeric,no,,soldToRelatedParty,yesNo,1=yes;2=no,מכירה לצד קשור,1 – כן 2 - לא,,48,
|
|
188
|
+
3064,144,1,144,numeric,no,,boughtFromRelatedParty,yesNo,1=yes;2=no,רכישה מצד קשור,1 – כן 2 - לא,,48,
|
|
189
|
+
3064,145,1,145,numeric,no,,gainFromInvestmentFund,yesNo,1=yes;2=no,רווח מקרן השקעות,1 – כן,,48,
|
|
190
|
+
3064,146,30,175,alphanumeric,no,,withholders[0].name,hebrewText,,מנכה- א,חייב אות עברית ראשונה,,48,
|
|
191
|
+
3064,176,3,178,numeric,no,,withholders[0].branch,digits,,סניף – א,,,48,
|
|
192
|
+
3064,179,9,187,numeric,no,,withholders[0].account,digits,,חשבון – א,,,48,
|
|
193
|
+
3064,188,30,217,alphanumeric,no,,withholders[1].name,hebrewText,,מנכה- ב,חייב אות עברית ראשונה,,48,
|
|
194
|
+
3064,218,3,220,numeric,no,,withholders[1].branch,digits,,סניף – ב,,,48,
|
|
195
|
+
3064,221,9,229,numeric,no,,withholders[1].account,digits,,חשבון – ב,,,48,
|
|
196
|
+
3064,230,30,259,alphanumeric,no,,withholders[2].name,hebrewText,,מנכה- ג,חייב אות עברית ראשונה,,48,
|
|
197
|
+
3064,260,3,262,numeric,no,,withholders[2].branch,digits,,סניף – ג,,,48,
|
|
198
|
+
3064,263,9,271,numeric,no,,withholders[2].account,digits,,חשבון – ג,,,48,
|
|
199
|
+
3064,272,30,301,alphanumeric,no,,withholders[3].name,hebrewText,,מנכה- ד,חייב אות עברית ראשונה,,48,
|
|
200
|
+
3064,302,3,304,numeric,no,,withholders[3].branch,digits,,סניף – ד,,,48,
|
|
201
|
+
3064,305,9,313,numeric,no,,withholders[3].account,digits,,חשבון – ד,,,48,
|
|
202
|
+
3064,314,10,323,numeric,no,,lossesCarriedForward,amount,,הפסדים להעברה,,,48,
|
|
203
|
+
3064,324,837,1160,numeric,no,,filler,filler,,Filler1,,,48,
|
|
204
|
+
3065,137,2,138,numeric,yes,,(derived) transactionSymbol,const,65,סמל עסקה,מספר סמל עסקה - 65,,50,
|
|
205
|
+
3065,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,50,
|
|
206
|
+
3065,142,1,142,numeric,no,,foreignAsset,yesNo,1=yes;2=no,"נכס חו""ל",1 – כן 2 - לא,,50,
|
|
207
|
+
3065,143,1,143,numeric,no,,soldToRelatedParty,yesNo,1=yes;2=no,מכירה לצד קשור,1 – כן 2 - לא,,50,
|
|
208
|
+
3065,144,1,144,numeric,no,,boughtFromRelatedParty,yesNo,1=yes;2=no,רכישה מצד קשור,1 – כן 2 - לא,,50,
|
|
209
|
+
3065,145,1,145,numeric,no,,gainFromInvestmentFund,yesNo,1=yes;2=no,רווח מקרן השקעות,2 - לא,,50,
|
|
210
|
+
3065,146,1,146,numeric,no,,withholdingStatus,enum,"2=not withheld, gains accrued January-June of the tax year;3=not withheld, gains accrued July-December of the tax year",מס במקור,"2 – לא נוכה, רווחים שנבעו בתקופה שבין ינואר ליוני 2024. 3 – לא נוכה, רווחים שנבעו בתקופה שבין יולי לדצמבר 2024.",ערכים הותאמו לשנת מס הנוכחית,50,
|
|
211
|
+
3065,147,30,176,alphanumeric,no,,withholders[0].name,hebrewText,,מנכה- א,חייב אות עברית ראשונה,,50,
|
|
212
|
+
3065,177,3,179,numeric,no,,withholders[0].branch,digits,,סניף – א,,,50,
|
|
213
|
+
3065,180,9,188,numeric,no,,withholders[0].account,digits,,חשבון – א,,,50,
|
|
214
|
+
3065,189,30,218,alphanumeric,no,,withholders[1].name,hebrewText,,מנכה- ב,חייב אות עברית ראשונה,,50,
|
|
215
|
+
3065,219,3,221,numeric,no,,withholders[1].branch,digits,,סניף – ב,,,50,
|
|
216
|
+
3065,222,9,230,numeric,no,,withholders[1].account,digits,,חשבון – ב,,,51,
|
|
217
|
+
3065,231,30,260,alphanumeric,no,,withholders[2].name,hebrewText,,מנכה- ג,חייב אות עברית ראשונה,,51,
|
|
218
|
+
3065,261,3,263,numeric,no,,withholders[2].branch,digits,,סניף – ג,,,51,
|
|
219
|
+
3065,264,9,272,numeric,no,,withholders[2].account,digits,,חשבון – ג,,,51,
|
|
220
|
+
3065,273,30,302,alphanumeric,no,,withholders[3].name,hebrewText,,מנכה- ד,חייב אות עברית ראשונה,,51,
|
|
221
|
+
3065,303,3,305,numeric,no,,withholders[3].branch,digits,,סניף – ד,,,51,
|
|
222
|
+
3065,306,9,314,numeric,no,,withholders[3].account,digits,,חשבון – ד,,,51,
|
|
223
|
+
3065,315,10,324,numeric,no,,lossesCarriedForward,amount,,הפסדים להעברה,,,51,
|
|
224
|
+
3065,325,2,326,numeric,yes,,(derived) sequenceNumber,serial,,"מספר בתל""ם",יש לתת מספר רציף לפי סדר מילוי רווחי ההון,,51,
|
|
225
|
+
3065,327,834,1160,numeric,no,,filler,filler,,Filler1,,,51,
|
|
226
|
+
3066,137,2,138,numeric,yes,,(derived) transactionSymbol,const,66,סמל עסקה,מספר סמל עסקה - 66,,53,
|
|
227
|
+
3066,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,53,
|
|
228
|
+
3066,142,1,142,numeric,no,,foreignAsset,yesNo,1=yes;2=no,"נכס חו""ל",1 – כן 2 - לא,,53,
|
|
229
|
+
3066,143,1,143,numeric,no,,withholdingStatus,enum,"2=not withheld, gains accrued January-June of the tax year;3=not withheld, gains accrued July-December of the tax year",מס במקור,"2 – לא נוכה, רווחים שנבעו בתקופה שבין ינואר ליוני 2024. 3 – לא נוכה, רווחים שנבעו בתקופה שבין יולי לדצמבר 2024.",ערכים הותאמו לשנת מס הנוכחית,53,
|
|
230
|
+
3066,144,10,153,numeric,no,,lossesCarriedForward,amount,,הפסדים להעברה,,,53,
|
|
231
|
+
3066,154,2,155,numeric,yes,,(derived) sequenceNumber,serial,,"מספר בתל""ם",יש לתת מספר רציף לפי סדר מילוי רווחי ההון,,53,
|
|
232
|
+
3066,156,1005,1160,numeric,no,,filler,filler,,Filler1,,,53,
|
|
233
|
+
3077,137,2,138,numeric,yes,,(derived) transactionSymbol,const,77,סמל עסקה,מספר סמל עסקה - 77,,55,
|
|
234
|
+
3077,139,3,141,numeric,yes,,(derived) appendixNumber,serial,,מספר נספח,"מספר עוקב של הנספח (1,2,3...)",,55,
|
|
235
|
+
3077,142,1,142,numeric,no,,expropriation,yesNo,1=yes;2=no,הפקעה,1 – כן 2 - לא,,55,
|
|
236
|
+
3077,143,50,192,alphanumeric,no,,assetDetails,text,,פרטי הנכס,,,55,
|
|
237
|
+
3077,193,1,193,numeric,no,,assetLocation,enum,1=abroad;2=Israel,מקום הנכס,"1 – חו""ל 2 – ישראל",,55,
|
|
238
|
+
3077,194,1,194,numeric,no,,relatedParty,yesNo,1=yes;2=no,צד קשור,1 – כן 2 - לא,,55,
|
|
239
|
+
3077,195,30,224,alphanumeric,no,,buyerName,text,,שם הרוכש,,,55,
|
|
240
|
+
3077,225,10,234,alphanumeric,yes,,dates.code15,date,,תאריך קוד 15,DD/MM/YYYY,,55,
|
|
241
|
+
3077,235,10,244,alphanumeric,yes,,dates.code20,date,,תאריך קוד 20,DD/MM/YYYY,,55,
|
|
242
|
+
3077,245,2,246,numeric,no,,(derived) improvementCount,count,,מספר יתרות השבחה (מספר פעמים שמילאו קוד 50),,,55,
|
|
243
|
+
3077,247,12,258,numeric,no,,improvements[0].expense,amountX100,,סכום ההוצאה על ההשבחה (1),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,55,
|
|
244
|
+
3077,259,12,270,numeric,no,,improvements[0].accumulatedDepreciation,amountX100,,סכום הפחת שנצבר (1),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,55,
|
|
245
|
+
3077,271,10,280,alphanumeric,yes,,improvements[0].date,date,,תאריך של קוד 50 – תאריך השבחה 1,DD/MM/YYYY,,55,
|
|
246
|
+
3077,281,12,292,numeric,no,,improvements[1].expense,amountX100,,סכום ההוצאה על ההשבחה (2),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
247
|
+
3077,293,12,304,numeric,no,,improvements[1].accumulatedDepreciation,amountX100,,סכום הפחת שנצבר (2),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
248
|
+
3077,305,10,314,alphanumeric,yes,,improvements[1].date,date,,תאריך של קוד 50 – תאריך השבחה 2,DD/MM/YYYY,,56,
|
|
249
|
+
3077,315,12,326,numeric,no,,improvements[2].expense,amountX100,,סכום ההוצאה על ההשבחה (3),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
250
|
+
3077,327,12,338,numeric,no,,improvements[2].accumulatedDepreciation,amountX100,,סכום הפחת שנצבר (3),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
251
|
+
3077,339,10,348,alphanumeric,yes,,improvements[2].date,date,,תאריך של קוד 50 – תאריך השבחה 3,DD/MM/YYYY,,56,
|
|
252
|
+
3077,349,12,360,numeric,no,,improvements[3].expense,amountX100,,סכום ההוצאה על ההשבחה (4),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
253
|
+
3077,361,12,372,numeric,no,,improvements[3].accumulatedDepreciation,amountX100,,סכום הפחת שנצבר (4),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,56,
|
|
254
|
+
3077,373,10,382,alphanumeric,yes,,improvements[3].date,date,,תאריך של קוד 50 – תאריך השבחה 4,DD/MM/YYYY,,57,
|
|
255
|
+
3077,383,12,394,numeric,no,,improvements[4].expense,amountX100,,סכום ההוצאה על ההשבחה (5),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,57,
|
|
256
|
+
3077,395,12,406,numeric,no,,improvements[4].accumulatedDepreciation,amountX100,,סכום הפחת שנצבר (5),"נשמר * 100 מערכו, יכול לקבל בערכו המקורי אגורות שתי ספרות אחרי הנקודה",,57,
|
|
257
|
+
3077,407,10,416,alphanumeric,yes,,improvements[4].date,date,,תאריך של קוד 50 – תאריך השבחה 5,DD/MM/YYYY,,57,
|
|
258
|
+
3077,417,50,466,alphanumeric,no,,replacementAsset.details,text,,פרטי הנכס שנרכש לחילוף,,,57,
|
|
259
|
+
3077,467,10,476,alphanumeric,no,,replacementAsset.purchaseDate,date,,תאריך רכישה של שיחלוף הנכס,DD/MM/YYYY,,57,
|
|
260
|
+
3077,477,10,486,numeric,no,,replacementAsset.price,amount,,מחיר הנכס הנרכש בשיחלוף הנכס,,,57,
|
|
261
|
+
3077,487,2,488,numeric,yes,,(derived) sequenceNumber,serial,,"מספר בתל""ם",יש לתת מספר רציף לפי סדר מילוי רווחי ההון,,57,
|
|
262
|
+
3077,489,150,638,alphanumeric,no,,walletAddresses[0],text,,כתובת ארנק וירטואלי,"כאשר העסקה כוללת מטבע וירטואלי, יש להכניס כתובת הארנק הוירטואלי",שדה חדש,57,
|
|
263
|
+
3077,639,150,788,alphanumeric,no,,walletAddresses[1],text,,כתובת ארנק וירטואלי נוסף,"כאשר העסקה כוללת מטבע וירטואלי, יש להכניס כתובת הארנק הוירטואלי במידה ויש עוד אחד",שדה חדש,57,
|
|
264
|
+
3077,789,372,1160,numeric,no,,filler,filler,,Filler1,,,57,
|
|
265
|
+
9999,137,2,138,numeric,yes,,(derived) reportCount,count,,מספר טפסי 1214,ניתן למלא רק טופס 1,,60,
|
|
266
|
+
9999,139,2,140,numeric,yes,,(derived) relatedCompanyCount,count,,"מספר טפסי 1214 - חברות קשורות בארץ ובחו""ל (רשומה 1010)",ניתן למלא עד 3,,61,
|
|
267
|
+
9999,141,2,142,numeric,yes,,(derived) shareholderCount,count,,מספר טפסי 1214- פרטים על בעלי מניות וסכומים (רשומה 1020),ניתן למלא עד 99,,61,
|
|
268
|
+
9999,143,2,144,numeric,yes,,(derived) foreignAppendixCount,count,,נספח חול,"1 – אם קיים נספח חו""ל",,61,
|
|
269
|
+
9999,145,2,146,numeric,yes,,(derived) capitalGainsAppendixCount,count,,מספר נספחי רווח הון,ניתן למלא עד 14,,61,
|
|
270
|
+
9999,147,2,148,numeric,no,,(derived) foreignCountryRecordCount,count,,"מספר רשומות מדינות חו""ל (רשומות 2200)",,,61,
|
|
271
|
+
9999,149,2,150,numeric,no,,(derived) rdInvestmentRecordCount,count,,"מספר רשומות פרטים על השקעות בחברות מו""פ (רשומות 1030)",,,61,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
record,order,description,length,prefixLength,headerStart,headerLength,sectionStart,sectionLength,sectionKind,minOccurs,maxOccurs
|
|
2
|
+
1000,1,"Form 1214 main record: company details, preparer, declarations, all main-form amounts",4232,136,137,2048,2185,2048,codeAmount,1,1
|
|
3
|
+
1010,2,Related companies in Israel and abroad (part C),1160,136,137,1024,,,,0,3
|
|
4
|
+
1020,3,Shareholders and amounts (part D),1160,136,137,1024,,,,1,99
|
|
5
|
+
1030,4,Investments in R&D companies,336,136,137,200,,,,0,5
|
|
6
|
+
2000,5,Foreign appendix,2184,136,137,1024,1161,1024,codeAmount,0,1
|
|
7
|
+
2200,6,"Foreign income by country, one record per 2000 code",1210,136,137,50,187,1024,countryAmount,0,30
|
|
8
|
+
3027,7,Capital gains: sale of shares (symbol 27),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
9
|
+
3050,8,Capital gains: betterment-tax transaction (symbol 50),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
10
|
+
3051,9,"Capital gains: forced transaction, virtual currency (symbol 51)",2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
11
|
+
3054,10,Capital gains: oil-partnership participation units (symbol 54),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
12
|
+
3060,11,Capital gains: securities (symbol 60),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
13
|
+
3063,12,Capital gains: securities under section 6 (symbol 63),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
14
|
+
3064,13,Capital gains: REIT funds (symbol 64),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
15
|
+
3065,14,"Capital gains: no tax withheld at source, form 1322 (symbol 65)",2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
16
|
+
3066,15,"Capital gains: no tax withheld at source, form 1326 (symbol 66)",2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
17
|
+
3077,16,Capital gains: all other transactions incl. goodwill (symbol 77),2184,136,137,1024,1161,1024,codeAmount,0,14
|
|
18
|
+
9999,17,Control (closing) record,150,136,137,14,,,,1,1
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# 1214 layout data
|
|
2
|
+
|
|
3
|
+
Machine-readable record layouts of the SHAAM 1214 OPCN file, one directory per tax year. These CSV
|
|
4
|
+
files are the **source of truth** for the package's layout code (`scripts/generate-layout.ts`
|
|
5
|
+
generates `src/layout/<year>/layout.generated.ts` from them, see `../SPEC.md` §5.3).
|
|
6
|
+
|
|
7
|
+
## Provenance (2024)
|
|
8
|
+
|
|
9
|
+
- Extracted from `../specifications/1214-2024.pdf` with `../tools/extract_layout.py` (pdfplumber
|
|
10
|
+
table extraction, Hebrew restored to logical order).
|
|
11
|
+
- Verified: every record's header fields are contiguous from position 137 and end exactly at the
|
|
12
|
+
header length; header + section lengths add up to the record length for all 17 record types.
|
|
13
|
+
- Cross-checked against the earlier hand-typed `src/config/2024.json` (branch `1214-generator`): all
|
|
14
|
+
positions, lengths and the 102 main-form codes agree, except defects in that JSON (1000@613 and
|
|
15
|
+
2200@140 off by one, the whole 9999 record shifted by one, 3065 filler 837 instead of 834, two
|
|
16
|
+
3050 dates marked optional).
|
|
17
|
+
- Known extraction fixup: record 3051, page 39 — the PDF table lost its position column; positions
|
|
18
|
+
137/139/142/192/193/194/224 were taken from the PDF text layer and verified to chain with the
|
|
19
|
+
field lengths (`extractionNote` column). `extract_layout.py diff` reports exactly these 7 rows.
|
|
20
|
+
- Curated by hand: the `key`, `kind` and `values` columns, and the English record descriptions.
|
|
21
|
+
|
|
22
|
+
## Files
|
|
23
|
+
|
|
24
|
+
### `records.csv` — one row per record type
|
|
25
|
+
|
|
26
|
+
| Column | Meaning |
|
|
27
|
+
| --------------- | ----------------------------------------------------------- |
|
|
28
|
+
| `record` | Record type (`1000` … `9999`) |
|
|
29
|
+
| `order` | Canonical order within a report |
|
|
30
|
+
| `description` | English description |
|
|
31
|
+
| `length` | Total record length |
|
|
32
|
+
| `prefixLength` | Always 136 (form type 4 + record type 4 + 128 zeros) |
|
|
33
|
+
| `headerStart` | Always 137 |
|
|
34
|
+
| `headerLength` | Header length |
|
|
35
|
+
| `sectionStart` | Start of the code-amount / country-amount section, if any |
|
|
36
|
+
| `sectionLength` | Section length, if any |
|
|
37
|
+
| `sectionKind` | `codeAmount` or `countryAmount` |
|
|
38
|
+
| `minOccurs` | Minimum occurrences per report (1020: 1, except kibbutz) |
|
|
39
|
+
| `maxOccurs` | Maximum occurrences per report (capital gains: 14 in total) |
|
|
40
|
+
|
|
41
|
+
### `fields.csv` — one row per header field (fillers included)
|
|
42
|
+
|
|
43
|
+
| Column | Meaning |
|
|
44
|
+
| ---------------- | ----------------------------------------------------------------------- |
|
|
45
|
+
| `record` | Record type |
|
|
46
|
+
| `position` | 1-based start position, as printed in the spec |
|
|
47
|
+
| `length` | Width in characters (= bytes in windows-1255) |
|
|
48
|
+
| `end` | Last position (inclusive) |
|
|
49
|
+
| `type` | `numeric` / `alphanumeric` (spec: נומרי / אלפאנומרי) |
|
|
50
|
+
| `required` | `yes`, `no` or `conditional` (spec: שדה חובה) |
|
|
51
|
+
| `requiredNote` | Hebrew condition text when `conditional` |
|
|
52
|
+
| `key` | Canonical key (`SPEC.md` §7.3); `(derived) …` = computed by the package |
|
|
53
|
+
| `kind` | Semantic kind controlling validation and encoding (`SPEC.md` §4.2) |
|
|
54
|
+
| `values` | Allowed values: `;`-separated `n`, `n..m` or `n=label` |
|
|
55
|
+
| `nameHe` | Field name (Hebrew, from the spec) |
|
|
56
|
+
| `notesHe` | Notes column (Hebrew, from the spec) |
|
|
57
|
+
| `changes2024` | "שינויים ב-2024" column (what changed this year) |
|
|
58
|
+
| `specPage` | PDF page |
|
|
59
|
+
| `extractionNote` | Manual fixups made during extraction |
|
|
60
|
+
|
|
61
|
+
### `codes.csv` — one row per code of a code-amount section
|
|
62
|
+
|
|
63
|
+
| Column | Meaning |
|
|
64
|
+
| --------------------- | ------------------------------------------------------------------------------- |
|
|
65
|
+
| `record` | Record type (1000, 2000, 30xx) |
|
|
66
|
+
| `code` | 3-digit code as written in the file (capital-gains code `15` → `015`) |
|
|
67
|
+
| `length` | Width of the value |
|
|
68
|
+
| `required` | `yes`, `no` or `conditional` |
|
|
69
|
+
| `requiredNote` | Hebrew condition text when `conditional` |
|
|
70
|
+
| `kind` | `amount`, `amountX100`, `rateX100`, `enum` or `num` |
|
|
71
|
+
| `values` | Allowed values (same grammar as `fields.csv`) |
|
|
72
|
+
| `zeroAllowed` | `yes` when the spec says the value may be 0 (otherwise 0 means "omit the code") |
|
|
73
|
+
| `perCountryBreakdown` | 2000 only: `yes` when a 2200 record is required for a filled code |
|
|
74
|
+
| `notesHe` | Notes column (Hebrew) |
|
|
75
|
+
| `changes2024` | "שינויים ב-2024" column |
|
|
76
|
+
| `specPage` | PDF page |
|
|
77
|
+
|
|
78
|
+
Code 3077 `501`–`505` are the five "code 50 – improvement N" entries ("שומרים קוד 50N").
|
|
79
|
+
|
|
80
|
+
### `countries.csv` — country codes for record 2200
|
|
81
|
+
|
|
82
|
+
`code` (spec code without zero padding; `-88` = country unknown, allowed only for 2000 code 439) and
|
|
83
|
+
`nameHe`. The spec calls this table "initial"; update it from official SHAAM publications.
|
|
84
|
+
|
|
85
|
+
## Updating for a new tax year
|
|
86
|
+
|
|
87
|
+
See `../SPEC.md` §14.
|
|
Binary file
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Extract the record layouts from a SHAAM "1214 OPCN" specification PDF and diff them
|
|
3
|
+
against the curated layout CSVs in documentation/layout/<year>/.
|
|
4
|
+
|
|
5
|
+
This is a maintenance tool for yearly spec updates, not part of the package build.
|
|
6
|
+
Requires: Python 3.10+, pdfplumber (pip install pdfplumber).
|
|
7
|
+
|
|
8
|
+
python3 extract_layout.py extract <spec.pdf> <raw.json>
|
|
9
|
+
python3 extract_layout.py diff <raw.json> <layout-dir>
|
|
10
|
+
|
|
11
|
+
`extract` writes every header field (position, length, type, required, Hebrew name/notes, page)
|
|
12
|
+
and every code-amount entry per record type. `diff` compares that raw extraction with
|
|
13
|
+
fields.csv / codes.csv and prints every difference, so a new year's PDF can be reconciled
|
|
14
|
+
field by field. Semantic columns (key, kind, values) are curated by hand in the CSVs.
|
|
15
|
+
|
|
16
|
+
How the extraction works: pdfplumber returns Hebrew in visual (reversed) order, so each cell
|
|
17
|
+
line is reversed and LTR runs (digits, Latin) are re-reversed. Cells are assigned to columns by
|
|
18
|
+
horizontal overlap with the header row; continuation tables without a header row are mapped
|
|
19
|
+
right-to-left (name, length, type, required, position, notes). Records are segmented by the
|
|
20
|
+
"record type" row (סוג רשומה) that opens each record's section.
|
|
21
|
+
"""
|
|
22
|
+
import csv
|
|
23
|
+
import json
|
|
24
|
+
import re
|
|
25
|
+
import sys
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
|
|
28
|
+
LTR = re.compile(r"[A-Za-z0-9](?:[A-Za-z0-9./,%:+_\-׳’']*[A-Za-z0-9%])?")
|
|
29
|
+
TYPES = {'נומרי': 'numeric', 'אלפאנומרי': 'alphanumeric', 'אלפא נומרי': 'alphanumeric'}
|
|
30
|
+
LABELS = [('שם שדה', 'name'), ('אורך', 'length'), ('סוג', 'type'), ('מפוזיציה', 'position'), ('הערות', 'notes'),
|
|
31
|
+
('פירוט', 'perCountry'), ('שינוי', 'changes'), ('חובה', 'required'), ('שדה', 'required')]
|
|
32
|
+
PREFIX_POSITIONS = {1, 5, 9} # form type, record type, 128-zero filler: identical in every record
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def logical(cell):
|
|
36
|
+
if not cell:
|
|
37
|
+
return ''
|
|
38
|
+
lines = []
|
|
39
|
+
for line in cell.split('\n'):
|
|
40
|
+
line = line[::-1]
|
|
41
|
+
lines.append(LTR.sub(lambda m: m.group(0)[::-1], line).strip())
|
|
42
|
+
return re.sub(r'\s+', ' ', ' '.join(lines)).strip()
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def label_of(text):
|
|
46
|
+
for needle, label in LABELS:
|
|
47
|
+
if needle in text:
|
|
48
|
+
return label
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def overlap(a, b):
|
|
53
|
+
return max(0.0, min(a[1], b[1]) - max(a[0], b[0]))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def table_rows(page):
|
|
57
|
+
"""Yield dict rows (column label -> logical text) for every table on the page."""
|
|
58
|
+
for tbl in page.find_tables():
|
|
59
|
+
texts, rows = tbl.extract(), tbl.rows
|
|
60
|
+
header_idx, columns = None, []
|
|
61
|
+
for i, row in enumerate(texts[:3]):
|
|
62
|
+
joined = ' '.join(logical(c) for c in row if c)
|
|
63
|
+
if 'שם שדה' in joined or ('אורך' in joined and 'מפוזיציה' in joined):
|
|
64
|
+
header_idx = i
|
|
65
|
+
break
|
|
66
|
+
if header_idx is not None:
|
|
67
|
+
for bbox, txt in zip(rows[header_idx].cells, texts[header_idx]):
|
|
68
|
+
label = label_of(logical(txt)) if bbox and txt else None
|
|
69
|
+
if label:
|
|
70
|
+
columns.append((label, (bbox[0], bbox[2])))
|
|
71
|
+
for i, (row, txt_row) in enumerate(zip(rows, texts)):
|
|
72
|
+
if header_idx is not None and i <= header_idx:
|
|
73
|
+
continue
|
|
74
|
+
cells = [(bbox, logical(t)) for bbox, t in zip(row.cells, txt_row) if bbox and t and logical(t)]
|
|
75
|
+
if not cells:
|
|
76
|
+
continue
|
|
77
|
+
if columns:
|
|
78
|
+
out = {}
|
|
79
|
+
for bbox, value in cells:
|
|
80
|
+
best = max(columns, key=lambda c: overlap(c[1], (bbox[0], bbox[2])))
|
|
81
|
+
label = best[0] if overlap(best[1], (bbox[0], bbox[2])) > 0 else 'unmapped'
|
|
82
|
+
out[label] = f"{out[label]} | {value}" if label in out else value
|
|
83
|
+
yield out
|
|
84
|
+
else:
|
|
85
|
+
yield right_to_left(cells)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def right_to_left(cells):
|
|
89
|
+
values = [v for _, v in sorted(cells, key=lambda c: -c[0][0])]
|
|
90
|
+
if len(values) < 2 or not values[1].isdigit():
|
|
91
|
+
return {}
|
|
92
|
+
out, rest = {'name': values[0], 'length': values[1]}, values[2:]
|
|
93
|
+
if rest and rest[0] in TYPES:
|
|
94
|
+
out['type'] = rest.pop(0)
|
|
95
|
+
if rest and not rest[0].isdigit():
|
|
96
|
+
out['required'] = rest.pop(0)
|
|
97
|
+
if rest and rest[0].isdigit():
|
|
98
|
+
out['position'] = rest.pop(0)
|
|
99
|
+
if rest:
|
|
100
|
+
out['notes'] = ' | '.join(rest)
|
|
101
|
+
return out
|
|
102
|
+
for v in rest:
|
|
103
|
+
if v in ('כן', 'לא') or v.startswith('חובה'):
|
|
104
|
+
out['required'] = v
|
|
105
|
+
else:
|
|
106
|
+
out['notes'] = f"{out['notes']} | {v}" if 'notes' in out else v
|
|
107
|
+
return out
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def extract(pdf_path, out_path):
|
|
111
|
+
import pdfplumber
|
|
112
|
+
records, current = {}, None
|
|
113
|
+
with pdfplumber.open(pdf_path) as pdf:
|
|
114
|
+
for page_no, page in enumerate(pdf.pages, start=1):
|
|
115
|
+
for row in table_rows(page):
|
|
116
|
+
name, length = row.get('name', ''), row.get('length', '')
|
|
117
|
+
if name.startswith('סוג רשומה'):
|
|
118
|
+
m = re.search(r'\b(\d{4})\b', row.get('notes', '') + ' ' + name)
|
|
119
|
+
if m and m.group(1) not in ('2024', '2025', '2026'):
|
|
120
|
+
current = m.group(1)
|
|
121
|
+
records.setdefault(current, {'header': [], 'codes': [], 'other': []})
|
|
122
|
+
continue
|
|
123
|
+
if current is None or not length.isdigit():
|
|
124
|
+
continue
|
|
125
|
+
entry = {'name': name, 'length': int(length), 'type': TYPES.get(row.get('type', ''), row.get('type', '')),
|
|
126
|
+
'required': row.get('required', ''), 'perCountry': row.get('perCountry', ''),
|
|
127
|
+
'notes': row.get('notes', ''), 'changes': row.get('changes', ''), 'page': page_no}
|
|
128
|
+
position = row.get('position', '')
|
|
129
|
+
if position.isdigit():
|
|
130
|
+
if int(position) not in PREFIX_POSITIONS:
|
|
131
|
+
records[current]['header'].append(dict(entry, position=int(position)))
|
|
132
|
+
elif re.fullmatch(r'\d{2,3}', name):
|
|
133
|
+
records[current]['codes'].append(dict(entry, code=name.zfill(3)))
|
|
134
|
+
elif re.search(r'שומרים קוד (\d{3})', name): # 3077: "code 50 - improvement N (stored as code 50N)"
|
|
135
|
+
code = re.search(r'שומרים קוד (\d{3})', name).group(1)
|
|
136
|
+
records[current]['codes'].append(dict(entry, code=code))
|
|
137
|
+
else:
|
|
138
|
+
records[current]['other'].append(entry)
|
|
139
|
+
Path(out_path).write_text(json.dumps(records, ensure_ascii=False, indent=1), encoding='utf-8')
|
|
140
|
+
for rt, rec in records.items():
|
|
141
|
+
print(f"{rt}: {len(rec['header'])} header fields, {len(rec['codes'])} codes, {len(rec['other'])} other rows")
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def required_of(text):
|
|
145
|
+
text = (text or '').strip()
|
|
146
|
+
return 'yes' if text == 'כן' else ('no' if text in ('', 'לא') else 'conditional')
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def diff(raw_path, layout_dir):
|
|
150
|
+
raw = json.loads(Path(raw_path).read_text(encoding='utf-8'))
|
|
151
|
+
layout = Path(layout_dir)
|
|
152
|
+
fields = list(csv.DictReader(open(layout / 'fields.csv', encoding='utf-8')))
|
|
153
|
+
codes = list(csv.DictReader(open(layout / 'codes.csv', encoding='utf-8')))
|
|
154
|
+
problems = []
|
|
155
|
+
for rt in sorted(set(raw) | {f['record'] for f in fields}):
|
|
156
|
+
pdf_fields = {f['position']: f for f in raw.get(rt, {}).get('header', [])}
|
|
157
|
+
csv_fields = {int(f['position']): f for f in fields if f['record'] == rt}
|
|
158
|
+
for pos in sorted(set(pdf_fields) | set(csv_fields)):
|
|
159
|
+
p, c = pdf_fields.get(pos), csv_fields.get(pos)
|
|
160
|
+
if not p:
|
|
161
|
+
note = f" (known: {c['extractionNote']})" if c and c.get('extractionNote') else ''
|
|
162
|
+
problems.append(f"{rt}@{pos} {c['key']}: in CSV, not found in PDF extraction{note}")
|
|
163
|
+
elif not c:
|
|
164
|
+
problems.append(f"{rt}@{pos} '{p['name']}' len {p['length']}: in PDF, missing from CSV")
|
|
165
|
+
else:
|
|
166
|
+
for col, pv, cv in [('length', p['length'], int(c['length'])), ('type', p['type'], c['type']),
|
|
167
|
+
('required', required_of(p['required']), c['required'])]:
|
|
168
|
+
if pv != cv:
|
|
169
|
+
problems.append(f"{rt}@{pos} {c['key']}: {col} PDF={pv} CSV={cv}")
|
|
170
|
+
pdf_codes = {c['code']: c for c in raw.get(rt, {}).get('codes', [])}
|
|
171
|
+
csv_codes = {c['code']: c for c in codes if c['record'] == rt}
|
|
172
|
+
for code in sorted(set(pdf_codes) | set(csv_codes)):
|
|
173
|
+
p, c = pdf_codes.get(code), csv_codes.get(code)
|
|
174
|
+
if not p:
|
|
175
|
+
problems.append(f"{rt} code {code}: in CSV, not found in PDF extraction")
|
|
176
|
+
elif not c:
|
|
177
|
+
problems.append(f"{rt} code {code}: in PDF (len {p['length']}), missing from CSV")
|
|
178
|
+
elif p['length'] != int(c['length']):
|
|
179
|
+
problems.append(f"{rt} code {code}: length PDF={p['length']} CSV={c['length']}")
|
|
180
|
+
print('\n'.join(problems) if problems else 'No differences.')
|
|
181
|
+
return 1 if problems else 0
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
if __name__ == '__main__':
|
|
185
|
+
if len(sys.argv) == 4 and sys.argv[1] == 'extract':
|
|
186
|
+
extract(sys.argv[2], sys.argv[3])
|
|
187
|
+
elif len(sys.argv) == 4 and sys.argv[1] == 'diff':
|
|
188
|
+
sys.exit(diff(sys.argv[2], sys.argv[3]))
|
|
189
|
+
else:
|
|
190
|
+
print(__doc__)
|
|
191
|
+
sys.exit(2)
|