From e7e5ea45c9df68a19c2847d9ae484ce06e1e4c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 29 Oct 2025 17:37:59 +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 --- yuthon_property_approval/wizard/property_rental_wizard.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 4a8fd3a99..cc7b68282 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -103,7 +103,7 @@ class PropertyRentalWizard(models.Model): "original_amount": amount, }) - def create_management_list(self, record, start_date, rent_amount): + def create_management_list(self, record, start_date, manage_amount): """封装创建管理费记录的逻辑""" first_day_of_month = start_date.replace(day=1) last_day_of_month = first_day_of_month + relativedelta(months=1) - timedelta(days=1) @@ -119,7 +119,7 @@ class PropertyRentalWizard(models.Model): ) original_amount = matched_breakdowns.management_monthly_amount else: - original_amount = rent_amount + original_amount = manage_amount has_valid_property = False for lease_id in record.lease_ids: @@ -176,6 +176,7 @@ class PropertyRentalWizard(models.Model): rent_amount = rent_id.period_rent else: rent_amount = rent_id.monthly_amount + manage_amount = rent_id.monthly_amount # 调整后的租金 target_year, target_month = map(int, date_field_year_month.split('-')) max_day = calendar.monthrange(target_year, target_month)[1] @@ -188,7 +189,7 @@ class PropertyRentalWizard(models.Model): if start_year_month <= date_field_year_month <= end_year_month: if rent_id.period_rent != 0 and record.contract_sort not in ['guanggao', 'guanzi', 'room']: self.create_rent_list(record, rent_id, rent_amount, start_date, multiplier) - self.create_management_list(record, start_date, rent_amount) + self.create_management_list(record, start_date, manage_amount) def get_multiplier(self, cycle_dict): """根据周期类型返回相应的租金乘数"""