From d2096900feb937e58a4fae1f77f83f8dce68b81b Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Mon, 4 Nov 2024 16:30:49 +0100 Subject: [PATCH] #159 Pre-assignment of 'BusinessProcessSpecifiedDocumentContextParameter' with 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0' in extended profile --- src/ZugferdProfiles.php | 18 +++++++++--------- tests/testcases/BuilderEn16931Test.php | 4 ++-- tests/testcases/BuilderMinimumTest.php | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ZugferdProfiles.php b/src/ZugferdProfiles.php index a8bd6871..a666a550 100644 --- a/src/ZugferdProfiles.php +++ b/src/ZugferdProfiles.php @@ -85,7 +85,7 @@ class ZugferdProfiles 'description' => 'The BASIC profile is a subset of EN 16931-1 and can be used for simple VAT-compliant invoices.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic', 'alternativecontextparameters' => ['urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic'], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'factur-x.xml', 'xmpname' => 'BASIC', 'xsdfilename' => 'FACTUR-X_BASIC.xsd', @@ -99,7 +99,7 @@ class ZugferdProfiles 'It is therefore a booking aid.', 'contextparameter' => 'urn:factur-x.eu:1p0:basicwl', 'alternativecontextparameters' => ['urn:zugferd.de:2p0:basicwl'], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'factur-x.xml', 'xmpname' => 'BASIC WL', 'xsdfilename' => 'FACTUR-X_BASIC-WL.xsd', @@ -112,7 +112,7 @@ class ZugferdProfiles 'of an electronic invoice.', 'contextparameter' => 'urn:cen.eu:en16931:2017', 'alternativecontextparameters' => ['urn:cen.eu:en16931:2017'], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'factur-x.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', @@ -140,7 +140,7 @@ class ZugferdProfiles 'specific than the EN 16931 (COMFORT) profile.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2', 'alternativecontextparameters' => [], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'xrechnung.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', @@ -154,7 +154,7 @@ class ZugferdProfiles 'specific than the EN 16931 (COMFORT) profile.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0', 'alternativecontextparameters' => [], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'xrechnung.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', @@ -168,7 +168,7 @@ class ZugferdProfiles 'specific than the EN 16931 (COMFORT) profile.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.1', 'alternativecontextparameters' => [], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'xrechnung.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', @@ -182,7 +182,7 @@ class ZugferdProfiles 'specific than the EN 16931 (COMFORT) profile.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2', 'alternativecontextparameters' => [], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'xrechnung.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', @@ -195,7 +195,7 @@ class ZugferdProfiles 'Only the purchaser s reference can be given at item level. A breakdown of the sales tax (VAT) is not supported. It is therefore a booking aid.', 'contextparameter' => 'urn:factur-x.eu:1p0:minimum', 'alternativecontextparameters' => ['urn:zugferd.de:2p0:minimum'], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'factur-x.xml', 'xmpname' => 'MINIMUM', 'xsdfilename' => 'FACTUR-X_MINIMUM.xsd', @@ -209,7 +209,7 @@ class ZugferdProfiles 'specific than the EN 16931 (COMFORT) profile.', 'contextparameter' => 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3', 'alternativecontextparameters' => [], - 'businessprocess' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0', + 'businessprocess' => null, 'attachmentfilename' => 'xrechnung.xml', 'xmpname' => 'EN 16931', 'xsdfilename' => 'FACTUR-X_EN16931.xsd', diff --git a/tests/testcases/BuilderEn16931Test.php b/tests/testcases/BuilderEn16931Test.php index 3f8132ba..db44440b 100644 --- a/tests/testcases/BuilderEn16931Test.php +++ b/tests/testcases/BuilderEn16931Test.php @@ -70,11 +70,11 @@ public function testSetDocumentInformation(): void public function testSetDocumentBusinessProcess(): void { $this->disableRenderXmlContent(); - $this->assertXPathValueWithIndex('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID', 0, 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + $this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID'); (self::$document)->setDocumentBusinessProcess(""); $this->disableRenderXmlContent(); - $this->assertXPathValueWithIndex('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID', 0, 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + $this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID'); (self::$document)->setDocumentBusinessProcess("GENERAL INVOICE"); $this->disableRenderXmlContent(); diff --git a/tests/testcases/BuilderMinimumTest.php b/tests/testcases/BuilderMinimumTest.php index 48fe9d33..51696f72 100644 --- a/tests/testcases/BuilderMinimumTest.php +++ b/tests/testcases/BuilderMinimumTest.php @@ -72,11 +72,11 @@ public function testSetDocumentInformation(): void public function testSetDocumentBusinessProcess(): void { $this->disableRenderXmlContent(); - $this->assertXPathValueWithIndex('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID', 0, 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + $this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID'); (self::$document)->setDocumentBusinessProcess(""); $this->disableRenderXmlContent(); - $this->assertXPathValueWithIndex('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID', 0, 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); + $this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID'); (self::$document)->setDocumentBusinessProcess("GENERAL INVOICE"); $this->disableRenderXmlContent();