-1
I have a management system in Jango and would like to save in one place the report of all winnings (Paid=True), defaults (Paid=False) and expenses of the month or period in Jango admin itself, in a template or in a PDF document.
class MovDiario(models.Model):
cliente = models.ForeignKey('Cliente', on_delete=models.CASCADE)
veiculo = models.ForeignKey('Veiculo', on_delete=models.CASCADE)
placa = models.CharField(max_length=10)
servico = models.ManyToManyField('Servico')
valor = models.DecimalField(max_digits=6, decimal_places=2, blank=True, null=True)
pagamento = models.ForeignKey('FormPagamento', on_delete=models.CASCADE, blank=True, null=True)
pago = models.BooleanField(default=False)
entregue = models.BooleanField(default=False)
I want to know mainly how I can access the sum of all amounts paid to make a financial statement
The best way you can get help on the site is by putting the code of what you’ve done and where you’re struggling. Check the Help Center for a good question: https://answall.com/help/how-to-ask
– Leticia Rosa