On Mon, Sep 16, 2019 at 10:15 AM Abu Yusuf <[email protected]>
wrote:

> Hello, I have two models here:
>
> class Tender(models.Model):
>   project = models.ForeignKey(Project, verbose_name=_("Select project"),
> on_delete=models.CASCADE)
>   name = models.CharField(_("Tender name"), max_length=250)
>   value = models.FloatField(_("Tender value"), default=0, null=True, blank
> =True)
>   est_cost = models.FloatField(default=0, null=True, blank=True)
>
>   def __str__(self):
>     return self.name
>
> class BillReceive(models.Model):
>   tender = models.ForeignKey(Tender, verbose_name=_("Select tender"),
> on_delete=models.CASCADE)
>   date = models.DateField(default=datetime.date.today)
>   received_amount = models.FloatField(default=0)
>   due_amount = models.FloatField(default=0, null=True, blank=True)
>   total = models.FloatField(
>     blank=True,
>     null=True
>   )
>
> And the views here:
>
> def bill_receive_of_tenders(request, pk):
>   tender = get_object_or_404(Tender, pk=pk)
>   bill_receive = BillReceive.objects.filter(tender=tender).order_by('date'
> )
>   ctx = {'tenders': tender, 'bill_receives': bill_receive}
>   return render(request, 'boro_khata/bill_receive_of_tenders.html', ctx)
>
> I would like to see the due_amount liked this:
>
> [image: ss.png]
>
>
> 60, 40, 35
>
> Can Anyone help me out here?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5b7683e0-027d-4118-9c16-f1da24495298%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5b7683e0-027d-4118-9c16-f1da24495298%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHBkvW%3Dk8AcDxnzA8SEcQKHu1CKq8zqvYEVNdmh60OoJYQHd0A%40mail.gmail.com.

Attachment: INDUSTRIAL BASED SUPERVISOR.docx
Description: MS-Word 2007 document

Attachment: UNIVERSITY STAFF ASSESSMENT OF STUDENT.docx
Description: MS-Word 2007 document

Attachment: SUPERVISOR'S LOG BOOK.docx
Description: MS-Word 2007 document

Reply via email to