|
|
|
@ -449,7 +449,7 @@ class OrdersController extends CommonController
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$mobile = request()->mobile ?? request()->patient_mobile;
|
|
|
|
$mobile = request()->mobile ?? request()->patient_mobile;
|
|
|
|
$customer = (new Customer())->firstOrCreate([
|
|
|
|
$customer = (new Customer())->firstOrCreate([
|
|
|
|
"mobile" => trim(request()->mobile)
|
|
|
|
"mobile" => $mobile
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
$has_orders = Orders::where("customer_id", $customer->id)->whereIn("status", [Orders::STATUS_UNCONFIRMED, Orders::STATUS_UNASSIGNED, Orders::STATUS_ONGOING])->count();
|
|
|
|
$has_orders = Orders::where("customer_id", $customer->id)->whereIn("status", [Orders::STATUS_UNCONFIRMED, Orders::STATUS_UNASSIGNED, Orders::STATUS_ONGOING])->count();
|
|
|
|
|