• Resolved eaglejohn

    (@danielbenjamins)


    I’m using Moneybird to process my invoices. This used to work great, all WooCommerce order data got transferred into my Moneybird invoices. Although, since a while that doesn’t work anymore. Moneybird says that the “UBL file is not valid”. Any suggestions? I didn’t change any settings for years. Maybe this is on Moneybird’s end. Latest version of Woo and the plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @danielbenjamins

    We’re sorry to hear about the issue. Could you please validate the XML in UBL 2.1 format here and share any errors you encounter in your response?

    Thread Starter eaglejohn

    (@danielbenjamins)

    XML Syntax – invoice-5001.xml

    • All fine on this level

    XML Schema – external/schemas/ubl21/maindoc/UBL-CreditNote-2.1.xsd

    Error

    • Location: invoice-5001.xml
    • Error message: [SAX] cvc-elt.1.a: Cannot find the declaration of element ‘Invoice’.
    • Technical details: cvc-elt.1.a: Cannot find the declaration of element ‘Invoice’.
    Plugin Contributor alexmigf

    (@alexmigf)

    Did you select UBL 2.1 Credit Note instead of Invoice in the validator?

    Thread Starter eaglejohn

    (@danielbenjamins)

    Sorry, I missed that. This is the output for rule set “UBL Invoice 2.1”:

    XML Syntax – invoice-5001.xml

    All fine on this level

    XML Schema – external/schemas/ubl21/maindoc/UBL-Invoice-2.1.xsd

    Error

    Location: invoice-5001.xml

    Error message: [SAX] cvc-complex-type.2.4.a: Invalid content was found starting with element ‘{“urn:oasis:names:specification:ubl:schema:xsd:Invoice-2”:AccountingSupplierParty}’. One of ‘{“urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:BillingReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:DespatchDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ReceiptDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:StatementDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:OriginatorDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ContractDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:AdditionalDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ProjectReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:Signature, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:AccountingSupplierParty}’ is expected.

    Technical details: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘{“urn:oasis:names:specification:ubl:schema:xsd:Invoice-2”:AccountingSupplierParty}’. One of ‘{“urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:BillingReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:DespatchDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ReceiptDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:StatementDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:OriginatorDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ContractDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:AdditionalDocumentReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:ProjectReference, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:Signature, “urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”:AccountingSupplierParty}’ is expected.

    Plugin Contributor alexmigf

    (@alexmigf)

    Could you share the contents of the “AccountingSupplierParty” element while omitting any sensitive information?

    Thread Starter eaglejohn

    (@danielbenjamins)

    <?xml version="1.0"?>
    <Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
    <cbc:UBLVersionID>2.1</cbc:UBLVersionID>
    <cbc:ID>64</cbc:ID>
    <cbc:IssueDate>2025-03-08</cbc:IssueDate>
    <cbc:InvoiceTypeCode listID="UNCL1001" listAgencyID="6">380</cbc:InvoiceTypeCode>
    <cbc:DocumentCurrencyCode listID="ISO4217" listAgencyID="6">CAD</cbc:DocumentCurrencyCode>
    <cac:OrderReference>
    <cbc:ID>5001</cbc:ID>
    </cac:OrderReference>
    <AccountingSupplierParty>
    <cac:AccountingSupplierParty>
    <cbc:CustomerAssignedAccountID></cbc:CustomerAssignedAccountID>
    <cac:Party>
    <cac:PartyName>
    <cbc:Name>My Company Name</cbc:Name>
    </cac:PartyName>
    <cac:PostalAddress>
    <cbc:StreetName>My Company Address</cbc:StreetName>
    <cbc:CityName>My Company City</cbc:CityName>
    <cbc:PostalZone>My Company Postal Code</cbc:PostalZone>
    <cac:AddressLine>
    <cbc:Line>My Company website</cbc:Line>
    </cac:AddressLine>
    <cac:Country>
    <cbc:IdentificationCode listID="ISO3166-1:Alpha2" listAgencyID="6">CA</cbc:IdentificationCode>
    </cac:Country>
    </cac:PostalAddress>
    <cac:Contact>
    <cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
    </cac:Contact>
    </cac:Party>
    </cac:AccountingSupplierParty>
    </AccountingSupplierParty>
    <AccountingCustomerParty>
    <cac:AccountingCustomerParty>
    <cbc:CustomerAssignedAccountID></cbc:CustomerAssignedAccountID>
    <cac:Party>
    <cac:PartyName>
    <cbc:Name>Customer Name</cbc:Name>
    </cac:PartyName>
    <cac:PostalAddress>
    <cbc:StreetName>Customer Address</cbc:StreetName>
    <cbc:CityName>Customer City</cbc:CityName>
    <cbc:PostalZone>Customer Postal Code</cbc:PostalZone>
    <cac:AddressLine>
    <cbc:Line>Customer address line 2</cbc:Line>
    </cac:AddressLine>
    <cac:Country>
    <cbc:IdentificationCode listID="ISO3166-1:Alpha2" listAgencyID="6">CA</cbc:IdentificationCode>
    </cac:Country>
    </cac:PostalAddress>
    <cac:PartyTaxScheme>
    <cbc:CompanyID/>
    <cac:TaxScheme>
    <cbc:ID schemeID="UN/ECE 5153" schemeAgencyID="6">VAT</cbc:ID>
    </cac:TaxScheme>
    </cac:PartyTaxScheme>
    <cac:Contact>
    <cbc:Name>Customer Name</cbc:Name>
    <cbc:ElectronicMail>[email protected]</cbc:ElectronicMail>
    </cac:Contact>
    </cac:Party>
    </cac:AccountingCustomerParty>
    </AccountingCustomerParty>
    <cac:PaymentMeans>
    <cbc:PaymentMeansCode>97</cbc:PaymentMeansCode>
    <cbc:InstructionNote>Visa ending in 0000</cbc:InstructionNote>
    </cac:PaymentMeans>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="CAD">21.02</cbc:TaxAmount>
    <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="CAD">175.16</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="CAD">21.02</cbc:TaxAmount>
    <cac:TaxCategory>
    <cbc:ID></cbc:ID>
    <cbc:Name>GST+PST</cbc:Name>
    <cbc:Percent>12</cbc:Percent>
    <cbc:TaxExemptionReasonCode></cbc:TaxExemptionReasonCode>
    <cbc:TaxExemptionReason></cbc:TaxExemptionReason>
    <cac:TaxScheme>
    <cbc:ID></cbc:ID>
    </cac:TaxScheme>
    </cac:TaxCategory>
    </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="CAD">175.16</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="CAD">175.16</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="CAD">196.18</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="CAD">196.18</cbc:PayableAmount>
    </cac:LegalMonetaryTotal>
    <cac:InvoiceLine>
    <cbc:ID>4525</cbc:ID>
    <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="CAD">45.24</cbc:LineExtensionAmount>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="CAD">5.43</cbc:TaxAmount>
    <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="CAD">45.24</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="CAD">5.43</cbc:TaxAmount>
    <cac:TaxCategory>
    <cbc:ID></cbc:ID>
    <cbc:Name>GST+PST</cbc:Name>
    <cbc:Percent>12</cbc:Percent>
    <cac:TaxScheme>
    <cbc:ID></cbc:ID>
    </cac:TaxScheme>
    </cac:TaxCategory>
    </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:Item>
    <cbc:Name>Product 1</cbc:Name>
    </cac:Item>
    <cac:Price>
    <cbc:PriceAmount currencyID="CAD">45.24</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
    </cac:Price>
    </cac:InvoiceLine>
    <cac:InvoiceLine>
    <cbc:ID>4526</cbc:ID>
    <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="CAD">121.8</cbc:LineExtensionAmount>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="CAD">14.62</cbc:TaxAmount>
    <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="CAD">121.8</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="CAD">14.62</cbc:TaxAmount>
    <cac:TaxCategory>
    <cbc:ID></cbc:ID>
    <cbc:Name>GST+PST</cbc:Name>
    <cbc:Percent>12</cbc:Percent>
    <cac:TaxScheme>
    <cbc:ID></cbc:ID>
    </cac:TaxScheme>
    </cac:TaxCategory>
    </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:Item>
    <cbc:Name>Product 2</cbc:Name>
    </cac:Item>
    <cac:Price>
    <cbc:PriceAmount currencyID="CAD">121.8</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
    </cac:Price>
    </cac:InvoiceLine>
    <cac:InvoiceLine>
    <cbc:ID>4527</cbc:ID>
    <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="CAD">8.12</cbc:LineExtensionAmount>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="CAD">0.97</cbc:TaxAmount>
    <cac:TaxSubtotal>
    <cbc:TaxableAmount currencyID="CAD">8.12</cbc:TaxableAmount>
    <cbc:TaxAmount currencyID="CAD">0.97</cbc:TaxAmount>
    <cac:TaxCategory>
    <cbc:ID></cbc:ID>
    <cbc:Name>GST+PST</cbc:Name>
    <cbc:Percent>12</cbc:Percent>
    <cac:TaxScheme>
    <cbc:ID></cbc:ID>
    </cac:TaxScheme>
    </cac:TaxCategory>
    </cac:TaxSubtotal>
    </cac:TaxTotal>
    <cac:Item>
    <cbc:Name>Product 3</cbc:Name>
    </cac:Item>
    <cac:Price>
    <cbc:PriceAmount currencyID="CAD">8.12</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
    </cac:Price>
    </cac:InvoiceLine>
    <cac:InvoiceLine>
    <cbc:ID>4528</cbc:ID>
    <cbc:InvoicedQuantity>1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="CAD">0</cbc:LineExtensionAmount>
    <cac:TaxTotal>
    <cbc:TaxAmount currencyID="CAD">0</cbc:TaxAmount>
    </cac:TaxTotal>
    <cac:Item>
    <cbc:Name>Free shipping</cbc:Name>
    </cac:Item>
    <cac:Price>
    <cbc:PriceAmount currencyID="CAD">0</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
    </cac:Price>
    </cac:InvoiceLine>
    </Invoice>
    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @danielbenjamins

    It could be connected to this issue. I’ll update you once I have something ready for testing.

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @danielbenjamins

    Please give this version a try and let us know if you encounter any issues.

    Thread Starter eaglejohn

    (@danielbenjamins)

    I’ll wait for a plugin update, I currently don’t have time to try betas and release candidates.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘UBL not valid’ is closed to new replies.