feat(inventory): 商品管理新增儲位欄位
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Has been skipped
Koori-ERP-Deploy-System / deploy-production (push) Successful in 47s

This commit is contained in:
2026-02-03 13:17:46 +08:00
parent a160e3f15f
commit 27626e6aa8
6 changed files with 49 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ class ProductController extends Controller
'name' => $product->purchaseUnit->name,
] : null,
'conversionRate' => (float) $product->conversion_rate,
'location' => $product->location,
];
});
@@ -125,6 +126,7 @@ class ProductController extends Controller
'large_unit_id' => 'nullable|exists:units,id',
'conversion_rate' => 'required_with:large_unit_id|nullable|numeric|min:0.0001',
'purchase_unit_id' => 'nullable|exists:units,id',
'location' => 'nullable|string|max:255',
], [
'code.required' => '商品代號為必填',
'code.max' => '商品代號最多 8 碼',
@@ -163,6 +165,7 @@ class ProductController extends Controller
'large_unit_id' => 'nullable|exists:units,id',
'conversion_rate' => 'required_with:large_unit_id|nullable|numeric|min:0.0001',
'purchase_unit_id' => 'nullable|exists:units,id',
'location' => 'nullable|string|max:255',
], [
'code.required' => '商品代號為必填',
'code.max' => '商品代號最多 8 碼',

View File

@@ -26,6 +26,7 @@ class Product extends Model
'large_unit_id',
'conversion_rate',
'purchase_unit_id',
'location',
];
protected $casts = [