添加功能
This commit is contained in:
@@ -297,6 +297,7 @@ class PropertyBankStatements(models.Model):
|
||||
"default_account": record.name,
|
||||
"default_actual_total": record.original_amount,
|
||||
"default_reconciliation_line_ids": all_vals,
|
||||
'default_amount_reconciled': self.no_amount,
|
||||
"default_receivable_total": total_rent_month
|
||||
}
|
||||
|
||||
|
||||
@@ -126,17 +126,6 @@ class PropertyReconciliationWizard(models.Model):
|
||||
line.amount = 0
|
||||
exact_match_line.amount = remaining_amount
|
||||
|
||||
# 计算已对账和未对账金额
|
||||
self.amount_been_reconciled = 0.0
|
||||
for line in self.reconciliation_line_ids:
|
||||
self.amount_been_reconciled += line.amount
|
||||
|
||||
if self.actual_total > self.amount_been_reconciled:
|
||||
self.amount_reconciled = self.actual_total - self.amount_been_reconciled
|
||||
else:
|
||||
self.amount_reconciled = 0.0
|
||||
return
|
||||
|
||||
# 按合同和物业分组
|
||||
groups = {}
|
||||
for line in self.reconciliation_line_ids:
|
||||
@@ -175,8 +164,6 @@ class PropertyReconciliationWizard(models.Model):
|
||||
rec.bank_id.registered = abs(rec.actual_total - rec.receivable_total)
|
||||
rec.bank_id.bank_state = 'registered'
|
||||
|
||||
rec.bank_id.yes_amount = rec.amount_been_reconciled
|
||||
rec.bank_id.no_amount = rec.amount_reconciled
|
||||
first_line = bank_lines[0]
|
||||
for line in rec.reconciliation_line_ids:
|
||||
# 跳过金额为0的行
|
||||
@@ -270,6 +257,16 @@ class PropertyReconciliationWizard(models.Model):
|
||||
'reconciliation_time': fields.Datetime.now(),
|
||||
})
|
||||
|
||||
# 计算已对账和未对账金额
|
||||
rec.amount_been_reconciled += line.amount
|
||||
|
||||
if rec.actual_total > rec.amount_been_reconciled:
|
||||
amount_reconciled = rec.actual_total - rec.amount_been_reconciled
|
||||
else:
|
||||
amount_reconciled = 0.0
|
||||
rec.bank_id.yes_amount = rec.amount_been_reconciled
|
||||
rec.bank_id.no_amount = amount_reconciled
|
||||
|
||||
|
||||
|
||||
class PropertyReconciliationLine(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user