Skip to content
This repository was archived by the owner on Aug 13, 2020. It is now read-only.

Commit

Permalink
Fix add on quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Mar 21, 2019
1 parent 597f1c3 commit ff1963a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function hasAddOn()
}

/**
* Get the discount amount.
* Get the add-on amount.
*
* @return string
*/
Expand All @@ -114,7 +114,7 @@ public function addOnAmount()
$totalAddOn = 0;

foreach ($this->transaction->addOns as $addOn) {
$totalAddOn += $addOn->amount;
$totalAddOn += $addOn->amount * $addOn->quantity;
}

return (float) $totalAddOn;
Expand Down

0 comments on commit ff1963a

Please sign in to comment.