fix: [품질관리] 수주선택 모달 납품일 포맷 및 개소 수 수정
- delivery_date: ISO 타임스탬프 → Y-m-d 포맷으로 변환 - location_count: order_items 수 → order_nodes 루트 노드(개소) 수로 변경 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -347,8 +347,9 @@ public function availableOrders(array $params): array
|
||||
|
||||
$query = Order::where('tenant_id', $tenantId)
|
||||
->whereNotIn('id', $linkedOrderIds)
|
||||
->with(['items'])
|
||||
->withCount('items');
|
||||
->withCount(['nodes as location_count' => function ($q) {
|
||||
$q->whereNull('parent_id');
|
||||
}]);
|
||||
|
||||
if ($q !== '') {
|
||||
$query->where(function ($qq) use ($q) {
|
||||
@@ -364,8 +365,8 @@ public function availableOrders(array $params): array
|
||||
'id' => $order->id,
|
||||
'order_number' => $order->order_no,
|
||||
'site_name' => $order->site_name ?? '',
|
||||
'delivery_date' => $order->delivery_date ?? '',
|
||||
'location_count' => $order->items_count,
|
||||
'delivery_date' => $order->delivery_date?->format('Y-m-d') ?? '',
|
||||
'location_count' => $order->location_count,
|
||||
])
|
||||
->toArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user