From b7d28d2bbf4d444f4ce489df67f4cd2efa63d821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 15 Jun 2026 10:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9D=E7=BA=A6=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_report/models/yuthon_dashboard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_report/models/yuthon_dashboard.py b/yuthon_report/models/yuthon_dashboard.py index 5f8177e28..cb2a2d242 100644 --- a/yuthon_report/models/yuthon_dashboard.py +++ b/yuthon_report/models/yuthon_dashboard.py @@ -104,12 +104,12 @@ class YuthonDashboard(models.Model): # ==================== 二、其他收入板块 ==================== # 违约金:调用三个独立报表方法 # 累计欠收:stats = [记录总数, 违约金总额, 违约金已收, 违约金未收] → 取 index 3(违约金未收) - # 时间过滤与看板一致,直接用 base_params(月初1号当天) + # 时间过滤:用 range_params(月末),与报表页面保持一致 penalty_cum_arrears = safe_get( 'property.accounts.receivable', 'get_penalty_arrears_report', 3, - overrides=base_params + overrides=range_params ) - _logger.info("[DASHBOARD_PENALTY_ARREARS] base_params=%s, value=%s", base_params, penalty_cum_arrears) + _logger.info("[DASHBOARD_PENALTY_ARREARS] range_params=%s, value=%s", range_params, penalty_cum_arrears) # 本月实收:stats = [记录总数, 实收违约金] → 取 index 1 penalty_month_received = safe_get( 'property.accounts.receivable', 'get_penalty_month_received_report', 1, @@ -207,7 +207,7 @@ class YuthonDashboard(models.Model): 'cards': [ {'label': '违约金·累计欠收', 'value': penalty_cum_arrears, 'is_negative': True, 'action': 'yuthon_report.action_penalty_arrears_report', - 'action_context': make_ctx({'date_end': base_params.get('date_end')})}, + 'action_context': make_ctx({'date_end': range_params.get('date_end')})}, {'label': '违约金·本月实收', 'value': penalty_month_received, 'is_negative': False, 'action': 'yuthon_report.action_penalty_month_received_report', 'action_context': make_ctx({'date_start': range_params.get('date_start'), 'date_end': range_params.get('date_end')})},