NASER close orders when price method is gold.ir
This commit is contained in:
@@ -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('به دلیل نوسانات سفارشات بسته میباشد.');
|
||||
|
||||
Reference in New Issue
Block a user