mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update: surplus by onetime
This commit is contained in:
		| @@ -171,7 +171,10 @@ class OrderService | |||||||
|             ->first(); |             ->first(); | ||||||
|         if (!$lastOneTimeOrder) return; |         if (!$lastOneTimeOrder) return; | ||||||
|         $nowUserTraffic = $user->transfer_enable / 1073741824; |         $nowUserTraffic = $user->transfer_enable / 1073741824; | ||||||
|         $trafficUnitPrice = ($lastOneTimeOrder->total_amount + $lastOneTimeOrder->balance_amount) / $nowUserTraffic; |         if (!$nowUserTraffic) return; | ||||||
|  |         $paidTotalAmount = ($lastOneTimeOrder->total_amount + $lastOneTimeOrder->balance_amount); | ||||||
|  |         if (!$paidTotalAmount) return; | ||||||
|  |         $trafficUnitPrice = $paidTotalAmount / $nowUserTraffic; | ||||||
|         $notUsedTraffic = $nowUserTraffic - (($user->u + $user->d) / 1073741824); |         $notUsedTraffic = $nowUserTraffic - (($user->u + $user->d) / 1073741824); | ||||||
|         $result = $trafficUnitPrice * $notUsedTraffic; |         $result = $trafficUnitPrice * $notUsedTraffic; | ||||||
|         $orderModel = Order::where('user_id', $user->id)->where('period', '!=', 'reset_price')->where('status', 3); |         $orderModel = Order::where('user_id', $user->id)->where('period', '!=', 'reset_price')->where('status', 3); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user