From 2c539bd88197123a9f08e1472b113bc63510219f Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 1 Aug 2025 10:02:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wizard/property_reconciliation_wizard.py | 12 +++++------- yuthon_salary/models/inherit_hr_payslip.py | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index a840542cd..68746cfa5 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -158,18 +158,16 @@ class PropertyReconciliationWizard(models.Model): management_type_id = self.env['yuthon.management.type'].search([('name', '=', '违约金')]) if line.collection_type == 'penalty': domain2 = [ - ('lessee_id', '=', first_line.tenant_id.id), - ('is_reconciliation', '=', True), - ('due_date', '>=', first_day), - ('due_date', '<=', last_day), + ('due_date', '=', line.due_date), ('property_id', '=', line.property_id.id), - ('contract_id', '=', line.contract_id.id) + ('contract_id', '=', line.contract_id.id), + ('collection_type', '=', 'rent'), ] - receivable_id2 = self.env['property.accounts.receivable'].search(domain2) + reconciliation_id = self.env['property.reconciliation.line'].search(domain2, limit=1) self.env['property.accounts.receivable'].create({ 'is_reconciliation': True, 'due_date': line.due_date, - 'penalty': receivable_id2.submitted, + 'penalty': reconciliation_id.rent, 'management_type_id': management_type_id.id, 'lessee_id': first_line.tenant_id.id, 'property_id': line.property_id.id, diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index d5e66124e..870fc1539 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -672,7 +672,7 @@ class InheritHrPayslip(models.Model): record.monthly_overtime + record.excellent_employees + record.commuting_deduction + - record.retroactive_insurance - + record.retroactive_insurance + record.base_salary_deduction )