@@ -323,8 +323,13 @@ class PropertyReconciliationWizard(models.Model):
|
||||
})
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '违约金')])
|
||||
if line.collection_type == 'penalty':
|
||||
# 用备注的的开始日期和结束日期
|
||||
date_pattern = r'(\d{4}-\d{2}-\d{2})[至-](\d{4}-\d{2}-\d{2})'
|
||||
date_match = re.search(date_pattern, line.remake or '')
|
||||
extract_start_date = date_match.group(1) if date_match else line.due_date
|
||||
extract_end_date = date_match.group(2) if date_match else None
|
||||
check_domain = [
|
||||
('due_date', '=', line.due_date),
|
||||
('due_date', '=', extract_start_date),
|
||||
('property_id', '=', line.property_id.id),
|
||||
('contract_id', '=', line.contract_id.id),
|
||||
('management_type_id', '=', management_type_id.id),
|
||||
@@ -334,11 +339,6 @@ class PropertyReconciliationWizard(models.Model):
|
||||
existing_record = self.env['property.accounts.receivable'].search(check_domain)
|
||||
is_reconciliation = line.amount == round(line.rent, 2)
|
||||
|
||||
# 用备注的的开始日期和结束日期
|
||||
date_pattern = r'(\d{4}-\d{2}-\d{2})[至-](\d{4}-\d{2}-\d{2})'
|
||||
date_match = re.search(date_pattern, line.remake or '')
|
||||
extract_start_date = date_match.group(1) if date_match else line.due_date
|
||||
extract_end_date = date_match.group(2) if date_match else None
|
||||
if not existing_record:
|
||||
domain2 = [
|
||||
('due_date', '=', line.due_date),
|
||||
|
||||
Reference in New Issue
Block a user