From 7b74fbde22d62847055355ca21681e3f6080e0b4 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 8 Aug 2025 10:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/inherit_yuthon_property.py | 4 ++-- .../views/property_lease_contract.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 7f46c2fc4..89c1b3fe0 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -543,7 +543,7 @@ class PropertyRentList(models.Model): # 处理合同月 if contract.cycle_mode == 'fixed_monthly': # 计算理论应收结束日(当月最后一天) - next_month_first = (due_date_obj.replace(day=1) + timedelta(days=32)).replace(day=1) + next_month_first = (due_date_obj+ relativedelta(months=1)) theoretical_end = next_month_first - timedelta(days=1) # 处理自然月 elif contract.cycle_mode == 'floating_monthly': @@ -599,7 +599,7 @@ class PropertyRentList(models.Model): # 处理合同月 if contract.cycle_mode == 'fixed_monthly': # 计算理论应收结束日(当月最后一天) - next_month_first = (due_date_obj.replace(day=1) + timedelta(days=32)).replace(day=1) + next_month_first = (due_date_obj+ relativedelta(months=1)) theoretical_end = next_month_first - timedelta(days=1) # 处理自然月 elif contract.cycle_mode == 'floating_monthly': diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 579f1ecdc..82a74eb24 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -561,16 +561,16 @@