Repository navigation
Conversation
The ZUGFeRD 1 schema requires ram:Description in SpecifiedTradePaymentTerms. Since halfbyte#68 it was omitted when no payment terms text was given, so an invoice with only a due date failed schema validation in version 1 (test_invoice_without_gross_price). Version 1 falls back to "Paid" as before, version 2 keeps the behaviour of halfbyte#68. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This result was produced with the help of AI (supervised, not fully automated) and I hope this is acceptable for you.
Problem
mainfails CI since #68 was merged.test_invoice_without_gross_pricefails on all Ruby versions:#68 writes
ram:Descriptiononly when a payment terms text is given. That is fine for version 2. The ZUGFeRD 1 schema, however, requires the description wheneverSpecifiedTradePaymentTermsis written. An invoice with a due date but no payment terms text, like the one in this test, is therefore invalid in version 1. The branch of #68 was green on its own (26620f7). Only the merge result c2cae62 is red, and every PR based on currentmaininherits the failure (e.g. #63, #70).Change
In version 1, the description is written as before #68, with
"Paid"as the fallback. Version 2 keeps the behaviour of #68. This uses the sameversion == 1switch as the other version-specific parts ofInvoice#to_xml.Tests
No new test is needed:
test_invoice_without_gross_pricecovers the case and passes again. The full suite passes (44 runs, 0 failures). A CHANGELOG entry is included.