Skip to content

Instantly share code, notes, and snippets.

@divyanshikathuria
Created June 25, 2014 17:20
Show Gist options
  • Save divyanshikathuria/3e93ce6bc56dd16efead to your computer and use it in GitHub Desktop.
Save divyanshikathuria/3e93ce6bc56dd16efead to your computer and use it in GitHub Desktop.
from django.shortcuts import render
from django.http import HttpResponse
from librehatti.bills.models import QuotedOrder, QuotedItem
from librehatti.catalog.models import *
from django.contrib.auth.models import User
import useraccounts
def proforma(request):
quoted_order = QuotedOrder.objects.get(id=quote_buyer_id)
quoted_item = QuotedItem.objects.get(id=quote_buyer_id)
total_cost = QuotedItem.objects.filter(id=quote_buyer_id).aggregate(Sum('quoted_price'))
return render(request, 'p_bill.html',{ ' quoted_order' : quoted_order,
'quoted_item' : quoted_item , 'total_cost': total_cost } )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment