Skip to content

feat: add BT-120 VAT exemption reason (backport #247)#255

Open
mergify[bot] wants to merge 3 commits into
version-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-247
Open

feat: add BT-120 VAT exemption reason (backport #247)#255
mergify[bot] wants to merge 3 commits into
version-15-hotfixfrom
mergify/bp/version-15-hotfix/pr-247

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Apr 27, 2026

Adds a BT-120 textfield for the VAT exemption reason to the E-Invoice Settings: #183


This is an automatic backport of pull request #247 done by Mergify.

(cherry picked from commit cec83b5)

# Conflicts:
#	eu_einvoice/locale/de.po
#	eu_einvoice/locale/main.pot
@mergify

This comment was marked as outdated.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 27, 2026

Confidence Score: 5/5

The change is safe to merge; all new code paths are additive and gated behind an optional settings field that defaults to empty.

The BT-120 write is strictly additive — _set_optional_vat_exemption_reason_text is a no-op when the field is blank, so existing invoices are unaffected. The import side stores the parsed value as read-only display data with no downstream side effects. The _set_seller_id getattr fix only guards a previously unguarded attribute access and cannot regress existing behavior.

No files require special attention.

Sequence Diagram

sequenceDiagram
    participant S as E Invoice Settings
    participant G as EInvoiceGenerator
    participant IT as Item-level TradeTax
    participant DT as Doc-level TradeTax
    participant I as EInvoiceImport
    participant TR as EInvoiceTradeTax row

    Note over G: create_einvoice()
    G->>S: get_single_value("vat_exemption_reason_text")
    S-->>G: vat_exemption_reason_text (cached)

    Note over G: _add_line_item() — rate == 0
    G->>IT: "exemption_reason_code = BT-118 code"
    G->>IT: _set_optional_vat_exemption_reason_text(trade_tax)
    IT-->>IT: "exemption_reason = vat_exemption_reason_text (BT-120)"

    Note over G: _add_empty_tax()
    G->>DT: "exemption_reason_code = BT-118 code"
    G->>DT: _set_optional_vat_exemption_reason_text(trade_tax)
    DT-->>DT: "exemption_reason = vat_exemption_reason_text (BT-120)"

    Note over I: parse_tax() — import flow
    I->>TR: "vat_exemption_reason_text = tax.exemption_reason._text (read-only display)"
Loading

Reviews (2): Last reviewed commit: "fix: satisfy pre-commit and regenerate l..." | Re-trigger Greptile

Comment thread eu_einvoice/locale/de.po
Comment thread eu_einvoice/locale/main.pot
0xD0M1M0 and others added 2 commits May 12, 2026 20:04
Remove unnecessary quoted forward-reference annotations in E Invoice
Import (UP037). Regenerate de.po and main.pot so catalogs respect
ignore_translatable_strings_from while preserving BT-120 translations
from develop.
@dafrose dafrose force-pushed the mergify/bp/version-15-hotfix/pr-247 branch from 9dadac9 to 009c0d0 Compare June 5, 2026 08:31
@dafrose dafrose removed the conflicts label Jun 5, 2026
@barredterra
Copy link
Copy Markdown
Member

@greptileai

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