Skip to content

Add Israel (IL) tax regime#735

Draft
dionivillos wants to merge 11 commits intoinvopop:mainfrom
dionivillos:add-il-regime
Draft

Add Israel (IL) tax regime#735
dionivillos wants to merge 11 commits intoinvopop:mainfrom
dionivillos:add-il-regime

Conversation

@dionivillos
Copy link
Copy Markdown

@dionivillos dionivillos commented Feb 24, 2026

This PR adds the initial Israel (IL) tax regime to GOBL:

  • VAT (Ma'am) tax category with the current general rate of 18% (effective 1 January 2025) and full historical rate values back to 2004.
  • Tax identity validation for the 9-digit Mispar Osek Morshe. Format-only validation, as the Luhn algorithm is only confirmed for personal IDs, not for company registration numbers.
  • Invoice scenarios for Reverse Charge (VAT Law 1975, Section 20) and Simplified Tax Invoice (VAT Law 1975, Section 46).
  • Credit note as the sole correction method.
  • Two example invoices: standard B2B and simplified B2C.

Note: SHAAM (CTC e-invoicing) is planned as a future GOBL addon and is not part of this PR.

Pre-Review Checklist

  • Opened this PR as a draft
  • Read the CONTRIBUTING.md guide.
  • Performed a self-review of my code.
  • Added thorough tests with at least 90% code coverage.
  • Modified or created example GOBL documents to show my changes in use, if appropriate.
  • Added links to the source of the changes in tax regimes or addons, either structured or in the comments.
  • Run go generate . to ensure that the Schemas and Regime data are up to date.
  • Reviewed and fixed all linter warnings.
  • Been obsessive with pointer nil checks to avoid panics.
  • Updated the CHANGELOG.md with an overview of my changes.
  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.

Only after checking off all the previous items:

  • Marked this PR as ready for review and requested one from @samlown.

@dionivillos dionivillos marked this pull request as ready for review February 24, 2026 19:39
@dionivillos dionivillos marked this pull request as draft February 24, 2026 19:43
@samlown samlown requested a review from Copilot February 24, 2026 22:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread regimes/il/il.go
Comment on lines +12 to +14
func init() {
tax.RegisterRegimeDef(New())
}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread regimes/il/README.md

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.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Renamed everything as "Murshe" as it appears to be the more common one.

Comment thread regimes/il/README.md

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:
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread regimes/il/README.md

**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).
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +1 to +47
$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
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 97.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.07%. Comparing base (926130f) to head (7da2785).

Files with missing lines Patch % Lines
regimes/il/identities.go 94.28% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dionivillos
Copy link
Copy Markdown
Author

@samlown

Copy link
Copy Markdown
Collaborator

@samlown samlown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread regimes/il/tax_identity.go Outdated
// 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)),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably just use the validation.Match method here if only pattern matching is supported.

Comment thread regimes/il/il.go Outdated
}
}

// Validate checks the document type to determine if validation is required.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is a bit too specific for the context, the Validate method may be used for more than just tax IDs.

Comment thread regimes/il/il.go
Name: i18n.String{
i18n.EN: "Israel",
i18n.HE: "ישראל",
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're moving away from the Regime README and instead incorporating key details directly in the Regime description.

@dionivillos
Copy link
Copy Markdown
Author

Hi @samlown ! I've made the requested changes and also added support for identities. It should be good to go now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants