diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py index 6ce54a316..72ae11952 100644 --- a/yuthon_property/models/property_accounts_receivable.py +++ b/yuthon_property/models/property_accounts_receivable.py @@ -91,7 +91,7 @@ class PropertyAccountsReceivable(models.Model): contract = record.contract_id is_ended = False if record.delivered1 : - if record.original_amount == record.delivered1 + record.discount_amount: + if record.original_amount == round(record.delivered1, 2) + round(record.discount_amount, 2): record.deposit_state = 'paid' else: record.deposit_state = 'no_paid' diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 03fdb03ac..2833094ef 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -394,7 +394,7 @@ class PropertyReconciliationWizard(models.Model): final_remark = line.remake if line.collection_type != 'penalty': receivable.delivered1 = receivable.delivered1 + line.amount - if receivable.original_amount == receivable.delivered1 + line.amount + receivable.discount_amount: + if receivable.original_amount == round(receivable.delivered1, 2) + line.amount + round(receivable.discount_amount, 2) : deposit_state = 'paid' else: deposit_state = 'no_paid' @@ -478,7 +478,7 @@ class PropertyReconciliationWizard(models.Model): if receivable_id and source_receivable and not receivable_id.source_receivable_id: receivable_id.write({'source_receivable_id': source_receivable.id}) if receivable_id and line.amount: - if receivable_id.original_amount == receivable_id.delivered1 + line.amount + receivable_id.discount_amount: + if receivable_id.original_amount == round(receivable_id.delivered1, 2) + line.amount + round(receivable_id.discount_amount, 2): deposit_state = 'paid' else: deposit_state = 'no_paid'