diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py index 7224cdfc4c6f..4c3f2e578628 100644 --- a/l10n_it_fatturapa_in/models/account.py +++ b/l10n_it_fatturapa_in/models/account.py @@ -150,8 +150,12 @@ def e_inv_dati_ritenuta(self): "found. Please manually check Withholding tax Amount\n" ) if ( - sum(self.ftpa_withholding_ids.mapped("amount")) - != self.withholding_tax_amount + float_compare( + sum(self.ftpa_withholding_ids.mapped("amount")), + self.withholding_tax_amount, + precision_rounding=self.currency_id.rounding, + ) + != 0 ): error_message += _( "E-bill contains ImportoRitenuta %s but created invoice has got"