Closed OLLIVAULT closed 3 months ago
Sorry for the spam, you're a boss.
Hi @OLLIVAULT,
please provide the full code and the complete error message including callstack
Salut@OLLIVAULT,
veuillez fournir le code complet et le message d'erreur complet, y compris la pile d'appels
$document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_BASIC);
$document
->setDocumentBusinessProcess($businessProcess)
->setDocumentInformation($numFacture, $typeFacture, $dateFacture, $codeDevise)
// Vendeur
->setDocumentSeller($nomEntreprise,$numSIRENSIRETVendeur)
->setDocumentSellerLegalOrganisation($numSIRENSIRETVendeur, null, $appellationCommercialeVendeur)
->setDocumentSellerAddress($adresseVendeurLigne1, $adresseVendeurLigne2, $adresseVendeurLigne3,
$codePostalVendeur, $localiteVendeur, $codePaysVendeur, $subdivisionPaysVendeur)
->setDocumentSellerCommunication("EM", $emailVendeur)
// Vendeur représentant
->setDocumentSellerTaxRepresentativeTradeParty($nomRepresentantFiscalVendeur)
->setDocumentSellerTaxRepresentativeAddress($adresseRepresentantFiscalLigne1,
$adresseRepresentantFiscalLigne2, $adresseRepresentantFiscalLigne3, $codePostalRepresentantFiscal,
$localiteRepresentantFiscal, $codePaysRepresentantFiscal, $subdivisionPaysRepresentantFiscal)
->setDocumentSupplyChainEvent($dateEffectiveLivraison)
->setDocumentDespatchAdviceReferencedDocument($identifiantAvisExpedition)
// Acheteur
->setDocumentBuyer($nomClient, $numSIRENSIRETAcheteur)
->setDocumentBuyerLegalOrganisation($numSIRENSIRETAcheteur, null, null)
->setDocumentBuyerReference($reference)
->setDocumentBuyerOrderReferencedDocument($numCommande)
->setDocumentSummation($montTTC, $montNetAPayer, $montantNetTotal,
$montantTotalChargesFraisDocument, $montantTotalRemisesDocument, $montHT, $montTVA, null,
$montantPaye)
->setDocumentBuyerAddress($adresseAcheteurLigne1, $adresseAcheteurLigne2, $adresseAcheteurLigne3,
$codePostalAcheteur, $localiteAcheteur, $codePaysAcheteur, $subdivisionPaysAcheteur)
->addDocumentBuyerGlobalId($identifiantAcheteur, '0088')
->setDocumentSellerCommunication("EM", $emailAcheteur)
// Livraison
->setDocumentShipTo($nomIntervenantLivrer, $identifiantEtablissementLivraison)
->setDocumentShipToAddress($adresseLivraisonLigne1, $adresseLivraisonLigne2, $adresseLivraisonLigne3,
$codePostalLivraison, $localiteLivraison, $codePaysLivraison, $subdivisionPaysLivraison)
// Bénéficiaire
->setDocumentPayee($nomBeneficiaire, $identifiantBeneficiaire)
->setDocumentPayeeLegalOrganisation($identifiantEnregistrementLegalBeneficiaire, null, null)
// Créancier
->setDocumentGeneralPaymentInformation($identifiantBancaireCreancier, $referencePaiement)
->setDocumentPositionNote($noteFacture, null, $sujetNoteFactureCode)
->setDocumentContractReferencedDocument($identifiantContrat)
->setDocumentBillingPeriod($dateDebutPeriodeFacturation, $dateFinPeriodeFacturation, null)
->setDocumentInvoiceReferencedDocument($numeroFactureAnterieure, $dateEmissionFactureAnterieure)
->setDocumentPositionNote($noteLigneFacture)
->setDocumentPositionProductDetails($nomArticle, null, null, null, null, $identifiantStandardArticle)
->setDocumentPositionGrossPrice($prixBrutArticle)
->setForeignCurrency($deviseComptabilisationTVA, $montantTVA)
->setDocumentPositionNetPrice($prixNetArticle, $quantiteBasePrixArticle, $uniteMesureQuantiteBasePrixArticle)
->setDocumentPositionQuantity($quantiteFacturee, $uniteMesureQuantiteFacturee)
->setDocumentPositionBillingPeriod($dateDebutPeriodeFacturationLigne, $dateFinPeriodeFacturationLigne)
->setDocumentPositionLineSummation($montantNetLigneFacture)
->addDocumentSellerTaxRepresentativeTaxRegistration("VA", $identifiantTVArepresentantFiscal)
//FC = Tax number, VA = Sales tax number
->addDocumentSellerTaxRegistration("VA", $numTVA)
//$globalIDType = "0088"; // Type d'identifiant global, par exemple, "0088" pour un identifiant DUNS
->addDocumentSellerGlobalId($identifiantVendeur, '0088')
//FC = Tax number, VA = Sales tax number
->addDocumentBuyerTaxRegistration("VA", $identifiantTVAAcheteur)
->addDocumentPaymentMean($codeTypeMoyenPaiement, null, null, $identifiantCompteBancaire, null,
$identifiantCompteDebite)
->addDocumentNote($noteFacture, null, $sujetNoteFactureCode)
->addDocumentTax($codeTypeTVA, 'VAT', $baseImpositionTVA, $montantTVA, $tauxTVA, $motifExonerationTVA,
$motifExonerationTVACode, null, null, null, $dateExigibiliteTVA)
->addDocumentAllowanceCharge($montantRemiseDocument, true, $codeTypeTVARemiseDocument, "VAT",
$tauxTVARemiseDocument, null, $pourcentageRemiseDocument, $assietteRemiseDocument, null, null,
$codeMotifRemiseDocument, $motifRemiseDocument)
->addDocumentAllowanceCharge($montantChargesFraisDocument, true, $codeTypeTVAChargesFraisDocument,
'VAT', $tauxTVAChargesFraisDocument, null, $pourcentageChargesFraisDocument,
$assietteChargesFraisDocument, null, null, $codeMotifChargesFraisDocument, $motifChargesFraisDocument)
->addDocumentPaymentTerm($conditionsPaiement, $dateEcheance, $idReferenceMandat)
->addDocumentReceivableSpecifiedTradeAccountingAccount($referenceComptableAcheteur, null)
->addNewPosition($identifiantLigneFacture)
->addDocumentPositionGrossPriceAllowanceCharge($rabaisPrixArticle, true)
->addDocumentPositionTax($codeTypeTVAArticleFacture, 'VAT', $tauxTVAArticleFacture)
->addDocumentPositionAllowanceCharge($montantRemiseLigneFacture, true, null, null,
$codeMotifRemiseLigneFacture, $motifRemiseLigneFacture)
->addDocumentPositionAllowanceCharge($montantChargesFraisLigneFacture, true, null, null,
$codeMotifChargesFraisLigneFacture, $motifChargesFraisLigneFacture)
->writeFile(__DIR__ . "/factur-x-basic.xml");
Cannot access private property horstoeko\zugferd\entities\basic\udt\TextType::$value ->writeFile(DIR__ . "/factur-x-basic.xml");
Error: Cannot access private property horstoeko\zugferd\entities\basic\udt\TextType::$__value
at vendor/jms/serializer/src/Accessor/DefaultAccessorStrategy.php:90 at horstoeko\zugferd\entities\en16931\udt\TextType::JMS\Serializer\Accessor{closure}(object(TextType), '__value') (vendor/jms/serializer/src/Accessor/DefaultAccessorStrategy.php:96) at JMS\Serializer\Accessor\DefaultAccessorStrategy->getValue(object(TextType), object(PropertyMetadata), object(SerializationContext)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:262) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(TextType), array('name' => 'horstoeko\zugferd\entities\en16931\udt\TextType', 'params' => array())) (vendor/jms/serializer/src/XmlSerializationVisitor.php:333) at JMS\Serializer\XmlSerializationVisitor->visitProperty(object(PropertyMetadata), object(TextType)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:272) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(TradeAddressType), array('name' => 'horstoeko\zugferd\entities\basic\ram\TradeAddressType', 'params' => array())) (vendor/jms/serializer/src/XmlSerializationVisitor.php:333) at JMS\Serializer\XmlSerializationVisitor->visitProperty(object(PropertyMetadata), object(TradeAddressType)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:272) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(TradePartyType), array('name' => 'horstoeko\zugferd\entities\basic\ram\TradePartyType', 'params' => array())) (vendor/jms/serializer/src/XmlSerializationVisitor.php:333) at JMS\Serializer\XmlSerializationVisitor->visitProperty(object(PropertyMetadata), object(TradePartyType)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:272) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(HeaderTradeAgreementType), array('name' => 'horstoeko\zugferd\entities\basic\ram\HeaderTradeAgreementType', 'params' => array())) (vendor/jms/serializer/src/XmlSerializationVisitor.php:333) at JMS\Serializer\XmlSerializationVisitor->visitProperty(object(PropertyMetadata), object(HeaderTradeAgreementType)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:272) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(SupplyChainTradeTransactionType), array('name' => 'horstoeko\zugferd\entities\basic\ram\SupplyChainTradeTransactionType', 'params' => array())) (vendor/jms/serializer/src/XmlSerializationVisitor.php:333) at JMS\Serializer\XmlSerializationVisitor->visitProperty(object(PropertyMetadata), object(SupplyChainTradeTransactionType)) (vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:272) at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(CrossIndustryInvoice), array('name' => 'horstoeko\zugferd\entities\basic\rsm\CrossIndustryInvoice', 'params' => array())) (vendor/jms/serializer/src/Serializer.php:256) at JMS\Serializer\Serializer->visit(object(SerializationGraphNavigator), object(XmlSerializationVisitor), object(SerializationContext), object(CrossIndustryInvoice), 'xml', null) (vendor/jms/serializer/src/Serializer.php:163) at JMS\Serializer\Serializer->serialize(object(CrossIndustryInvoice), 'xml') (vendor/horstoeko/zugferd/src/ZugferdDocument.php:293) at horstoeko\zugferd\ZugferdDocument->serializeAsXml() (vendor/horstoeko/zugferd/src/ZugferdDocumentBuilder.php:132) at horstoeko\zugferd\ZugferdDocumentBuilder->getContent() (vendor/horstoeko/zugferd/src/ZugferdDocumentBuilder.php:168) at horstoeko\zugferd\ZugferdDocumentBuilder->writeFile('/Users/name/Documents/Factur-X/VLO/FacturX/src/Controller/factur-x-basic.xml') (src/Controller/BasicFacturXController.php:257) at App\Controller\BasicFacturXController->newForm(object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:35) at require_once('/Users/name/Documents/Factur-X/VLO/FacturX/vendor/autoload_runtime.php') (public/index.php:5)
I don't get this error when I run it in profile_EN16931.
@OLLIVAULT , it is very hard to reproduce it, because there are so many variables which we don't have, so we cannot run the script. You can please try to delete lines one by one, until the error does not happen anymore, and then tell us which line causes the problem?
Also, there is something which I don't understand.
In your CODE, you write: :PROFILE_BASIC);
,
but in the STACKTRACE there is : at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(TextType), array('name' => 'horstoeko\zugferd\entities**en16931**\udt\TextType', 'params' => array()))
How is it possible that the stacktrace shows "en16931"? Are you sure that the stacktrace comes from the code with the basic profile?
If I put PROFILE_BASICWL instead of PROFILE_BASIC, it works for the methods to call from PROFILE_BASIC. However, if I put PROFILE_BASIC instead of PROFILE_BASICWL, it doesn't work and causes this error. I've checked every line and it doesn't come from any.
What it the minimum amount of lines to cause this error?
If you say no line is causing it, then the following code would fail?
$document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_BASIC);
$document
->writeFile(__DIR__ . "/factur-x-basic.xml");
Here are the lines that are causing the problem. (-=
->setDocumentSellerAddress($adresseVendeurLigne1, $adresseVendeurLigne2, $adresseVendeurLigne3,$codePostalVendeur, $localiteVendeur, $codePaysVendeur, $subdivisionPaysVendeur)
->setDocumentSellerTaxRepresentativeTradeParty($nomRepresentantFiscalVendeur)
->setDocumentBuyer($nomClient, $numSIRENSIRETAcheteur)
->setDocumentShipTo($nomIntervenantLivrer, $identifiantEtablissementLivraison)
->setForeignCurrency($deviseComptabilisationTVA, $montantTVA)
I took your 5 lines of code and filled it with some stuff, but I do not get any error.
My code:
<?php
use horstoeko\zugferd\codelists\ZugferdDutyTaxFeeCategories;
use horstoeko\zugferd\codelists\ZugferdInvoiceType;
use horstoeko\zugferd\codelists\ZugferdSchemeIdentifiers;
use horstoeko\zugferd\codelists\ZugferdTextSubjectCodeQualifiers;
use horstoeko\zugferd\codelists\ZugferdUnitCodes;
use horstoeko\zugferd\ZugferdDocumentBuilder;
use horstoeko\zugferd\ZugferdDocumentPdfMerger;
use horstoeko\zugferd\ZugferdDocumentReader;
use horstoeko\zugferd\ZugferdProfiles;
use horstoeko\zugferd\ZugferdSettings;
require dirname(__FILE__) . '/vendor/autoload.php';
$document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_BASIC);
$document
->setDocumentSellerAddress("foo", "bar", "foo", "11111", "town", "DE", "BW")
->setDocumentSellerTaxRepresentativeTradeParty("Test123")
->setDocumentBuyer("AAA", "BBB")
->setDocumentShipTo("CCC", "DDD")
->setForeignCurrency("USD", 555.00)
->writeFile(__DIR__ . "/factur-x-basic.xml");
Can you please verify that this exact code causes problems at your side?
If yes => then maybe you should do "composer update" again. Maybe there is a problem with old dependencies?
If no => Then please send me the exact values for $adresseVendeurLigne1, $adresseVendeurLigne2, etc.
Thank you!
These two lines are still causing me trouble.
->setForeignCurrency("USD", 555.00)
->setDocumentSellerAddress("foo", "bar", "foo", "11111", "town", "DE", "BW")
$document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_BASIC);
$document
->setForeignCurrency("USD", 555.00)
->setDocumentSellerAddress("foo", "bar", "foo", "11111", "town", "DE", "BW")
->writeFile(__DIR__ . "/factur-x-basic.xml");
runs flawlessly on my side. (Setup: Windows and PHP 8.3)
PHP 7.3.29
I found out it's a matter of order of execution !
What order do you mean?
If I put this above the other sets, it causes an error, but if I put them below, it works.
->setDocumentPositionNetPrice($prixNetArticle, $quantiteBasePrixArticle, $uniteMesureQuantiteBasePrixArticle)
->setDocumentPositionQuantity($quantiteFacturee, $uniteMesureQuantiteFacturee)
I have to put those above.
->setForeignCurrency($deviseComptabilisationTVA, $montantTVA)
->setDocumentSellerAddress($adresseVendeurLigne1, $adresseVendeurLigne2, $adresseVendeurLigne3, $codePostalVendeur, $localiteVendeur, $codePaysVendeur, $subdivisionPaysVendeur)
The following code does work on my side. "NetPrice" and "Quanitty" are at the top.
Can you please submit a code which fails on your side? The complete file without any variables?
<?php
use horstoeko\zugferd\codelists\ZugferdDutyTaxFeeCategories;
use horstoeko\zugferd\codelists\ZugferdInvoiceType;
use horstoeko\zugferd\codelists\ZugferdSchemeIdentifiers;
use horstoeko\zugferd\codelists\ZugferdTextSubjectCodeQualifiers;
use horstoeko\zugferd\codelists\ZugferdUnitCodes;
use horstoeko\zugferd\ZugferdDocumentBuilder;
use horstoeko\zugferd\ZugferdDocumentPdfMerger;
use horstoeko\zugferd\ZugferdDocumentReader;
use horstoeko\zugferd\ZugferdProfiles;
use horstoeko\zugferd\ZugferdSettings;
require dirname(__FILE__) . '/phplib_zugferd/vendor/autoload.php';
$document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_BASIC);
$document
->setDocumentPositionNetPrice(2, 3, 4)
->setDocumentPositionQuantity(24, "H87")
->setForeignCurrency("USD", 555.00)
->setDocumentSellerAddress("foo", "bar", "foo", "11111", "town", "DE", "BW")
->setDocumentSellerTaxRepresentativeTradeParty("Test123")
->setDocumentBuyer("AAA", "BBB")
->setDocumentShipTo("CCC", "DDD")
->writeFile(__DIR__ . "/factur-x-basic.xml");
I don't know which set to put in front of or behind which set exactly, but it works now.
Thank you very much for helping me, @danielmarschall.
Hi @danielmarschall and @OLLIVAULT,
i think I have found the solution: There was a typo in the schema-definitions (YML). In two definition files there was wrongly en16931 referenced....
I will make a PR and a new release. @OLLIVAULT: You can check this again when the release is pushed to composer.org (this may take some time)
Best regards...
Hi @OLLIVAULT
have you tested the latest release?
Best regards
Salut@OLLIVAULT
as-tu testé la dernière version ?
Cordialement
Hallo @horstoeko
Ja, aber während der Validierung habe ich viele Fehler.
36 errors Valid XMP XML invalid against XSD XML invalid against Schematron Valid PDF/A-3 Profile Basic
XML file invalid against XSD error_3_xml The Factur-x XML file is not valid against the official XML Schema Definition. Here is the error, which may give you an idea on the cause of the problem: Element '{urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}SpecifiedLineTradeAgreement': This element is not expected. Expected is ( {urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100}SpecifiedTradeProduct )., line 27. BR-08 XML Schematron error [BR-08]-An Invoice shall contain the Seller postal address (BG-5). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-09 XML Schematron error [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-10 XML Schematron error [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-11 XML Schematron error [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-CO-15 XML Schematron error [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-E-01 XML Schematron error [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Exempt from VAT" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-AE-01 XML Schematron error [BR-AE-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Reverse charge" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge". Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-G-01 XML Schematron error [BR-G-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU". Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1] BR-22 XML Schematron error [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-23 XML Schematron error [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-24 XML Schematron error [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-25 XML Schematron error [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-26 XML Schematron error [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-27 XML Schematron error [BR-27]-The Item net price (BT-146) shall NOT be negative. Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-G-05 XML Schematron error [BR-G-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedLineTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-09 XML Schematron error [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SellerTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTaxRegistration[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ID[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-09 XML Schematron error [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:BuyerTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTaxRegistration[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ID[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-19 XML Schematron error [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SellerTaxRepresentativeTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-20 XML Schematron error [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SellerTaxRepresentativeTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-09 XML Schematron error [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SellerTaxRepresentativeTradeParty[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTaxRegistration[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ID[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-17 XML Schematron error [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-S-08 XML Schematron error [BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:CategoryCode[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-S-09 XML Schematron error [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:CategoryCode[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-S-10 XML Schematron error [BR-S-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:CategoryCode[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-E-07 XML Schematron error [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeAllowanceCharge[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:CategoryTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-AE-07 XML Schematron error [BR-AE-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" the Document level charge VAT rate (BT-103) shall be 0 (zero). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeAllowanceCharge[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][2]/:CategoryTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-10 XML Schematron error [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-11 XML Schematron error [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-12 XML Schematron error [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-13 XML Schematron error [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-16 XML Schematron error [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CO-14 XML Schematron error [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:TaxTotalAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] CII-SR-439 XML Schematron error [CII-SR-439] - ChargeAmount should exist maximum once Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedLineTradeAgreement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CL-20 XML Schematron error [BR-CL-20]-Coded charge reasons MUST belong to the UNCL 7161 code list Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:IncludedSupplyChainTradeLineItem[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedLineTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:SpecifiedTradeAllowanceCharge[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][2]/:ReasonCode[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1] BR-CL-22 XML Schematron error [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list Location of the error: /:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ApplicableTradeTax[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/:ExemptionReasonCode[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]
Hi @OLLIVAULT,
Please use a profile that officially represents an invoice, e.g. EN16931 and enter all the required information. The validation errors have nothing, absolutely nothing to do with the library. You must provide the necessary information.
I am closing the issue as I assume that the actual bug has been fixed.
Describe the bug PROFILE_BASIC is causing an error "Cannot access private property horstoeko\zugferd\entities\basic\udt\TextType::$__value". I don't understand why I'm getting this message. I created a document with PROFILE_BASICWL, validated it with the same values, same set and add methods, but when I built it with PROFILE_BASIC, it gave me this message and I can't seem to find the source.