NASER close orders when price method is gold.ir

This commit is contained in:
gholak tala
2026-04-28 20:15:23 +00:00
parent c68f8ec53d
commit 56140dd29e
@@ -31,12 +31,14 @@ class SingleOrderController extends Controller
{ {
$data = $request->all(); $data = $request->all();
if($this->Config('goldir_price') == 'true'){
$goldir_closed = Cnt::where('key', 'goldir_closed')->first()['value'] == "true"; $goldir_closed = Cnt::where('key', 'goldir_closed')->first()['value'] == "true";
$goldir_buy = Cnt::where('key', 'goldir_open_buy')->first()['value'] == "false" && $data['direction'] == 1; $goldir_buy = Cnt::where('key', 'goldir_open_buy')->first()['value'] == "false" && $data['direction'] == 1;
$goldir_sell = Cnt::where('key', 'goldir_open_sell')->first()['value'] == "false" && $data['direction'] == 2; $goldir_sell = Cnt::where('key', 'goldir_open_sell')->first()['value'] == "false" && $data['direction'] == 2;
if($goldir_closed || $goldir_buy || $goldir_sell){ if($goldir_closed || $goldir_buy || $goldir_sell){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.'); throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
} }
}
// throw new UnprocessableEntityHttpException('به دلیل نوسانات سفارشات بسته میباشد.'); // throw new UnprocessableEntityHttpException('به دلیل نوسانات سفارشات بسته میباشد.');
$transactionType = $data['direction'] == 1 ? "خرید" : "فروش"; $transactionType = $data['direction'] == 1 ? "خرید" : "فروش";