From a90730d616646816ee1978f64a62004daec94645 Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Sun, 30 Oct 2022 20:35:01 +0800 Subject: [PATCH] fix payment due date days filter --- .../Eloquent/Filters/PackingListOrderedByInvoiceDate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php b/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php index 5ebdb040..f7cd8b5b 100644 --- a/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php +++ b/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php @@ -21,8 +21,8 @@ class PackingListOrderedByInvoiceDate implements Filter { return $builder->join('transactions', function($join){ $join->on('transactions.owner_id', '=', 'packing_lists.id'); - $join->on('transactions.owner_type', '=', 'App\\Models\\PackingList'); - $join->on('transactions.status', '=', ApprovalStatus::APPROVED); + $join->where('transactions.owner_type', '=', PackingList::class); + $join->where('transactions.status', '=', ApprovalStatus::APPROVED); })->orderBy('transactions.updated_at')->get(); }