添加功能
This commit is contained in:
@@ -548,6 +548,7 @@ class PropertyReconciliationWizard(models.Model):
|
||||
# 检查是否已有相同记录
|
||||
existing_record = self.env['property.accounts.receivable'].search(check_domain)
|
||||
is_reconciliation = round(line.amount,2) == round(line.rent, 2)
|
||||
receivable_id = self.env['property.accounts.receivable']
|
||||
if not existing_record and is_create:
|
||||
domain2 = [
|
||||
('due_date', '=', line.due_date),
|
||||
@@ -585,15 +586,17 @@ class PropertyReconciliationWizard(models.Model):
|
||||
|
||||
if existing_record:
|
||||
receivable_id = existing_record
|
||||
self.env['receivable.modify.line'].create({
|
||||
'bank_id': rec.bank_id.id,
|
||||
'not_collected': line.rent,
|
||||
'is_write': True if line.amount != 0 else False,
|
||||
'is_penalty': True,
|
||||
'reconciliation_date': rec.actual_date if line.amount != 0 else None,
|
||||
'receivable_id': receivable_id.id,
|
||||
'amount': line.amount,
|
||||
})
|
||||
|
||||
if receivable_id:
|
||||
self.env['receivable.modify.line'].create({
|
||||
'bank_id': rec.bank_id.id,
|
||||
'not_collected': line.rent,
|
||||
'is_write': True if line.amount != 0 else False,
|
||||
'is_penalty': True,
|
||||
'reconciliation_date': rec.actual_date if line.amount != 0 else None,
|
||||
'receivable_id': receivable_id.id,
|
||||
'amount': line.amount,
|
||||
})
|
||||
|
||||
rec.amount_been_reconciled += line.amount
|
||||
yes_amount += line.amount
|
||||
|
||||
Reference in New Issue
Block a user