Skip to content

UBL fixes#885

Open
PeterSawatzki-MGGM wants to merge 8 commits intostephanstapel:masterfrom
MGGM-Software-GmbH:master
Open

UBL fixes#885
PeterSawatzki-MGGM wants to merge 8 commits intostephanstapel:masterfrom
MGGM-Software-GmbH:master

Conversation

@PeterSawatzki-MGGM
Copy link
Contributor

Summary

UBL fixes

Checklist

  • Code follows repo Coding Instructions
  • Public APIs documented (XML)
  • Unit tests added/updated
  • No blocking async (.Result / GetAwaiter().GetResult())
  • CancellationToken respected
  • Analyzers clean (dotnet build no warnings as errors)
  • dotnet format --verify-no-changes passes

Breaking changes?

  • No
  • Yes (explain impact & migration)

…OICE_ubl.xml)

Check for ElectronicAddress.Address != '' like in CII (fails 01.01a-INVOICE_ubl.xml too)
@stephanstapel
Copy link
Owner

Thanks for the fix. imho you can make the change more specific by explicitly stating the XPath:

https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-InvoicePeriod/

@PeterSawatzki-MGGM
Copy link
Contributor Author

Sorry, but the more specific XPath /ubl:Invoice.. does not work

@stephanstapel
Copy link
Owner

Sorry, but the more specific XPath /ubl:Invoice.. does not work

strange. Could you add a test case to the unit test class?

@PeterSawatzki-MGGM
Copy link
Contributor Author

I added a test and also corrected the test TestReferenceXRechnung21UBL: Name has to be equal "".

- UBL Reader: TaxRepresentativeParty XPath ohne /cac:Party (BUG 1)
  In UBL 2.1 ist TaxRepresentativeParty direkt vom Typ PartyType
- UBL Writer: BillingPeriod prueft jetzt Start OR End statt End OR End (BUG 2)
- UBL Reader: UnitCode Fallback auch fuer CreditedQuantity (BUG 4)
- v1.0 Reader: BillingPeriod XPath ApplicableHeaderTradeSettlement -> ApplicableSupplyChainTradeSettlement
- v1.0 Reader: _nodeAsParty Street = lineTwo statt lineOne wenn lineTwo existiert
- v1.0 Reader: penaltyActualAmount XPath DiscountTerms -> PenaltyTerms
- v2.0 Reader: penaltyActualAmount XPath DiscountTerms -> PenaltyTerms
- v2.3 Reader: penaltyActualAmount XPath DiscountTerms -> PenaltyTerms
- InvoiceValidator: taxBasis Diagnostik-Meldung fehlte + chargeTotal
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
21.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

if (!String.IsNullOrWhiteSpace(lineTwo))
{
retval.ContactName = lineOne;
retval.Street = lineOne;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour is consistent across all versions. I'd leave this like it is, i.e.

retval.Street = LineOne
retval.Street2 = LineTwo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implementied it as per PR #863 where you said:

"'d like to leave the mapping as it was for consistency purpose.

Street = lineTwo
Street2 = lineOne"

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.

2 participants