feat(e-billing,invoice,zugferd): credit notes, corrected invoices, preceding invoice and supplier number - #1085
Merged
Merged
Conversation
|
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.


Summary
Proper support for credit notes (381) and corrected invoices (384) in the e-billing pipeline, plus the seller identifier:
invoices.preceding_invoices(BT-25 number, BT-26 date) throughInvoiceDraft/InvoiceBuilder, the parser DTO and both Zugferd adapters.ZugferdConverteremits oneInvoiceReferencedDocumentper entry.invoices.supplier_number, persisted verbatim from the DTO. Emitted viaaddDocumentSellerIdwhen non-empty,couldin all profiles, shown in the seller group (ADR 0012).field_validation.document_type_profilesmaps BT-3 to a key prefix (381 → credit_note,384 → corrected_invoice), with fallback toinvoice_*.profile.
is a non-blocking warning.
e-billing.credit_note_payment_terms(defaultnull) is emitted as BT-20 for a 381 without due date and payment terms.ClassifyDocumentTypeActionswitches between the configured classification types before approval, flipping all amounts when the signs differ.document_classified), never counted as a value correction.resources.{key}.manual_upload.document_typesadds a required type choice without preselection, with a collapsible, translatable instruction (en/de).UploadedPdfSource.document_typeand applied after parsing, including the sign flip.allowed_document_type_codesnow includes 384.Data\Address::toEn16931Address()).Breaking changes
Moox\Zugferd\Contracts\ZugferdInvoicegainsprecedingInvoicesandsupplierNumber. Custom implementations must add both.InvoiceDraftgainssupplier_number(and optionalpreceding_invoices).FieldValidationProfile::priorityMapsDifferByType()is replaced bydocumentTypesWithOwnPriorities().ClassifyDocumentTypeAction::classificationSigns()is replaced byDocumentClassification::signs().Migrations (publish + run)
add_preceding_invoices_to_invoices_table,add_supplier_number_to_invoices_tableadd_document_type_to_ebilling_uploaded_pdf_sources_tableHosts
field_validation/invoice_uiconfig add thecredit_note_*/corrected_invoice_*keys anddocument_type_profiles, or rely on theinvoice_*fallback.supplier_numberto their maps if they override them.384 => negativeassumes corrections issued as a credit (delta). Hosts issuing full restatements setpositive.