fix: OTC 라벨 약품 검색 API 오류 수정

- StockQty 컬럼 제거 (CD_GOODS 테이블에 없음)
This commit is contained in:
thug0bin 2026-03-02 17:04:43 +09:00
parent 76a4280ebd
commit ac0e1ced0e

View File

@ -5600,7 +5600,7 @@ def api_search_mssql_drug():
# 바코드 또는 이름으로 검색
sql = text("""
SELECT TOP 20
DrugCode, Barcode, GoodsName, Saleprice, StockQty
DrugCode, Barcode, GoodsName, Saleprice
FROM CD_GOODS
WHERE (Barcode LIKE :query OR GoodsName LIKE :query)
AND Barcode IS NOT NULL
@ -5621,8 +5621,7 @@ def api_search_mssql_drug():
'drug_code': row.DrugCode,
'barcode': row.Barcode,
'goods_name': row.GoodsName,
'sale_price': float(row.Saleprice or 0),
'stock_qty': int(row.StockQty or 0)
'sale_price': float(row.Saleprice or 0)
})
return jsonify({