Skip to content

Commit

Permalink
Merge pull request #229 from Wimmie/master
Browse files Browse the repository at this point in the history
Map vat code and allow remove invoice line
  • Loading branch information
rojtjo authored Mar 25, 2024
2 parents a8201ee + 2e93b24 commit 86a4217
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
*/
Expand Down
1 change: 1 addition & 0 deletions src/Mappers/InvoiceMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public static function map(Response $response)
'performancedate' => 'setPerformanceDate',
'performancetype' => 'setPerformanceType',
'dim1' => 'setDim1',
'vatcode' => 'setVatCode',
);

/** @var \DOMElement $lineDOM */
Expand Down
1 change: 1 addition & 0 deletions tests/IntegrationTests/InvoiceIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 86a4217

Please sign in to comment.