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[] */ 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 */ 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