master
cody 6 months ago
parent c0a8ba1c52
commit a2216d0410

@ -31,11 +31,10 @@ class Orders extends SoftDeletesModel
*/
public function needAgreements()
{
dd($this->orderAgreementByLast);
if ($this->paramedic_id
&& $this->project->agreement == 1
&& strtotime($this->created_at) >= strtotime(Orders::AGREEMENT_START_DATE)
&& ($this->orderAgreementByLast->isEmpty() || ($this->orderAgreementByLast->isNotEmpty() && $this->orderAgreementByLast->paramedic_id != $this->paramedic_id))) {
&& (empty($this->orderAgreementByLast) || (!empty($this->orderAgreementByLast) && $this->orderAgreementByLast->paramedic_id != $this->paramedic_id))) {
return 1;
}
return 0;

Loading…
Cancel
Save