oriol / validation-tools

2 stars 0 forks source link

Problems with the new validation package on AIX. #10

Closed Tpendrup closed 9 years ago

Tpendrup commented 9 years ago

Hello We have tried to run the new 3.1 PEPPOL schematrons on our system (AIX 5.3 wpar on 7.1 lpar). We found a problem in "BIIRULES-UBL-T10.xsl" that fails on this rule: "[BII2-T10-R058]-Invoice total without VAT MUST be equal to the sum of VAT category taxable amounts; " When we run the same validation on the same document on Windows and Linux we get no errors. We have tried different versions of Saxon9 and Java on all environments with the same result:

Does anybody have any idea about what the problem might be.

You can find the testfile here: https://joinup.ec.europa.eu/community/pid/topic/problems-new-validation-package-aix

phax commented 9 years ago

Copy from the other forum:

Yes. It is the assert that are failing as if there actual where a calculation error.

But it as a very simple example with only one TaxSubtotal group.

BII2-T10-R058; [flag]=fatal; [Description]=[BII2-T10-R058]-Invoice total without VAT MUST be equal to the sum of VAT category taxable amounts; [test]=((cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount) and (round(xs:decimal(sum(cac:TaxTotal//cac:TaxSubtotal/cbc:TaxableAmount)) 10 \ 10) div 100 = (xs:decimal(cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount)

oriol commented 9 years ago

Can you provide me with some samples where this rule is not working?

Tpendrup commented 9 years ago

Hello.

Try this example. As I wrote it validates OK on windows and linux. But it fails in our AIX environments.

/thomas

From: Oriol Bausa [mailto:notifications@github.com] Sent: 15. oktober 2015 08:32 To: oriol/validation-tools validation-tools@noreply.github.com Cc: Thomas Jørgensen thj@evenex.com Subject: Re: [validation-tools] Problems with the new validation package on AIX. (#10)

Can you provide me with some samples where this rule is not working?

— Reply to this email directly or view it on GitHubhttps://github.com/oriol/validation-tools/issues/10#issuecomment-148294608.

<?xml version="1.0" encoding="utf-8"?>

cbc:UBLVersionID2.1/cbc:UBLVersionID cbc:CustomizationIDurn:www.cenbii.eu:transaction:biitrns010:ver2.0:extended:urn:www.peppol.eu:bis:peppol4a:ver2.0/cbc:CustomizationID cbc:ProfileIDurn:www.cenbii.eu:profile:bii04:ver2.0/cbc:ProfileID cbc:IDPeppolInv 001/cbc:ID cbc:IssueDate2013-04-10/cbc:IssueDate 380/cbc:InvoiceTypeCode cbc:NoteContract was established through our website/cbc:Note DKK/cbc:DocumentCurrencyCode cac:InvoicePeriod cbc:StartDate2013-01-01/cbc:StartDate cbc:EndDate2013-04-01/cbc:EndDate /cac:InvoicePeriod cac:ContractDocumentReference cbc:IDSUBSCR571/cbc:ID cbc:DocumentTypeContract/cbc:DocumentType /cac:ContractDocumentReference cac:AccountingSupplierParty cac:Party 5790002054686/cbc:EndpointID cac:PartyName cbc:NameSubscriptionSeller./cbc:Name /cac:PartyName cac:PostalAddress cbc:StreetNameMain street 2, Building 4/cbc:StreetName cbc:CityNameBig city/cbc:CityName cbc:PostalZone54321/cbc:PostalZone cac:Country DK/cbc:IdentificationCode /cac:Country /cac:PostalAddress cac:PartyTaxScheme DK16356706/cbc:CompanyID cac:TaxScheme cbc:IDVAT/cbc:ID /cac:TaxScheme /cac:PartyTaxScheme cac:PartyLegalEntity DK16356706/cbc:CompanyID /cac:PartyLegalEntity cac:Contact cbc:ElectronicMailantonio@SubscriptionsSeller.dk/cbc:ElectronicMail /cac:Contact /cac:Party /cac:AccountingSupplierParty cac:AccountingCustomerParty cac:Party 5790001896904/cbc:EndpointID cac:PartyName cbc:NameBuyercompany ltd/cbc:Name /cac:PartyName cac:PostalAddress cbc:StreetNameAnystreet, Building 1/cbc:StreetName cbc:CityNameAnytown/cbc:CityName cbc:PostalZone101/cbc:PostalZone cac:Country DK/cbc:IdentificationCode /cac:Country /cac:PostalAddress /cac:Party /cac:AccountingCustomerParty cac:PaymentMeans 42/cbc:PaymentMeansCode cbc:PaymentDueDate2013-05-10/cbc:PaymentDueDate cbc:PaymentIDPayref1/cbc:PaymentID cac:PayeeFinancialAccount DK1212341234123412/cbc:ID /cac:PayeeFinancialAccount /cac:PaymentMeans cac:AllowanceCharge cbc:ChargeIndicatortrue/cbc:ChargeIndicator 94/cbc:AllowanceChargeReasonCode cbc:AllowanceChargeReasonFreight charge/cbc:AllowanceChargeReason 100.00/cbc:Amount cac:TaxCategory S/cbc:ID cbc:Percent25/cbc:Percent cac:TaxScheme cbc:IDVAT/cbc:ID /cac:TaxScheme /cac:TaxCategory /cac:AllowanceCharge cac:TaxTotal 225.00/cbc:TaxAmount cac:TaxSubtotal 900.00/cbc:TaxableAmount 225.00/cbc:TaxAmount cac:TaxCategory S/cbc:ID cbc:Percent25/cbc:Percent cac:TaxScheme cbc:IDVAT/cbc:ID /cac:TaxScheme /cac:TaxCategory /cac:TaxSubtotal /cac:TaxTotal cac:LegalMonetaryTotal 800.00/cbc:LineExtensionAmount 900.00/cbc:TaxExclusiveAmount 1125.00/cbc:TaxInclusiveAmount 100.00/cbc:ChargeTotalAmount 1125.00/cbc:PayableAmount /cac:LegalMonetaryTotal cac:InvoiceLine cbc:ID1/cbc:ID 1/cbc:InvoicedQuantity 800.00/cbc:LineExtensionAmount cac:Item cbc:DescriptionPaper Subscription fee 1st quarter/cbc:Description cbc:NamePaper Subscription/cbc:Name cac:ClassifiedTaxCategory S/cbc:ID cbc:Percent25/cbc:Percent cac:TaxScheme cbc:IDVAT/cbc:ID /cac:TaxScheme /cac:ClassifiedTaxCategory /cac:Item cac:Price 800.00/cbc:PriceAmount /cac:Price /cac:InvoiceLine
oriol commented 9 years ago

This instance only fires a warning in the environments I have. Cannot test in AIX though.

phax commented 9 years ago

@Tpendrup Can you elaborate a bit on the XSLT library that you are using on AIX. Thanks

Tpendrup commented 9 years ago

On AIX we have tried "Saxon9-9.2.1.5" and "SaxonHE9-6-0-7J" . Both versions works fine on Linux and Windows.

Tpendrup commented 9 years ago

I have left a note with MySupply in Denmark - to see if they have an AIX system we can use to verify the problem.

phax commented 9 years ago

I potentially has something to do with the IBM JDK used on AIX compared to the Oracle JDK...

Tpendrup commented 9 years ago

Good news. The issue is solved by updating our 2009 JAVA.6 (IBM jre) with the latest fixes,. Thank you all.

oriol commented 9 years ago

Thank you for your comments!