From 61a5ff67d70ffdd6b83d27d5afe31ea1632f4bd4 Mon Sep 17 00:00:00 2001 From: Wimmie Date: Mon, 25 Mar 2024 17:40:13 +0100 Subject: [PATCH 1/3] Add vat code to invoice mapper --- src/Mappers/InvoiceMapper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mappers/InvoiceMapper.php b/src/Mappers/InvoiceMapper.php index 5fccf1f9..f37a0e62 100644 --- a/src/Mappers/InvoiceMapper.php +++ b/src/Mappers/InvoiceMapper.php @@ -91,6 +91,7 @@ public static function map(Response $response) 'performancedate' => 'setPerformanceDate', 'performancetype' => 'setPerformanceType', 'dim1' => 'setDim1', + 'vatcode' => 'setVatCode', ); /** @var \DOMElement $lineDOM */ From 6c4cf92585efad86b78889a2d51c489bb63738f1 Mon Sep 17 00:00:00 2001 From: Wimmie Date: Mon, 25 Mar 2024 17:42:09 +0100 Subject: [PATCH 2/3] Add remove line to invoice --- src/Invoice.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Invoice.php b/src/Invoice.php index 2ba76eb4..a36229c0 100644 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -63,6 +63,12 @@ public function addLine(InvoiceLine $line) return $this; } + public function removeLine(InvoiceLine $line) + { + unset($this->lines[$line->getID()]); + return $this; + } + /** * @return InvoiceLine[] */ From 2e93b2445cfce0ef8b11bde3e26fc1530b1fe501 Mon Sep 17 00:00:00 2001 From: Wimmie Date: Mon, 25 Mar 2024 17:43:41 +0100 Subject: [PATCH 3/3] Update test to also test get vat code for invoice mapper --- tests/IntegrationTests/InvoiceIntegrationTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/IntegrationTests/InvoiceIntegrationTest.php b/tests/IntegrationTests/InvoiceIntegrationTest.php index 0ee5f668..74bea283 100644 --- a/tests/IntegrationTests/InvoiceIntegrationTest.php +++ b/tests/IntegrationTests/InvoiceIntegrationTest.php @@ -79,6 +79,7 @@ public function testGetConceptInvoiceWorks() $this->assertSame('15.00', $invoiceLine->getValueInc()); $this->assertSame('15.00', $invoiceLine->getUnitsPriceExcl()); $this->assertSame('8020', $invoiceLine->getDim1()); + $this->assertSame('VN', $invoiceLine->getVatCode()); // TODO - Vat lines