feat: 도매상 잔고 모달에 월간 매출 추가
- 백제/지오영/수인 월간매출 API 라우트 추가 - 모달 UI: 잔고 + 월간 매출 동시 표시 - 총 주문액 / 총 미수금 요약 표시
This commit is contained in:
@@ -447,6 +447,37 @@ def api_get_balance():
|
||||
}), 501
|
||||
|
||||
|
||||
@geoyoung_bp.route('/monthly-sales', methods=['GET'])
|
||||
def api_get_monthly_sales():
|
||||
"""
|
||||
월간 매출 조회
|
||||
|
||||
GET /api/geoyoung/monthly-sales?year=2026&month=3
|
||||
"""
|
||||
from datetime import datetime
|
||||
|
||||
year = request.args.get('year', type=int)
|
||||
month = request.args.get('month', type=int)
|
||||
|
||||
# 기본값: 현재 월
|
||||
if not year or not month:
|
||||
now = datetime.now()
|
||||
year = year or now.year
|
||||
month = month or now.month
|
||||
|
||||
session = get_geo_session()
|
||||
|
||||
if hasattr(session, 'get_monthly_sales'):
|
||||
result = session.get_monthly_sales(year, month)
|
||||
return jsonify(result)
|
||||
else:
|
||||
return jsonify({
|
||||
'success': False,
|
||||
'error': 'NOT_IMPLEMENTED',
|
||||
'message': '지오영 월간 매출 조회 미구현'
|
||||
}), 501
|
||||
|
||||
|
||||
# ========== 하위 호환성 ==========
|
||||
|
||||
# 기존 코드에서 직접 클래스 참조하는 경우를 위해
|
||||
|
||||
Reference in New Issue
Block a user