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 )