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,11 +31,13 @@ class SingleOrderController extends Controller
{
$data = $request->all();
$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_sell = Cnt::where('key', 'goldir_open_sell')->first()['value'] == "false" && $data['direction'] == 2;
if($goldir_closed || $goldir_buy || $goldir_sell){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
if($this->Config('goldir_price') == '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_sell = Cnt::where('key', 'goldir_open_sell')->first()['value'] == "false" && $data['direction'] == 2;
if($goldir_closed || $goldir_buy || $goldir_sell){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
}
}
// throw new UnprocessableEntityHttpException('به دلیل نوسانات سفارشات بسته میباشد.');