From fdce49ea8277e9180629870d07795add1e8f7e23 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 11 Oct 2021 14:56:40 +0800 Subject: [PATCH] temp show specific report period --- app/Models/Package.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Package.php b/app/Models/Package.php index 40cf09a7..df21a0b6 100644 --- a/app/Models/Package.php +++ b/app/Models/Package.php @@ -33,7 +33,7 @@ class Package extends AbstractModel */ public function order(): hasOneDeep { - return $this->hasOneDeep(Order::class, [PackingList::class], ['id', ['owner_type', 'owner_id']], ['packing_list_id', null]); + return $this->hasOneDeep(Order::class, [PackingList::class], ['id', 'id'], ['packing_list_id', 'owner_id']); } /** @@ -52,6 +52,7 @@ class Package extends AbstractModel return $this->hasManyDeep(Schedule::class, [PackingList::class, ContainerPackingList::class, Container::class, Transport::class], ['id', 'packing_list_id', 'id', ['owner_type', 'owner_id'], ['owner_type', 'owner_id']], ['packing_list_id', 'id', 'container_id', null, null]); } + /** * @return HasManyThrough */