Skip to content

Commit

Permalink
fix discount bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tomirons authored Jan 29, 2018
1 parent 25491bb commit 4ea5160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Front/ShopController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getMask( $mask )
public function postPurchase( ShopItem $item )
{
$user = Auth::user();
$item_price = ( $item->discout > 0 ) ? $item->price - ( $item->price / 100 * $item->discount ) : $item->price;
$item_price = ( $item->discount > 0 ) ? $item->price - ( $item->price / 100 * $item->discount ) : $item->price;

if ( $user->money >= $item_price )
{
Expand Down

0 comments on commit 4ea5160

Please sign in to comment.