feat: 修正庫存與撥補單邏輯並整合文件
1. 修復倉庫統計數據加總與樣式。 2. 修正可用庫存計算邏輯(排除不可銷售倉庫)。 3. 撥補單商品列表加入批號與效期顯示。 4. 修正撥補單儲存邏輯以支援精確批號轉移。 5. 整合 FEATURES.md 至 README.md。
This commit is contained in:
@@ -20,22 +20,22 @@ export interface Category {
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id: number;
|
||||
id: string;
|
||||
code: string;
|
||||
name: string;
|
||||
category_id: number;
|
||||
categoryId: number;
|
||||
category?: Category;
|
||||
brand?: string;
|
||||
specification?: string;
|
||||
base_unit_id: number;
|
||||
base_unit?: Unit;
|
||||
large_unit_id?: number;
|
||||
large_unit?: Unit;
|
||||
conversion_rate?: number;
|
||||
purchase_unit_id?: number;
|
||||
purchase_unit?: Unit;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
baseUnitId: number;
|
||||
baseUnit?: Unit;
|
||||
largeUnitId?: number;
|
||||
largeUnit?: Unit;
|
||||
conversionRate?: number;
|
||||
purchaseUnitId?: number;
|
||||
purchaseUnit?: Unit;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
interface PageProps {
|
||||
@@ -163,7 +163,7 @@ export default function ProductManagement({ products, categories, units, filters
|
||||
setIsDialogOpen(true);
|
||||
};
|
||||
|
||||
const handleDeleteProduct = (id: number) => {
|
||||
const handleDeleteProduct = (id: string) => {
|
||||
router.delete(route('products.destroy', id), {
|
||||
onSuccess: () => {
|
||||
// Toast handled by flash message
|
||||
|
||||
Reference in New Issue
Block a user