fix: [quotes] BomCalculationResult 프로퍼티명 수정 (materials → items, snake_case)
This commit is contained in:
@@ -41,18 +41,18 @@ export function QuoteCalculationReport({
|
||||
return sum + locTotal;
|
||||
}, 0) || 0;
|
||||
|
||||
// 소요자재 내역 - BOM 자재 목록 (locations[].bomResult.materials)에서 가져옴
|
||||
// 소요자재 내역 - BOM 자재 목록 (locations[].bomResult.items)에서 가져옴
|
||||
const materialItems = (quote.locations || []).flatMap(loc =>
|
||||
(loc.bomResult?.materials || [])
|
||||
(loc.bomResult?.items || [])
|
||||
).map((material, index) => ({
|
||||
no: index + 1,
|
||||
itemCode: material.itemCode || '-',
|
||||
name: material.itemName || '-',
|
||||
itemCode: material.item_code || '-',
|
||||
name: material.item_name || '-',
|
||||
spec: material.specification || '-',
|
||||
quantity: Math.floor(material.quantity || 1),
|
||||
unit: material.unit || 'EA',
|
||||
unitPrice: material.unitPrice || 0,
|
||||
totalPrice: material.totalPrice || 0,
|
||||
unitPrice: material.unit_price || 0,
|
||||
totalPrice: material.total_price || 0,
|
||||
}));
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user