diff --git a/app/Classes/General/Eloquent/AbstractListRecord.php b/app/Classes/General/Eloquent/AbstractListRecord.php index 4742ffa1..0d110942 100644 --- a/app/Classes/General/Eloquent/AbstractListRecord.php +++ b/app/Classes/General/Eloquent/AbstractListRecord.php @@ -23,7 +23,6 @@ abstract class AbstractListRecord extends AbstractGetRecord return $this->handler($filters); } catch (QueryException $exception){ - dd($exception); throw new MalformedRequestException('Unable to fetch the list of records due to unexpected error'); } diff --git a/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php b/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php index e1b1ac58..af050644 100644 --- a/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php +++ b/app/Classes/General/Eloquent/Filters/PackingListOrderedByInvoiceDate.php @@ -19,7 +19,7 @@ class PackingListOrderedByInvoiceDate implements Filter */ public static function apply(Builder $builder, $value) { - return $builder->join('transactions', function($join){ + return $builder->select('packing_lists.*')->join('transactions', function($join){ $join->on('transactions.owner_id', '=', 'packing_lists.id'); $join->where('transactions.owner_type', '=', PackingList::class); $join->where('transactions.status', '=', ApprovalStatus::APPROVED);