From c792c73a16bbc24bc74ceba39047e3b9ff45e9aa 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:34:01 +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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 2bd28fbdf..4a8fd3a99 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -172,7 +172,10 @@ class PropertyRentalWizard(models.Model): start_year_month = start_date_adj.strftime('%Y-%m') end_year_month = rent_id.end_data.strftime('%Y-%m') start_day = start_date_adj.day - rent_amount = rent_id.monthly_amount + if rent_id.month_number == 1: + rent_amount = rent_id.period_rent + else: + rent_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]