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 @@