feat(consumable): 소모품 마스터에 "규격(spec)" 필드 추가
품목의 규격 정보(예: 4" 용접, M16)를 분리 저장할 수 있도록 spec 컬럼 추가. DB ALTER 필요: ALTER TABLE consumable_items ADD COLUMN spec VARCHAR(200) DEFAULT NULL AFTER item_name; Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ const SettlementModel = {
|
||||
async getMonthlyPurchases(yearMonth) {
|
||||
const db = await getDb();
|
||||
const [rows] = await db.query(`
|
||||
SELECT p.*, ci.item_name, ci.maker, ci.category, ci.unit, ci.base_price, ci.photo_path,
|
||||
SELECT p.*, ci.item_name, ci.spec, ci.maker, ci.category, ci.unit, ci.base_price, ci.photo_path,
|
||||
v.vendor_name, su.name AS purchaser_name
|
||||
FROM purchases p
|
||||
JOIN consumable_items ci ON p.item_id = ci.item_id
|
||||
@@ -88,7 +88,7 @@ const SettlementModel = {
|
||||
const db = await getDb();
|
||||
const [rows] = await db.query(`
|
||||
SELECT p.purchase_id, p.purchase_date, p.unit_price, p.quantity,
|
||||
ci.item_id, ci.item_name, ci.maker, ci.category, ci.base_price,
|
||||
ci.item_id, ci.item_name, ci.spec, ci.maker, ci.category, ci.base_price,
|
||||
v.vendor_name
|
||||
FROM purchases p
|
||||
JOIN consumable_items ci ON p.item_id = ci.item_id
|
||||
|
||||
Reference in New Issue
Block a user