This commit is contained in:
baodev0
2026-07-01 10:51:05 +07:00
parent 914e96138a
commit 3bb59feba3
43 changed files with 1680 additions and 28 deletions
@@ -19,6 +19,7 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
{
$query = $this->model
->with([
'product',
'invoice.order',
'orderItem' => fn($q) => $q->with(['product', 'os.osGroup', 'order']),
])
@@ -27,7 +28,7 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
->orderBy('started_at', 'desc');
if ($productType) {
$query->whereHas('orderItem.product', function ($builder) use ($productType) {
$query->whereHas('product', function ($builder) use ($productType) {
$builder->where('product_type', $productType);
});
}