feat: 주문 모달 한도/매출 표시 및 UI 개선
- 도매상 한도 API 추가 (wholesaler_limits 테이블) - 다중 도매상 모달: 월 한도 + 실제 월 매출 표시 - 주문 후 예상 사용량 계산 및 경고 표시 - 이모지 대신 로고 이미지 사용 - 약가 → 매출액 헤더 변경 - 매출액 계산: SUM(DRUPRICE)
This commit is contained in:
@@ -4096,7 +4096,7 @@ def api_rx_usage():
|
||||
ISNULL(G.SplName, '') as supplier,
|
||||
SUM(ISNULL(P.QUAN, 1)) as total_qty,
|
||||
SUM(ISNULL(P.QUAN, 1) * ISNULL(P.Days, 1)) as total_dose,
|
||||
SUM(ISNULL(P.DRUPRICE, 0) * ISNULL(P.QUAN, 1) * ISNULL(P.Days, 1)) as total_amount,
|
||||
SUM(ISNULL(P.DRUPRICE, 0)) as total_amount, -- DRUPRICE 합계
|
||||
COUNT(DISTINCT P.PreSerial) as prescription_count,
|
||||
COALESCE(NULLIF(G.BARCODE, ''), '') as barcode,
|
||||
ISNULL(IT.IM_QT_sale_debit, 0) as current_stock,
|
||||
|
||||
Reference in New Issue
Block a user