NASER fix issues in getting price and close orders

This commit is contained in:
gholak tala
2026-05-11 17:21:56 +00:00
parent ad4fa1bcba
commit 40a2f047c7
3 changed files with 34 additions and 31 deletions
@@ -39,6 +39,11 @@ class SingleOrderController extends Controller
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
}
}
if($this->Config('close_price') == 'true'){
if(Cnt::where('key', 'app_closed')->first()['value'] == "true"){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
}
}
// throw new UnprocessableEntityHttpException('به دلیل نوسانات سفارشات بسته میباشد.');
$transactionType = $data['direction'] == 1 ? "خرید" : "فروش";
@@ -49,12 +54,6 @@ class SingleOrderController extends Controller
if($latestPrice->price == 0){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
}
if($this->Config('close_price') == 'true'){
if(Cnt::where('key', 'app_closed')->first()['value'] == "true"){
throw new UnprocessableEntityHttpException('عدم ارائه سرویس.');
}
}
$data['all_price'] = $latestPrice;
$data['price'] = $latestPrice->price;
$data['price_id'] = $latestPrice->id;