fix: adjust BOM cost calculation SQL and refactor for consistency

Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
dxc
2026-03-02 11:52:24 +08:00
parent 9cfbdc7d13
commit bcd39729f8
2 changed files with 25 additions and 23 deletions

View File

@ -410,7 +410,7 @@ class ProductInboundService:
sql = text("""
SELECT child_id, dosage
FROM bom_table
WHERE bom_no = :bom_no AND version = :version AND is_enabled = true
WHERE bom_no = :bom_no AND version = :version
""")
bom_lines = db.session.execute(sql, {'bom_no': bom_no, 'version': bom_version}).fetchall()