Skip to content

Commit

Permalink
discount as item
Browse files Browse the repository at this point in the history
  • Loading branch information
Sofiosko committed Jun 4, 2019
1 parent b849cf9 commit 0caadcc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Taxes/PriceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ public function setDiscount($amount, $isOnVat = true)
return $this;
}

public function addDiscountItem($amount, $vatPercent, $discountId, $isWithVat = true){
if($isWithVat)
$this->addWithVat(-$amount, 1, $vatPercent, $discountId);
else
$this->addWithoutVat(-$amount, 1, $vatPercent, $discountId);
return $this;
}

/**
* @return Discount|null
*/
Expand Down

0 comments on commit 0caadcc

Please sign in to comment.