Merge pull request !4358 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-08-06 07:40:35 +00:00
committed by Gitee
2 changed files with 11 additions and 9 deletions
@@ -66,6 +66,7 @@ class PropertyBankStatements(models.Model):
rec.bank_state = 'not_reconciled'
rec.registered = 0
rec.no_amount = rec.yes_amount
rec.remark = None
rec.yes_amount = 0
if accounts:
for account in accounts:
@@ -153,7 +153,7 @@ class PropertyReconciliationWizard(models.Model):
first_line = bank_lines[0]
for line in rec.reconciliation_line_ids:
# 跳过金额为0的行
if (line.amount == 0 or line.collection_type == 'penalty') or \
if (line.amount == 0 and line.collection_type != 'penalty') or \
(line.contract_id and line.contract_id.is_split):
continue
if line.amount != line.rent:
@@ -181,14 +181,15 @@ class PropertyReconciliationWizard(models.Model):
is_reconciliation = True
else:
is_reconciliation = False
receivable.write({
'is_reconciliation': is_reconciliation,
'delivered1': line.amount,
'payout_date': rec.bank_id.start_time.date(),
'remark': line.remake,
'reconciliation_time': fields.Datetime.now(),
'receivable_log': f'当前登录人{rec.env.user.name}于{fields.Datetime.now()}对户名为{rec.bank_id.name_account}进行对账操作,对账应收金额为{rec.receivable_total},实际金额为{rec.actual_total}'
})
if line.collection_type != 'penalty':
receivable.write({
'is_reconciliation': is_reconciliation,
'delivered1': line.amount,
'payout_date': rec.bank_id.start_time.date(),
'remark': line.remake,
'reconciliation_time': fields.Datetime.now(),
'receivable_log': f'当前登录人{rec.env.user.name}于{fields.Datetime.now()}对户名为{rec.bank_id.name_account}进行对账操作,对账应收金额为{rec.receivable_total},实际金额为{rec.actual_total}'
})
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '违约金')])
if line.collection_type == 'penalty':
domain2 = [