NASER optimize last api & dynamic price & fix orders with 0 price & test all changes

This commit is contained in:
2026-03-31 18:28:27 +03:30
parent 3b8b4d3004
commit 30f1658074
4 changed files with 115 additions and 85 deletions
@@ -60,6 +60,9 @@ class SingleOrderController extends Controller
} else if (auth('user')->id()) {//admin
$data['service_charge_percentage'] = 0;
}
if($data['price'] === 0){
throw new UnprocessableEntityHttpException(' سفارشات بسته میباشد.');
}
$data['sts'] = 2;
$data['type'] = 2;
$data['payment_sts'] = 4;