diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb5cad..ee01a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.7.3] - 2024-07-29 +### Added +- Support the new VAT in Finland + ## [2.7.2] - 2024-06-06 ### Changed - Updated validation to support negative item rows diff --git a/src/Interfaces/ItemInterface.php b/src/Interfaces/ItemInterface.php index 25b3a61..1f00fa2 100644 --- a/src/Interfaces/ItemInterface.php +++ b/src/Interfaces/ItemInterface.php @@ -59,17 +59,17 @@ public function setUnits(?int $units): ItemInterface; /** * Get the VAT percentage. * - * @return int + * @return float */ - public function getVatPercentage(): ?int; + public function getVatPercentage(): ?float; /** * Set the VAT percentage. * - * @param int|null $vatPercentage + * @param float|null $vatPercentage * @return ItemInterface Return self to enable chaining. */ - public function setVatPercentage(?int $vatPercentage): ItemInterface; + public function setVatPercentage(?float $vatPercentage): ItemInterface; /** * Get the product code. diff --git a/src/Model/Item.php b/src/Model/Item.php index 4fa32a5..a221f9e 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -43,7 +43,7 @@ class Item implements \JsonSerializable, ItemInterface /** * The VAT percentage. * - * @var integer + * @var float */ protected $vatPercentage; @@ -159,9 +159,9 @@ public function setUnits(?int $units): ItemInterface /** * Get the VAT percentage. * - * @return int + * @return float */ - public function getVatPercentage(): ?int + public function getVatPercentage(): ?float { return $this->vatPercentage; } @@ -169,10 +169,10 @@ public function getVatPercentage(): ?int /** * Set the VAT percentage. * - * @param int $vatPercentage + * @param float $vatPercentage * @return ItemInterface Return self to enable chaining. */ - public function setVatPercentage(?int $vatPercentage): ItemInterface + public function setVatPercentage(?float $vatPercentage): ItemInterface { $this->vatPercentage = $vatPercentage; diff --git a/tests/ClientTest.php b/tests/ClientTest.php index 5a96bd3..e0374cc 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -47,7 +47,7 @@ protected function setUp(): void $this->item = (new Item()) ->setProductCode('pr1') - ->setVatPercentage(24) + ->setVatPercentage(25.5) ->setReference('itemReference123') ->setStamp('itemStamp-1' . rand(1, 999999)) ->setUnits(1) @@ -57,7 +57,7 @@ protected function setUp(): void $this->item2 = (new Item()) ->setDeliveryDate('2020-12-12') ->setProductCode('pr2') - ->setVatPercentage(24) + ->setVatPercentage(25.5) ->setReference('itemReference123') ->setStamp('itemStamp-2' . rand(1, 999999)) ->setUnits(2)