From 0d255f15a17d7521b067b6b0308815b635369f31 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Mon, 27 Oct 2025 10:49:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Orders.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Models/Orders.php b/app/Models/Orders.php index eec5846..ee54745 100755 --- a/app/Models/Orders.php +++ b/app/Models/Orders.php @@ -31,10 +31,13 @@ class Orders extends SoftDeletesModel */ public function needAgreements() { + dd($this->paramedic_id + && $this->project->agreement == 1 + && strtotime($this->created_at) >= strtotime(Orders::AGREEMENT_START_DATE)); if ($this->paramedic_id && $this->project->agreement == 1 && strtotime($this->created_at) >= strtotime(Orders::AGREEMENT_START_DATE) - && ($this->orderAgreements->isEmpty() || ($this->orderAgreements->isNotEmpty() && $this->orderAgreements[0]->paramedic_id != $this->paramedic_id))) { + && ($this->orderAgreementByLast->isEmpty() || ($this->orderAgreementByLast->isNotEmpty() && $this->orderAgreementByLast->paramedic_id != $this->paramedic_id))) { return 1; } return 0;