Fix: peppol parser rate calculation#32
Merged
Merged
Conversation
added 3 commits
January 22, 2026 21:28
- Introduced new fields in EDocument JSON schema for matching status and data. - Implemented `get_matching_status` and `save_matching_data` methods in EDocument class to handle matching logic. - Updated EDocument Profile JSON to include matcher path configuration. - Enhanced XML parser to accept EDocument instance for accessing matching data. - Developed PEPPOL-specific matcher to extract and match supplier, items, and purchase order data from XML. - Added dialog configuration for manual matching of unmatched entities. - Created basic matcher as a fallback for profiles without specific matching logic.
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
InvoicedQuantity instead of BaseQuantity
Problem
When parsing incoming PEPPOL UBL invoices, the parser was calculating the item rate incorrectly by
dividing PriceAmount by InvoicedQuantity (the line quantity) instead of BaseQuantity (from the
element).
Example XML:
2.00000
420.00
210.00000
1
Root Cause
In UBL 2.1 / PEPPOL BIS Billing 3.0:
The rate formula should be: rate = PriceAmount / BaseQuantity
The parser was incorrectly using: rate = PriceAmount / InvoicedQuantity