添加功能

This commit is contained in:
zhou
2025-06-19 22:15:28 +08:00
parent 9126bc420a
commit ab39bc2e27
@@ -135,20 +135,6 @@ class PropertyRentalWizard(models.Model):
if start_year_month <= date_field_year_month < end_year_month:
self.create_rent_list(record, rent_id, adjusted_rent, start_date, multiplier)
self.create_management_list(record, start_date)
elif start_year_month <= date_field_year_month <= end_year_month:
if rent_id.end_data.day < days:
self.create_rent_list(record, rent_id, adjusted_rent, rent_id.start_data,multiplier)
self.create_management_list(record, start_date)
# 尝试处理下一个租金分解
rent_ids = record.breakdown_ids
current_index = rent_ids.ids.index(rent_id.id)
try:
next_rent_id = rent_ids[current_index + 1]
adjusted_rent_next = ( next_rent_id.period_rent if period_month else next_rent_id.monthly_amount) * multiplier
self.create_rent_list(record, next_rent_id, adjusted_rent_next, next_rent_id.start_data,multiplier)
self.create_management_list(record, start_date)
except (IndexError, ValueError):
pass
def get_multiplier(self, cycle_dict):
"""根据周期类型返回相应的租金乘数"""