How to calculate the total of invoice using sum annotate or agregate instead of forloop and save the value on field invoice.total
class Invoice(models.Model):