fix some bugs from fee

This commit is contained in:
2026-07-28 10:33:11 +03:30
parent 7c68115b39
commit 745f7fcfd6
8 changed files with 51 additions and 80 deletions
@@ -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([