添加功能

This commit is contained in:
李鹏宇
2025-11-05 10:29:00 +08:00
parent 6ab8c9b1b3
commit 018ebed443
@@ -86,7 +86,7 @@ class PropertyReconciliationWizard(models.Model):
contract_penalties.append({
'contract_id': penalty.contract_id.id,
'rent_month': 0,
'due_date': penalty.due_date,
'due_date': penalty.due_date.replace(day=1),
'rent': penalty.submitted,
'amount': 0,
'collection_type': 'penalty',
@@ -150,7 +150,7 @@ class PropertyReconciliationWizard(models.Model):
if unpaid_rent_recs:
for rent in unpaid_rent_recs:
# if (unpaid_rent_recs.payout_date + relativedelta(months=1)).month != self.actual_date.month:
first_day = (rent.payout_date + timedelta(days=1)).replace(day=1)
first_day = (rent.payout_date + timedelta(days=1))
last_month_rent = rent.submitted
penalty_days = self.actual_date - first_day
penalty_amount = (penalty_days.days + 1) * round(