Skip to content

Commit

Permalink
Adding a function to set a discount to an item , will need to incorpo…
Browse files Browse the repository at this point in the history
…rate this into the total
  • Loading branch information
lukepolo committed Nov 6, 2015
1 parent 0c017d3 commit 8ff43c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Traits/CouponTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,17 @@ public function checkValidTimes(Carbon $startDate, Carbon $endDate, $throwErrors
}
}
}

/**
* Sets a discount to an item with what code was used and the discount amount
*
* @param $item
* @param $code
* @param $discount
*/
public function setDiscountToItem($item, $code, $discount)
{
$item->code = $code;
$item->discount = $discount;
}
}

0 comments on commit 8ff43c2

Please sign in to comment.