Skip to content

Commit

Permalink
#159 Pre-assignment of 'BusinessProcessSpecifiedDocumentContextParame…
Browse files Browse the repository at this point in the history
…ter' with 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0' in extended profile
  • Loading branch information
HorstOeko committed Nov 4, 2024
1 parent 1646873 commit d209690
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/ZugferdProfiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions tests/testcases/BuilderEn16931Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions tests/testcases/BuilderMinimumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d209690

Please sign in to comment.