feat: 統一進貨單 UI、修復庫存異動紀錄與廠商詳情顯示報錯
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 51s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-27 17:23:31 +08:00
parent a7c445bd3f
commit 95d8dc2e84
24 changed files with 1613 additions and 466 deletions

View File

@@ -17,7 +17,7 @@ class InventoryService implements InventoryServiceInterface
public function getAllProducts()
{
return Product::with(['baseUnit'])->get();
return Product::with(['baseUnit', 'largeUnit'])->get();
}
public function getUnits()
@@ -32,17 +32,17 @@ class InventoryService implements InventoryServiceInterface
public function getProduct(int $id)
{
return Product::find($id);
return Product::with(['baseUnit', 'largeUnit'])->find($id);
}
public function getProductsByIds(array $ids)
{
return Product::whereIn('id', $ids)->get();
return Product::whereIn('id', $ids)->with(['baseUnit', 'largeUnit'])->get();
}
public function getProductsByName(string $name)
{
return Product::where('name', 'like', "%{$name}%")->get();
return Product::where('name', 'like', "%{$name}%")->with(['baseUnit', 'largeUnit'])->get();
}
public function getWarehouse(int $id)