Skip to content

Commit

Permalink
fix toArray
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed May 17, 2023
1 parent 7839850 commit bebabbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/InvoiceDiscount.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function computeDiscountAmountOn(Money $amout): Money
return $this->amount_off;
}

if (! is_null($this->percent_off)) {
if (!is_null($this->percent_off)) {
return $amout->multipliedBy($this->percent_off / 100, RoundingMode::HALF_CEILING);
}

Expand Down Expand Up @@ -54,7 +54,7 @@ public function toArray()
'code' => $this->code,
'amount_off' => $this->amount_off?->getMinorAmount()->toInt(),
'currency' => $this->amount_off?->getCurrency()->getCurrencyCode(),
'currpercent_offency' => $this->percent_off,
'percent_off' => $this->percent_off,
];
}

Expand Down

0 comments on commit bebabbe

Please sign in to comment.