Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive support for the Israel (IL) tax regime to GOBL. The implementation includes VAT (Ma'am) tax categories with full historical rate data back to 2004, format validation for the 9-digit Mispar Osek Morshe tax ID, invoice scenarios for reverse charge and simplified tax invoices, credit note corrections, comprehensive documentation, and two working examples. The PR follows established GOBL patterns for regime implementation and provides a solid foundation for Israeli tax compliance.
Changes:
- Added Israel (IL) regime with VAT tax category, historical rates from 2004-2025, and standard tax keys
- Implemented format-only validation for 9-digit Mispar Osek Morshe tax IDs with comprehensive test coverage
- Added invoice scenarios for reverse charge (VAT Law Section 20) and simplified tax invoices (VAT Law Section 46)
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| regimes/regimes.go | Registers IL regime in alphabetical order |
| regimes/il/il.go | Main regime definition with validator, normalizer, scenarios and corrections |
| regimes/il/tax_identity.go | Format validation for 9-digit Mispar Osek Morshe tax IDs |
| regimes/il/tax_identity_test.go | Comprehensive tests for tax ID validation |
| regimes/il/tax_categories.go | VAT category with general rate and historical values 2004-2025 |
| regimes/il/scenarios.go | Reverse charge and simplified invoice scenarios |
| regimes/il/scenarios_test.go | Tests for invoice scenario application |
| regimes/il/README.md | Detailed documentation of Israeli tax regime, VAT rates, and SHAAM e-invoicing |
| examples/il/invoice-il-il-stnr.yaml | Standard B2B invoice example |
| examples/il/invoice-il-simplified.yaml | Simplified B2C invoice example |
| examples/il/out/invoice-il-il-stnr.json | Calculated B2B invoice envelope |
| examples/il/out/invoice-il-simplified.json | Calculated simplified invoice envelope |
| data/schemas/tax/regime-code.json | Adds IL to regime code schema |
| data/regimes/il.json | Generated regime data with all tax categories and scenarios |
| CHANGELOG.md | Documents addition of IL regime |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func init() { | ||
| tax.RegisterRegimeDef(New()) | ||
| } |
There was a problem hiding this comment.
Missing test file for regime initialization. Following the pattern established in other regimes (ie/ie_test.go, us/us_test.go), there should be an il_test.go file with a TestNew function that verifies the regime definition is correctly set up. This should test that the regime has the correct country code, name, categories, validator, normalizer, and other expected properties.
|
|
||
| Israeli businesses are classified into the following categories based on their annual turnover: | ||
|
|
||
| - **Authorized Dealer (Osek Murshe — עוסק מורשה)**: Businesses with annual turnover above **NIS 120,000** must register, charge VAT at the general rate, and file bimonthly returns. |
There was a problem hiding this comment.
Inconsistent transliteration of the Hebrew term "מורשה". The code uses "Morshe" (lines 32 in README, lines 13 and 30 in tax_identity.go), but "Murshe" is used in lines 24, 34, and 52 of the README. For consistency, choose one transliteration and use it throughout the codebase. The code files use "Morshe", so the README should be updated to match.
There was a problem hiding this comment.
Fixed. Renamed everything as "Murshe" as it appears to be the more common one.
|
|
||
| Israeli VAT-registered businesses are identified by a **Mispar Osek Morshe** (מספר עוסק מורשה), a 9-digit numeric identifier assigned by the ITA upon registration. | ||
|
|
||
| For sole proprietors (Osek Murshe), the Mispar Osek is typically the same as the personal **Mispar Zehut** (מספר זהות / Teudat Zehut), a 9-digit national ID number. For companies and other legal entities, the Mispar Osek corresponds to the entity's registration number issued by the **Corporations Authority** (רשות התאגידים), where the first two digits indicate the entity type: |
There was a problem hiding this comment.
Inconsistent transliteration of the Hebrew term "מורשה". Use "Morshe" to match the spelling used in the code files (tax_identity.go) and line 32 of the README.
|
|
||
| **Simplified Tax Invoice**: Allowed in the following cases, per Section 46 of the VAT Law 5736-1975: | ||
|
|
||
| - When the recipient of goods or services is **not a registered dealer** (Osek Murshe). |
There was a problem hiding this comment.
Inconsistent transliteration of the Hebrew term "מורשה". Use "Morshe" to match the spelling used in the code files (tax_identity.go) and line 32 of the README.
| $schema: "https://gobl.org/draft-0/bill/invoice" | ||
| uuid: "3aea7b56-59d8-4beb-90bd-f8f280d852a0" | ||
| currency: "ILS" | ||
| issue_date: "2025-06-15" | ||
| series: "SAMPLE" | ||
| code: "001" | ||
|
|
||
| supplier: | ||
| tax_id: | ||
| country: "IL" | ||
| code: "516179157" | ||
| name: "Provide One Ltd" | ||
| emails: | ||
| - addr: "billing@example.co.il" | ||
| addresses: | ||
| - num: "42" | ||
| street: "Rothschild Boulevard" | ||
| locality: "Tel Aviv" | ||
| code: "6688312" | ||
| country: "IL" | ||
|
|
||
| customer: | ||
| tax_id: | ||
| country: "IL" | ||
| code: "514806132" | ||
| name: "Sample Consumer Ltd" | ||
| emails: | ||
| - addr: "email@sample.co.il" | ||
| addresses: | ||
| - num: "18" | ||
| street: "Ben Yehuda Street" | ||
| locality: "Jerusalem" | ||
| code: "9422108" | ||
| country: "IL" | ||
|
|
||
| lines: | ||
| - quantity: 20 | ||
| item: | ||
| name: "Development services" | ||
| price: "90.00" | ||
| unit: "h" | ||
| discounts: | ||
| - percent: "5%" | ||
| reason: "Special discount" | ||
| taxes: | ||
| - cat: VAT | ||
| rate: standard |
There was a problem hiding this comment.
The filename uses "stnr" which is typically a German tax abbreviation (Steuernummer). For an Israeli B2B invoice example, a more descriptive name would be "invoice-il-b2b.yaml" or "invoice-il-standard.yaml" to better reflect the content and follow common naming patterns seen in other regime examples.
There was a problem hiding this comment.
Fixed. I thought it was an abbreviation for "standard" (as I saw in the ae regime example). I have renamed it to invoice-il-il-yaml as seen in other regimes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #735 +/- ##
==========================================
+ Coverage 93.05% 93.07% +0.02%
==========================================
Files 333 336 +3
Lines 17785 17875 +90
==========================================
+ Hits 16549 16637 +88
- Misses 870 871 +1
- Partials 366 367 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
samlown
left a comment
There was a problem hiding this comment.
Great first try! Almost ready for merging. I'd move key details from the README to the regime and consider some of the other comments. It looks like IL offers the ability to issue invoices using non-VAT IDs, support for identities may be beneficial.
| // validateTaxIdentity checks to ensure the Israeli Osek Murshe format is correct. | ||
| func validateTaxIdentity(tID *tax.Identity) error { | ||
| return validation.ValidateStruct(tID, | ||
| validation.Field(&tID.Code, validation.By(validateOsekCode)), |
There was a problem hiding this comment.
You can probably just use the validation.Match method here if only pattern matching is supported.
| } | ||
| } | ||
|
|
||
| // Validate checks the document type to determine if validation is required. |
There was a problem hiding this comment.
This comment is a bit too specific for the context, the Validate method may be used for more than just tax IDs.
| Name: i18n.String{ | ||
| i18n.EN: "Israel", | ||
| i18n.HE: "ישראל", | ||
| }, |
There was a problem hiding this comment.
We're moving away from the Regime README and instead incorporating key details directly in the Regime description.
Adds support for identities (il-personal-id and il-company-id). Adds new invoice example (invoice-il-exempt.yaml). Corrects indentation in IL description. De-duplicates regex pattern for validation.
a512ecc to
7da2785
Compare
|
Hi @samlown ! I've made the requested changes and also added support for identities. It should be good to go now! |
This PR adds the initial Israel (IL) tax regime to GOBL:
Note: SHAAM (CTC e-invoicing) is planned as a future GOBL addon and is not part of this PR.
Pre-Review Checklist
go generate .to ensure that the Schemas and Regime data are up to date.Only after checking off all the previous items: