fix some bugs from fee
This commit is contained in:
@@ -8,7 +8,6 @@ use App\Http\Controllers\Single\SingleOrderController;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Order;
|
||||
use App\Models\Price;
|
||||
use App\Models\Setting;
|
||||
use App\Services\WalletBalanceService;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
|
||||
@@ -55,8 +54,8 @@ class OrderController extends Controller
|
||||
return (int) $order->direction === 1 ? $profitPerMoment : -$profitPerMoment;
|
||||
});
|
||||
|
||||
$feeSingle = (float) (Setting::where('key', 'fee_single')->value('value') ?? config('fee.single', 0));
|
||||
$currentPriceWithFee = $lastPrice + $feeSingle;
|
||||
$buyFee = app(\App\Services\ConfigService::class)->displayBuyPriceDiffRial();
|
||||
$currentPriceWithFee = $lastPrice + $buyFee;
|
||||
$averagePriceWithFee = $averagePrice + $averageFee;
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user