fix(dashboard): 修正儀表板待處理數字邏輯與依賴更新
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Modules\Inventory\Contracts\InventoryServiceInterface;
|
||||
use App\Modules\Inventory\Models\Inventory;
|
||||
use App\Modules\Inventory\Models\Warehouse;
|
||||
use App\Modules\Inventory\Models\Product;
|
||||
use App\Modules\Inventory\Models\InventoryTransferOrder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class InventoryService implements InventoryServiceInterface
|
||||
@@ -584,6 +585,8 @@ class InventoryService implements InventoryServiceInterface
|
||||
'negativeCount' => $negativeCount,
|
||||
'expiringCount' => $expiringCount,
|
||||
'totalInventoryQuantity' => Inventory::sum('quantity'),
|
||||
'totalInventoryValue' => Inventory::sum('total_value'),
|
||||
'pendingTransferCount' => InventoryTransferOrder::whereIn('status', ['draft', 'dispatched'])->count(), // 新增:待處理調撥單
|
||||
'abnormalItems' => $abnormalItems,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user