from django.shortcuts import render
from django.views import generic
from django.shortcuts import get_object_or_404
# Create your views here.

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)
        # context['korting'] = context["factuur"].Korting_percent * context["factuur"].Subtotal / 100
        # context["beforetax"] = context["factuur"].Subtotal - context["korting"]
        # context["tax"] = context["beforetax"] * 0.08

        return context