@@ -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):
|
||||
"""根据周期类型返回相应的租金乘数"""
|
||||
|
||||
Reference in New Issue
Block a user