mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 11:09:11 +08:00
add user discount
This commit is contained in:
parent
d356722482
commit
d845439f14
@ -148,6 +148,10 @@ class OrderController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// user only discount
|
||||||
|
if ($user->discount) {
|
||||||
|
$order->total_amount = $order->total_amount * ($user->discount / 100);
|
||||||
|
}
|
||||||
// free process
|
// free process
|
||||||
if ($order->total_amount <= 0) {
|
if ($order->total_amount <= 0) {
|
||||||
$order->total_amount = 0;
|
$order->total_amount = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user