From 97a031851fdfb85b648f6a87dda1067a624e3e4a Mon Sep 17 00:00:00 2001 From: Gunpreet Ahuja Date: Mon, 23 Jun 2014 21:59:16 +0530 Subject: [PATCH 1/2] Delete reports.html --- src/templates/print/reports.html | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/templates/print/reports.html diff --git a/src/templates/print/reports.html b/src/templates/print/reports.html deleted file mode 100644 index 31543d7..0000000 --- a/src/templates/print/reports.html +++ /dev/null @@ -1,30 +0,0 @@ - -

GURU NANAK DEV ENGINEERING COLLEGE

- -

Punjab Govt. Aided Status, NBA Accredited ISO-9001-2008 Certified

-

Testing & Consultancy Cell

-

Gill Park, Gill Road, Ludhiana-141006

-

Website:http//tcc.gndec.ac.in Email:tcc@gndec.ac.in Ph:0161-2491193,5064509 Fax:0161-5064742

- -Lab Reports - - - - - - - - - -{{% for m in purchase_data}} - - - - - - - -{%endfor %} -
LAB REPORT
Receipt No. Date Client Company Amount
{{ m.Receipt}{{m.Date}}{{m.Client}}{{m.Amount}}
- - From 58ac92a46cafa5bcd15f9a89dcd1790a0820fc30 Mon Sep 17 00:00:00 2001 From: Gunpreet Ahuja Date: Mon, 23 Jun 2014 22:09:23 +0530 Subject: [PATCH 2/2] Delete views.py --- src/librehatti/print/views.py | 46 ----------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/librehatti/print/views.py diff --git a/src/librehatti/print/views.py b/src/librehatti/print/views.py deleted file mode 100644 index 3a940cb..0000000 --- a/src/librehatti/print/views.py +++ /dev/null @@ -1,46 +0,0 @@ -from django.shortcuts import render -from librehatti.catalog.models import * -from forms import DeptForm -from django.http import HttpResponseRedirect -from librehatti.catalog.models import Category, PurchaseOrder,PurchasedItem - - -def add_material(request): - purchase_data = PurchaseOrder.objects.all() - if request.method == 'POST': - form = DeptForm(request.POST) - if form.is_valid(): - cd = form.cleaned_data - start_date = cd['start_date'] - end_date = cd['end_date'] - dates(start_date, end_date) - purchase_data = PurchaseOrder.objects.filter(purchase_date__range - =(start_date,end_date)).values('buyer_id', - 'date_time', 'organisation') - purchase_data1 = PurchaseOrder.objects.filter(date_time__range - =(start_date,end_date)) - purchased_item = PurchasedItem.objects.get(buyer_id__in - =purchase_data1) - sub_total= purchased_item.qty* purchased_item.price - total_cost_temp = PurchasedItem.objects.filter(id__in= - purchase_data1).aggregate(Sum('sub_total')) - total_cost = total_cost_temp['total_cost__sum'] - return HttpResponseRedirect('/print/addmaterial') - return render(request, 'reports.html', {'purchase_data' : - purchase_data, 'start_date':start_date,'end_date':end_date, - 'total_cost':total_cost}) - - else: - form = DeptForm() - material_name = Category.objects.values('name') - return render(request,'print/form.html',{'material_name' : material_name, - 'form': form}) - else: - form = DeptForm() - material_name = Category.objects.values('name') - return render(request,'print/form.html',{'material_name' : material_name, - 'form': form}) - - - -