2020-05-24 15:00:10 +00:00
|
|
|
from django.shortcuts import render
|
2020-05-25 05:15:12 +00:00
|
|
|
from django.views import generic
|
|
|
|
from django.shortcuts import get_object_or_404
|
2020-05-24 15:00:10 +00:00
|
|
|
# Create your views here.
|
2020-05-25 05:15:12 +00:00
|
|
|
|
|
|
|
from markt.models import Factuur, Order, Klant
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FactuurDetailView(generic.DetailView):
|
|
|
|
model = Factuur
|
|
|
|
def get_context_data(self, **kwargs):
|
|
|
|
# Call the base implementation first to get the context
|
|
|
|
context = super(FactuurDetailView, self).get_context_data(**kwargs)
|
2020-05-26 13:37:22 +00:00
|
|
|
# context['korting'] = context["factuur"].Korting_percent * context["factuur"].Subtotal / 100
|
|
|
|
# context["beforetax"] = context["factuur"].Subtotal - context["korting"]
|
|
|
|
# context["tax"] = context["beforetax"] * 0.08
|
|
|
|
|
2020-05-25 05:15:12 +00:00
|
|
|
return context
|