Skip to content

Commit

Permalink
[Billing] Make vat percentage nullable in Receipt
Browse files Browse the repository at this point in the history
Automatic commit for getparthenon/monorepo@a77bc30
  • Loading branch information
that-guy-iain committed May 1, 2024
1 parent 37ccc41 commit b3247a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Billing/Entity/Receipt.php
Expand Up @@ -56,7 +56,7 @@ class Receipt implements ReceiptInterface

private int $vatTotal;

private float $vatPercentage;
private ?float $vatPercentage = null;

private \DateTimeInterface $createdAt;

Expand Down Expand Up @@ -246,12 +246,12 @@ public function getSubTotalMoney(): Money
return Money::ofMinor($this->subTotal, strtoupper($this->currency));
}

public function getVatPercentage(): float
public function getVatPercentage(): ?float
{
return $this->vatPercentage;
}

public function setVatPercentage(float $vatPercentage): void
public function setVatPercentage(?float $vatPercentage): void
{
$this->vatPercentage = $vatPercentage;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Billing/Entity/ReceiptInterface.php
Expand Up @@ -104,7 +104,7 @@ public function getVatTotalMoney(): Money;

public function getSubTotalMoney(): Money;

public function getVatPercentage(): float;
public function getVatPercentage(): ?float;

public function setVatPercentage(float $vatPercentage): void;
public function setVatPercentage(?float $vatPercentage): void;
}
Expand Up @@ -16,7 +16,7 @@
<field name="subTotal" column="sub_total" type="integer" nullable="false" />
<field name="vatTotal" column="vat_total" type="integer" nullable="false" />
<field name="comment" column="comment" type="string" nullable="true" />
<field name="vatPercentage" column="vat_percentage" type="float" nullable="false" />
<field name="vatPercentage" column="vat_percentage" type="float" nullable="true" />
<embedded name="billerAddress" class="Parthenon\Common\Address" />
<embedded name="payeeAddress" class="Parthenon\Common\Address" />
<many-to-many field="payments" target-entity="Parthenon\Billing\Entity\PaymentInterface">
Expand Down

0 comments on commit b3247a9

Please sign in to comment.