fix(invoiceintake): UBL e-invoice goes to the plain draft at once #105

Merged
sharang merged 1 commits from fix/intake-ubl-fastpath into main 2026-10-29 13:08:28 +00:00
Owner

ERPNext's eu_einvoice reads CII only (ZUGFeRD / XRechnung-CII). For a UBL XRechnung it answers HTTP 500 TypeError: Invalid XML, found tag {…ubl…}Invoice where {…}CrossIndustryInvoice was expected (seen on prod 2026-10-29 12:37). The intake treated every 500 as transient and retried for three runs before falling back to the plain draft.

Now an "Invalid XML, found tag" error is handled like the 417 "not an e-invoice": the next attached file is tried, then the draft Purchase Invoice with the original attached (or the ToDo when the supplier is unknown). Other 500s keep the three retries.

  • wrongSyntax(err) in internal/invoiceintake/intake.go
  • Test TestEInvoiceWrongSyntaxIsPlainAtOnce: fails without the change, passes with it.

After merge: bump the breakpilot-invoice-intake pin in orca-infra to the new image.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4

ERPNext's eu_einvoice reads CII only (ZUGFeRD / XRechnung-CII). For a UBL XRechnung it answers HTTP 500 `TypeError: Invalid XML, found tag {…ubl…}Invoice where {…}CrossIndustryInvoice was expected` (seen on prod 2026-10-29 12:37). The intake treated every 500 as transient and retried for three runs before falling back to the plain draft. Now an "Invalid XML, found tag" error is handled like the 417 "not an e-invoice": the next attached file is tried, then the draft Purchase Invoice with the original attached (or the ToDo when the supplier is unknown). Other 500s keep the three retries. - `wrongSyntax(err)` in `internal/invoiceintake/intake.go` - Test `TestEInvoiceWrongSyntaxIsPlainAtOnce`: fails without the change, passes with it. After merge: bump the `breakpilot-invoice-intake` pin in orca-infra to the new image. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang added 1 commit 2026-10-29 12:42:50 +00:00
fix(invoiceintake): UBL e-invoice goes to the plain draft at once
ci / shared (pull_request) Successful in 13s
ci / test (pull_request) Successful in 24m56s
ci / image (pull_request) Skipped
daca82ecf6
eu_einvoice reads CII only and answers a UBL XRechnung with a 500
("Invalid XML, found tag …ubl…Invoice"). The intake took that for a
transient error and retried three runs (30 min) before the plain
draft. A wrong root element is now treated like the 417 "not an
e-invoice": next file, then the draft with the original attached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
sharang merged commit e80076559a into main 2026-10-29 13:08:28 +00:00
Sign in to join this conversation.