I need to know how I can filter in a model that is an Invoice where I have two fields to pay and another that is paid, I have to do a filter to get the bills that have different amounts than paid to know which of the bills are unpaid.

```
class Facturas(models.Model):
factura= models.CharField(max_length=250, unique=True)
unidadM = models.CharField(max_length=20)
importeSD = models.DecimalField(max_digits=7, decimal_places=2)
pagadoSD = models.DecimalField(max_digits=7, decimal_places=2)
importeEU = models.DecimalField(max_digits=7, decimal_places=2)
pagadoEU = models.DecimalField(max_digits=7, decimal_places=2)
fechaCreacionFact = models.DateTimeField(default=timezone.now)
fechaModifFact = models.DateTimeField(null=True, blank=True)
```

I have done something but it is getting all invoices and then a cycle `for`

to compare the amount with paid and it takes a long time and the connection in the browser drops due to server response delay.