!4397 添加功能

Merge pull request !4397 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-08-08 02:10:40 +00:00
committed by Gitee
2 changed files with 6 additions and 6 deletions
@@ -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':
@@ -561,16 +561,16 @@
</div>
<label for="term_start_time" />
<div class="d-inline-flex w-100">
<field name="term_start_time" class="me-2" style="max-width: 5rem;"
<field name="term_start_time" class="me-2" style="max-width: 7rem;"
string="合约起止"/>至
<field name="term_end_time" class="me-2" style="max-width: 5rem;"
<field name="term_end_time" class="me-2" style="max-width: 7rem;"
force_save="1"/>
</div>
<label for="actual_start_time"/>
<div class="d-inline-flex w-100">
<field name="actual_start_time" class="me-2" style="max-width: 5rem"
<field name="actual_start_time" class="me-2" style="max-width: 7rem"
string="实际起止"/>至
<field name="actual_end_time" class="me-2" style="max-width: 5rem;"
<field name="actual_end_time" class="me-2" style="max-width: 7rem;"
force_save="1"/>
</div>
<label for="cycle_mode"/>