fix order status count

This commit is contained in:
omair saleh
2022-01-03 15:40:38 +08:00
parent 18554e9924
commit 40c5692276
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -107,7 +107,7 @@ class Order extends AbstractModel implements Addressable, Packable, Remarkable
return $schedule->dispatched()
->whereIn('schedules.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
}
);
)->whereHas('packages');
}
public function inTransitPackages()
@@ -122,7 +122,7 @@ class Order extends AbstractModel implements Addressable, Packable, Remarkable
->whereDoesntHave('containers', function($container) {
return $container->where('containers.status', ApprovalStatus::COMPLETED);
}
);
)->whereHas('packages');
}
public function destinationWarehousePackages()
@@ -137,7 +137,7 @@ class Order extends AbstractModel implements Addressable, Packable, Remarkable
function($schedule) {
return $schedule->dispatched()->whereIn('schedules.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
}
);
)->whereHas('packages');
}
public function deliveredPackages()