违约金
This commit is contained in:
@@ -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')})},
|
||||
|
||||
Reference in New Issue
Block a user