├── Bucks ├── __init__.py ├── __pycache__ │ ├── urls.cpython-37.pyc │ ├── views.cpython-37.pyc │ ├── wsgi.cpython-37.pyc │ ├── __init__.cpython-37.pyc │ └── settings.cpython-37.pyc ├── views.py ├── wsgi.py ├── urls.py └── settings.py ├── repair ├── __init__.py ├── migrations │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-35.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── 0001_initial.cpython-35.pyc │ │ ├── 0001_initial.cpython-36.pyc │ │ ├── 0001_initial.cpython-37.pyc │ │ ├── 0014_trialperiod.cpython-36.pyc │ │ ├── 0014_trialperiod.cpython-37.pyc │ │ ├── 0002_auto_20171112_0848.cpython-35.pyc │ │ ├── 0002_auto_20171112_0848.cpython-36.pyc │ │ ├── 0002_auto_20171112_0848.cpython-37.pyc │ │ ├── 0003_auto_20171113_0128.cpython-35.pyc │ │ ├── 0003_auto_20171113_0128.cpython-36.pyc │ │ ├── 0003_auto_20171113_0128.cpython-37.pyc │ │ ├── 0004_auto_20171113_0530.cpython-35.pyc │ │ ├── 0004_auto_20171113_0530.cpython-36.pyc │ │ ├── 0004_auto_20171113_0530.cpython-37.pyc │ │ ├── 0005_auto_20171113_0647.cpython-35.pyc │ │ ├── 0005_auto_20171113_0647.cpython-36.pyc │ │ ├── 0005_auto_20171113_0647.cpython-37.pyc │ │ ├── 0006_auto_20171115_0518.cpython-35.pyc │ │ ├── 0006_auto_20171115_0518.cpython-36.pyc │ │ ├── 0006_auto_20171115_0518.cpython-37.pyc │ │ ├── 0007_auto_20171118_1230.cpython-36.pyc │ │ ├── 0007_auto_20171118_1230.cpython-37.pyc │ │ ├── 0009_auto_20171118_1535.cpython-36.pyc │ │ ├── 0009_auto_20171118_1535.cpython-37.pyc │ │ ├── 0010_auto_20171118_1537.cpython-36.pyc │ │ ├── 0010_auto_20171118_1537.cpython-37.pyc │ │ ├── 0011_auto_20171118_1824.cpython-36.pyc │ │ ├── 0011_auto_20171118_1824.cpython-37.pyc │ │ ├── 0012_auto_20171119_1603.cpython-36.pyc │ │ ├── 0012_auto_20171119_1603.cpython-37.pyc │ │ ├── 0013_auto_20171122_1150.cpython-36.pyc │ │ ├── 0013_auto_20171122_1150.cpython-37.pyc │ │ ├── 0008_repairdetails_testdetails.cpython-36.pyc │ │ └── 0008_repairdetails_testdetails.cpython-37.pyc │ ├── 0003_auto_20171113_0128.py │ ├── 0004_auto_20171113_0530.py │ ├── 0009_auto_20171118_1535.py │ ├── 0013_auto_20171122_1150.py │ ├── 0002_auto_20171112_0848.py │ ├── 0014_trialperiod.py │ ├── 0011_auto_20171118_1824.py │ ├── 0010_auto_20171118_1537.py │ ├── 0005_auto_20171113_0647.py │ ├── 0012_auto_20171119_1603.py │ ├── 0006_auto_20171115_0518.py │ ├── 0007_auto_20171118_1230.py │ ├── 0001_initial.py │ └── 0008_repairdetails_testdetails.py ├── tests.py ├── static │ ├── img │ │ ├── bg.png │ │ ├── logo.png │ │ └── bgOld.jpg │ ├── fonts │ │ ├── otf │ │ │ ├── GothamRoundedBold.otf │ │ │ ├── GothamRoundedBook.otf │ │ │ ├── GothamRoundedLight.otf │ │ │ └── GothamRoundedMedium.otf │ │ └── ttf │ │ │ ├── GothamRoundedBold.ttf │ │ │ ├── GothamRoundedBook.ttf │ │ │ ├── GothamRoundedLight.ttf │ │ │ └── GothamRoundedMedium.ttf │ └── css │ │ ├── fonts.css │ │ ├── dashboard.css │ │ ├── checkStatusShow.css │ │ ├── receipt.css │ │ ├── form.css │ │ └── style.css ├── apps.py ├── __pycache__ │ ├── admin.cpython-37.pyc │ ├── apps.cpython-37.pyc │ ├── urls.cpython-37.pyc │ ├── views.cpython-37.pyc │ ├── models.cpython-37.pyc │ └── __init__.cpython-37.pyc ├── admin.py ├── urls.py ├── templates │ ├── repair │ │ ├── errorPage.html │ │ ├── finalReceipt.html │ │ ├── enquiryReceipt.html │ │ ├── updateRequest.html │ │ ├── pendingRepairRequest.html │ │ ├── dashboard.html │ │ ├── checkStatusRequest.html │ │ ├── enquiryReceiptFrameContent.html │ │ ├── enquiryForm.html │ │ ├── pendingRepairList.html │ │ ├── finalReceiptFrameContent.html │ │ ├── checkStatusShow.html │ │ └── updateForm.html │ └── index.html ├── models.py └── views.py ├── info.txt ├── .gitattributes ├── db.sqlite3 ├── README.md ├── Pending Tasks.txt └── manage.py /Bucks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /repair/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /repair/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /info.txt: -------------------------------------------------------------------------------- 1 | Username : boss 2 | Password : boss1234 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.py linguist-vendored=false 3 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /repair/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /repair/static/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/img/bg.png -------------------------------------------------------------------------------- /repair/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/img/logo.png -------------------------------------------------------------------------------- /repair/static/img/bgOld.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/img/bgOld.jpg -------------------------------------------------------------------------------- /repair/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class RepairConfig(AppConfig): 5 | name = 'repair' 6 | -------------------------------------------------------------------------------- /Bucks/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/Bucks/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /Bucks/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/Bucks/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /Bucks/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/Bucks/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/apps.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/apps.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /Bucks/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/Bucks/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /Bucks/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/Bucks/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /repair/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /repair/static/fonts/otf/GothamRoundedBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/otf/GothamRoundedBold.otf -------------------------------------------------------------------------------- /repair/static/fonts/otf/GothamRoundedBook.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/otf/GothamRoundedBook.otf -------------------------------------------------------------------------------- /repair/static/fonts/otf/GothamRoundedLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/otf/GothamRoundedLight.otf -------------------------------------------------------------------------------- /repair/static/fonts/ttf/GothamRoundedBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/ttf/GothamRoundedBold.ttf -------------------------------------------------------------------------------- /repair/static/fonts/ttf/GothamRoundedBook.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/ttf/GothamRoundedBook.ttf -------------------------------------------------------------------------------- /repair/static/fonts/ttf/GothamRoundedLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/ttf/GothamRoundedLight.ttf -------------------------------------------------------------------------------- /repair/static/fonts/otf/GothamRoundedMedium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/otf/GothamRoundedMedium.otf -------------------------------------------------------------------------------- /repair/static/fonts/ttf/GothamRoundedMedium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/static/fonts/ttf/GothamRoundedMedium.ttf -------------------------------------------------------------------------------- /repair/migrations/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0001_initial.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0001_initial.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0001_initial.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0001_initial.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0014_trialperiod.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0014_trialperiod.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0014_trialperiod.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0014_trialperiod.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0002_auto_20171112_0848.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0003_auto_20171113_0128.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0004_auto_20171113_0530.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0005_auto_20171113_0647.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-35.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0006_auto_20171115_0518.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0007_auto_20171118_1230.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0007_auto_20171118_1230.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0007_auto_20171118_1230.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0007_auto_20171118_1230.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0009_auto_20171118_1535.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0009_auto_20171118_1535.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0009_auto_20171118_1535.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0009_auto_20171118_1535.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0010_auto_20171118_1537.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0010_auto_20171118_1537.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0010_auto_20171118_1537.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0010_auto_20171118_1537.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0011_auto_20171118_1824.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0011_auto_20171118_1824.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0011_auto_20171118_1824.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0011_auto_20171118_1824.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0012_auto_20171119_1603.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0012_auto_20171119_1603.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0012_auto_20171119_1603.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0012_auto_20171119_1603.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0013_auto_20171122_1150.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0013_auto_20171122_1150.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0013_auto_20171122_1150.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0013_auto_20171122_1150.cpython-37.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0008_repairdetails_testdetails.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0008_repairdetails_testdetails.cpython-36.pyc -------------------------------------------------------------------------------- /repair/migrations/__pycache__/0008_repairdetails_testdetails.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirnejak/store-management-app/HEAD/repair/migrations/__pycache__/0008_repairdetails_testdetails.cpython-37.pyc -------------------------------------------------------------------------------- /Bucks/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, render_to_response 2 | from django.http import HttpResponse 3 | 4 | from repair.models import Enquiry 5 | 6 | # Create your views here. 7 | 8 | def homepage(request): 9 | return render(request,'index.html') 10 | #monospace -------------------------------------------------------------------------------- /repair/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from repair.models import Enquiry,TestDetail,RepairDetail,trialPeriod 4 | 5 | # Register your models here. 6 | 7 | admin.site.register(Enquiry) 8 | admin.site.register(TestDetail) 9 | admin.site.register(RepairDetail) 10 | admin.site.register(trialPeriod) -------------------------------------------------------------------------------- /Bucks/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Bucks project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Bucks.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bucks 2 | A web application powered by Python and Django to manage repair shop. 3 | 4 | 5 | ## Installation and Usage 6 | 7 | ### Clone 8 | Clone the project 9 | ```sh 10 | $ git clone https://github.com/JitendraNirnejak/bucks.git 11 | $ cd bucks 12 | ``` 13 | 14 | ### Install Dependencies 15 | Install Django in your environment : 16 | 17 | **For Windows :** 18 | ```sh 19 | $ pip install django 20 | ``` 21 | **For Linux :** 22 | ```sh 23 | $ pip3 install django 24 | ``` 25 | 26 | ### Start the server 27 | ```sh 28 | $ python manage.py runserver 29 | ``` 30 | -------------------------------------------------------------------------------- /repair/migrations/0003_auto_20171113_0128.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-12 19:58 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0002_auto_20171112_0848'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameField( 16 | model_name='enquiry', 17 | old_name='deviceName', 18 | new_name='deviceModel', 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /repair/migrations/0004_auto_20171113_0530.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-13 00:00 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0003_auto_20171113_0128'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='enquiry', 17 | name='enquiryDate', 18 | field=models.DateField(), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /repair/static/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "gotham rounded bold"; 3 | src: url('../fonts/otf/GothamRoundedBold.otf') format("opentype"); 4 | } 5 | 6 | @font-face { 7 | font-family: "gotham rounded medium"; 8 | src: url('../fonts/otf/GothamRoundedMedium.otf') format("opentype"); 9 | } 10 | 11 | @font-face { 12 | font-family: "gotham rounded book"; 13 | src: url('../fonts/otf/GothamRoundedBook.otf') format("opentype"); 14 | } 15 | 16 | @font-face { 17 | font-family: "gotham rounded light"; 18 | src: url('../fonts/otf/GothamRoundedLight.otf') format("opentype"); 19 | } -------------------------------------------------------------------------------- /repair/migrations/0009_auto_20171118_1535.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-18 10:05 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0008_repairdetails_testdetails'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameModel( 16 | old_name='repairDetails', 17 | new_name='RepairDetail', 18 | ), 19 | migrations.RenameModel( 20 | old_name='testDetails', 21 | new_name='TestDetail', 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /repair/migrations/0013_auto_20171122_1150.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-22 06:20 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0012_auto_20171119_1603'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='enquiry', 17 | name='status', 18 | field=models.CharField(choices=[('EN', 'Enquired'), ('CH', 'Checked'), ('RE', 'Repaired'), ('CO', 'Completed'), ('RJ', 'Rejected')], default='EN', max_length=3), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /Pending Tasks.txt: -------------------------------------------------------------------------------- 1 | Models - checkingDetais(Model), repairDetails(Model) 2 | 3 | EnquiryReceipt - 4 | Disclaimer, 5 | Customer Signature(Alignment - Bottom Left), 6 | Old Computer Depot(Alignment - Bottom Right) 7 | Condition Fetch from Database 8 | 9 | checkStatusRequest - 10 | Reduce Distance Between Cards 11 | 12 | checkStatusShow - 13 | Reduce Distance Between Cards 14 | Add More Information 15 | Fetch Data for checkingDetails 16 | Fetch Data for repairDetails 17 | updateForm - 18 | Reduce Distance Between Cards 19 | Bottom Cards in new Section with flex-direction : row 20 | pendingRequest - 21 | today, this week, this month (JavaScript)+(Button Style) 22 | pendingList - 23 | Style -------------------------------------------------------------------------------- /repair/migrations/0002_auto_20171112_0848.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-12 03:18 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RemoveField( 16 | model_name='enquiry', 17 | name='id', 18 | ), 19 | migrations.AlterField( 20 | model_name='enquiry', 21 | name='receiptID', 22 | field=models.AutoField(primary_key=True, serialize=False), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /repair/migrations/0014_trialperiod.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-22 11:31 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0013_auto_20171122_1150'), 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='trialPeriod', 17 | fields=[ 18 | ('ID', models.AutoField(primary_key=True, serialize=False)), 19 | ('counter', models.IntegerField()), 20 | ('date', models.DateField()), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /repair/migrations/0011_auto_20171118_1824.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-18 12:54 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0010_auto_20171118_1537'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameField( 16 | model_name='repairdetail', 17 | old_name='receiptID', 18 | new_name='Enquiry', 19 | ), 20 | migrations.RenameField( 21 | model_name='testdetail', 22 | old_name='receiptID', 23 | new_name='Enquiry', 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /repair/migrations/0010_auto_20171118_1537.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-18 10:07 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0009_auto_20171118_1535'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='repairdetail', 17 | name='otherCharge', 18 | field=models.IntegerField(blank=True), 19 | ), 20 | migrations.AlterField( 21 | model_name='repairdetail', 22 | name='repairCharge', 23 | field=models.IntegerField(blank=True), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /repair/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from .views import * 4 | 5 | urlpatterns = [ 6 | url(r'^$', dashboard), 7 | url(r'^enquiryForm/', enquiryForm), 8 | url(r'^enquiryReceipt/', enquiryReceipt), 9 | url(r'^enquiryReceiptFrameContent/',enquiryReceiptFrameContent), 10 | url(r'^updateRequest/', updateRequest), 11 | url(r'^updateForm/', updateForm), 12 | url(r'^updateTestDetails/',updateTestDetails), 13 | url(r'^updateRepairDetails/',updateRepairDetails), 14 | url(r'^finalReceipt/', finalReceipt), 15 | url(r'^finalReceiptFrameContent/',finalReceiptFrameContent), 16 | url(r'^pendingRepairRequest/', pendingRepairRequest), 17 | url(r'^pendingRepairList/', pendingRepairList), 18 | url(r'^checkStatusRequest/', checkStatusRequest), 19 | url(r'^checkStatusShow/', checkStatusShow), 20 | ] -------------------------------------------------------------------------------- /repair/static/css/dashboard.css: -------------------------------------------------------------------------------- 1 | .card{ 2 | max-width: 300px; 3 | min-width: 300px; 4 | max-height: 100px; 5 | min-height: 100px; 6 | 7 | display: flex; 8 | justify-content: center; 9 | text-align: center; 10 | align-self: center; 11 | align-items: flex-end; 12 | 13 | padding-bottom: 27px; 14 | 15 | color: white; 16 | background: linear-gradient(45deg,#2196f3,#683BB7); 17 | 18 | border-radius: 0.3em; 19 | 20 | box-shadow: 0px 3px 6px rgba(0,0,0,0.16), 0px 3px 6px rgba(0,0,0,0.23); 21 | transition: all 0.2s cubic-bezier(.25,.8,.25,.1); 22 | 23 | animation-duration: .75s; 24 | animation-name: fadeInUp; 25 | transform-origin: center middle; 26 | } 27 | .card:hover{ 28 | box-shadow: 0px 14px 28px rgba(0,0,0,0.25), 0px 10px 10px rgba(0,0,0,0.22); 29 | transform: scale(1.02); 30 | } -------------------------------------------------------------------------------- /repair/migrations/0005_auto_20171113_0647.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-13 01:17 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0004_auto_20171113_0530'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name='enquiry', 17 | name='contactNo', 18 | field=models.CharField(max_length=20), 19 | ), 20 | migrations.AlterField( 21 | model_name='enquiry', 22 | name='problemCategory', 23 | field=models.CharField(choices=[('HW', 'Hardware'), ('SW', 'Software')], max_length=50), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /repair/migrations/0012_auto_20171119_1603.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-19 10:33 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0011_auto_20171118_1824'), 12 | ] 13 | 14 | operations = [ 15 | migrations.RenameField( 16 | model_name='enquiry', 17 | old_name='condition', 18 | new_name='deviceCondition', 19 | ), 20 | migrations.AlterField( 21 | model_name='enquiry', 22 | name='status', 23 | field=models.CharField(choices=[('EN', 'Enquired'), ('CH', 'Checked'), ('RE', 'Repaired'), ('DO', 'Done'), ('RJ', 'Rejected')], default='EN', max_length=3), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Bucks.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /Bucks/urls.py: -------------------------------------------------------------------------------- 1 | """Bucks URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url, include 17 | from django.contrib import admin 18 | 19 | admin.site.site_header = 'Old Computer Depot' 20 | admin.site.site_title = 'Old Computer Depot' 21 | 22 | from Bucks.views import homepage 23 | 24 | urlpatterns = [ 25 | url(r'^admin/', admin.site.urls), 26 | url(r'^admin/docs/', include('django.contrib.admindocs.urls')), 27 | 28 | url(r'^$',homepage), 29 | url(r'^repair/', include('repair.urls')), 30 | ] -------------------------------------------------------------------------------- /repair/migrations/0006_auto_20171115_0518.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-14 23:48 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0005_auto_20171113_0647'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='enquiry', 17 | name='status', 18 | field=models.CharField(choices=[('EN', 'Enquired'), ('CH', 'Checked'), ('RE', 'Repaired')], default='EN', max_length=3), 19 | ), 20 | migrations.AlterField( 21 | model_name='enquiry', 22 | name='address', 23 | field=models.TextField(blank=True), 24 | ), 25 | migrations.AlterField( 26 | model_name='enquiry', 27 | name='problemCategory', 28 | field=models.CharField(choices=[('HW', 'Hardware'), ('SW', 'Software')], max_length=3), 29 | ), 30 | migrations.AlterField( 31 | model_name='enquiry', 32 | name='problemDescription', 33 | field=models.TextField(blank=True), 34 | ), 35 | ] 36 | -------------------------------------------------------------------------------- /repair/templates/repair/errorPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 |
25 |

Old Computer Depot

26 |
27 |
28 |
29 |




30 |

{{ errorMessage }}

31 | {% if button %} 32 |

33 | 34 | {% endif %} 35 |




36 |
37 |
38 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /repair/templates/repair/finalReceipt.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

Old Computer Depot

19 |
20 | 21 |
22 |
23 |
24 | 25 |

26 | 27 |
28 | 31 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /repair/templates/repair/enquiryReceipt.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

Old Computer Depot

19 |
20 |
21 |
22 |
23 | 24 |

25 | 26 |
27 |
28 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

29 |
30 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /repair/migrations/0007_auto_20171118_1230.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-18 07:00 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('repair', '0006_auto_20171115_0518'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='enquiry', 17 | name='condition', 18 | field=models.TextField(blank=True), 19 | ), 20 | migrations.AlterField( 21 | model_name='enquiry', 22 | name='advance', 23 | field=models.IntegerField(default=0), 24 | ), 25 | migrations.AlterField( 26 | model_name='enquiry', 27 | name='brand', 28 | field=models.CharField(blank=True, max_length=50), 29 | ), 30 | migrations.AlterField( 31 | model_name='enquiry', 32 | name='serialNo', 33 | field=models.CharField(blank=True, max_length=50), 34 | ), 35 | migrations.AlterField( 36 | model_name='enquiry', 37 | name='status', 38 | field=models.CharField(choices=[('EN', 'Enquired'), ('CH', 'Checked'), ('RE', 'Repaired'), ('RJ', 'Rejected')], default='EN', max_length=3), 39 | ), 40 | ] 41 | -------------------------------------------------------------------------------- /repair/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 33 | 34 | 35 | 36 |
37 |

Old Computer Depot

38 |
39 | 40 |
41 | 50 |
51 | 52 |
53 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /repair/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-11 02:34 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Enquiry', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('receiptID', models.IntegerField()), 21 | ('enquiryDate', models.DateTimeField()), 22 | ('customerName', models.CharField(max_length=50)), 23 | ('contactNo', models.IntegerField()), 24 | ('email', models.CharField(blank=True, max_length=50)), 25 | ('address', models.TextField(blank=True, max_length=50)), 26 | ('deviceName', models.CharField(max_length=50)), 27 | ('brand', models.CharField(max_length=50)), 28 | ('deviceType', models.CharField(max_length=50)), 29 | ('serialNo', models.CharField(max_length=50)), 30 | ('problemCategory', models.CharField(max_length=50)), 31 | ('problem', models.CharField(max_length=50)), 32 | ('problemDescription', models.TextField()), 33 | ('estimatedCost', models.IntegerField()), 34 | ('advance', models.IntegerField()), 35 | ], 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /repair/migrations/0008_repairdetails_testdetails.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-18 09:55 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('repair', '0007_auto_20171118_1230'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='repairDetails', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('componentsUsed', models.TextField(blank=True)), 21 | ('repairCharge', models.TextField(blank=True)), 22 | ('otherCharge', models.TextField(blank=True)), 23 | ('totalPrice', models.IntegerField(blank=True)), 24 | ('receiptID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repair.Enquiry')), 25 | ], 26 | ), 27 | migrations.CreateModel( 28 | name='testDetails', 29 | fields=[ 30 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 31 | ('actualProblem', models.CharField(max_length=50)), 32 | ('actualProblemDescription', models.TextField(blank=True)), 33 | ('receiptID', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repair.Enquiry')), 34 | ], 35 | ), 36 | ] 37 | -------------------------------------------------------------------------------- /repair/static/css/checkStatusShow.css: -------------------------------------------------------------------------------- 1 | .contentColumn{ 2 | display: flex; 3 | /* flex-wrap: wrap; */ 4 | 5 | flex-direction: column; 6 | justify-content: flex-start; 7 | 8 | text-align: center; 9 | align-self: center; 10 | align-items: center; 11 | 12 | position: relative; 13 | 14 | min-width: 100%; 15 | max-width: 100%; 16 | min-height: 100vh; 17 | max-height: 100vh; 18 | background: #F4F4F4; 19 | 20 | text-align: center; 21 | } 22 | 23 | .details{ 24 | background: #E6E9EC; 25 | border-radius: 0.4em; 26 | } 27 | 28 | .listContainer{ 29 | min-width: 60%; 30 | max-width: 60%; 31 | 32 | margin-top: 755px; 33 | margin-bottom: 110px; 34 | padding: 10px; 35 | 36 | background-color: white; 37 | 38 | border-radius: 0.3em; 39 | box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); 40 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 41 | 42 | animation-duration: .75s; 43 | animation-name: fadeInUp; 44 | transform-origin: center bottom; 45 | } 46 | 47 | table { 48 | text-align: center; 49 | border-radius: 0.4em; 50 | min-width: 93%; 51 | max-width: 93%; 52 | 53 | font-family: 'gotham rounded light'; 54 | } 55 | 56 | table th { 57 | background: rgba(225,225,225,1); 58 | font-family: 'gotham rounded book'; 59 | padding: 5px; 60 | padding-top: 7px; 61 | padding-bottom: 7px; 62 | } 63 | 64 | table tr { 65 | border-bottom: 1px lightgrey solid; 66 | background: rgba(240,240,240,1); 67 | } 68 | table td { 69 | padding: 5px; 70 | } 71 | 72 | table tr:hover { 73 | background: rgba(235,235,235,1); 74 | border-bottom: 0px lightgrey solid; 75 | cursor: pointer; 76 | } -------------------------------------------------------------------------------- /repair/static/css/receipt.css: -------------------------------------------------------------------------------- 1 | .table { 2 | border: 2px black solid; 3 | display:flex; 4 | 5 | min-width: 100%; 6 | max-width: 100%; 7 | flex-wrap: wrap; 8 | flex-direction: column; 9 | 10 | font-family : 'gotham rounded light'; 11 | } 12 | 13 | .table > section{ 14 | border-bottom: 1px black solid; 15 | } 16 | 17 | .tableHeader { 18 | display:flex; 19 | flex-direction: row; 20 | 21 | min-width: 100%; 22 | max-width: 100%; 23 | } 24 | 25 | figure { 26 | flex: 1; 27 | 28 | background: url('../img/logo.png'); 29 | background-size: cover; 30 | background-position: center; 31 | background-repeat: no-repeat; 32 | 33 | min-height:115px; 34 | max-height:115px; 35 | } 36 | 37 | .tableContactDetails { 38 | padding: 5px; 39 | font-size: 15px; 40 | 41 | font-family: 'gotham rounded book'; 42 | } 43 | 44 | .componentsTable { 45 | margin: 20px; 46 | margin-bottom: 0px; 47 | margin-top: 5px; 48 | 49 | display: flex; 50 | flex-direction: column; 51 | justify-content: flex-start; 52 | 53 | align-self: center; 54 | 55 | min-width: 97%; 56 | max-width: 97%; 57 | 58 | border: 1.5px black solid; 59 | 60 | font-family: 'gotham rounded book'; 61 | } 62 | .componentsTable > section { 63 | display: flex; 64 | flex-direction: row; 65 | justify-content: flex-start; 66 | 67 | border-bottom: 1px black solid; 68 | } 69 | 70 | .componentsTable > section > section { 71 | border-left: 1px black solid; 72 | } 73 | 74 | .componentsTableHeader, .componentsTableFooter { 75 | font-family: 'gotham rounded medium'; 76 | } 77 | 78 | .componentsTableFooter > section { 79 | padding: 2px 0px 2px 0px; 80 | } 81 | 82 | @media print{ 83 | html, body { 84 | transform: scale(0.95) translateY(-25px); 85 | background: white; 86 | } 87 | } -------------------------------------------------------------------------------- /repair/templates/repair/updateRequest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | style="background: {% static 'img/bg.png' %}; opacity: 0px;" 15 | 16 |
17 |

Old Computer Depot

18 |
19 |
20 |
21 |
22 |

Enter Receipt ID



23 | 24 | {% csrf_token %} 25 | 26 |

27 | 28 | 29 |
30 |
31 | 32 |
33 |
34 |

or

35 |





36 |
37 | 38 |
39 |
40 |

Enter Device Serial Number



41 |
42 | {% csrf_token %} 43 | 44 |

45 | 46 |
47 |
48 |
49 |
50 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /repair/templates/repair/pendingRepairRequest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | style="background: {% static 'img/bg.png' %}; opacity: 0px;" 15 | 16 |
17 |

Old Computer Depot

18 |
19 |
20 |
21 |
22 | {% csrf_token %} 23 |

24 |

Pending Repair

25 |

26 | Date From
27 |


28 | Date To
29 |


30 | Today     31 | This Week     32 | This Month 33 |

34 |

35 |
36 |
37 |
38 |
39 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

40 |
41 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /repair/templates/repair/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 | 29 |
30 |

Old Computer Depot

31 |
32 |
33 | 34 | 35 |
36 |

Enquiry

37 |
38 |
39 | 40 |
41 |

Update

42 |
43 |
44 | 45 |
46 |

Pending

47 |
48 |
49 | 50 |
51 |

Check Status

52 |
53 |
54 |
55 | 56 |
57 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

58 |
59 | 60 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /repair/templates/repair/checkStatusRequest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | style="background: {% static 'img/bg.png' %}; opacity: 0px;" 15 | 16 |
17 |

Old Computer Depot

18 |
19 |
20 |
21 |
22 |

Receipt ID



23 |
24 | {% csrf_token %} 25 | 26 | 27 |

28 | 29 |
30 |
31 |
32 |
33 |
34 |

Serial Number



35 |
36 | {% csrf_token %} 37 | 38 |

39 | 40 |
41 |
42 |
43 |
44 |
45 |

Personal Information



46 |
47 | {% csrf_token %} 48 | 49 |

50 | 51 |

52 | 53 |
54 |
55 |
56 |
57 |
58 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /repair/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Enquiry(models.Model): 5 | PROBLEM_CATEGORY_CHOICES = ( 6 | ('HW','Hardware'), 7 | ('SW','Software'), 8 | ) 9 | 10 | STATUS_CHOICES = ( 11 | ('EN','Enquired'), 12 | ('CH','Checked'), # This is amazing 13 | ('RE','Repaired'), # Changed from Update Form when Components are added and Repair Charge is added 14 | ('CO','Completed'), # Changed to when Final Receipt is Generated 15 | ('RJ','Rejected'), 16 | ) 17 | 18 | receiptID = models.AutoField(primary_key=True) 19 | enquiryDate = models.DateField() 20 | 21 | customerName = models.CharField(max_length = 50) 22 | contactNo = models.CharField(max_length = 20) 23 | email = models.CharField(max_length = 50, blank=True) 24 | address = models.TextField(blank=True) 25 | 26 | deviceType = models.CharField(max_length = 50) 27 | brand = models.CharField(max_length = 50, blank=True) 28 | deviceModel = models.CharField(max_length = 50) 29 | serialNo = models.CharField(max_length = 50, blank=True) 30 | 31 | problemCategory = models.CharField(max_length = 3, choices = PROBLEM_CATEGORY_CHOICES) 32 | problem = models.CharField(max_length = 50) 33 | problemDescription = models.TextField(blank=True) 34 | 35 | deviceCondition = models.TextField(blank=True) 36 | 37 | estimatedCost = models.IntegerField() 38 | advance = models.IntegerField(default=0) 39 | 40 | status = models.CharField(max_length=3, choices = STATUS_CHOICES, default='EN') 41 | 42 | def __str__(self): 43 | return str(self.receiptID) + " : " + self.status + " : " + self.customerName + " : " + self.brand + " " + self.deviceModel 44 | 45 | class TestDetail(models.Model): 46 | Enquiry = models.ForeignKey(Enquiry, on_delete=models.CASCADE) 47 | actualProblem = models.CharField(max_length = 50) 48 | actualProblemDescription = models.TextField(blank=True) 49 | 50 | def __str__(self): 51 | return str(self.Enquiry.receiptID) + " : " + str(self.Enquiry.status) + " : " + self.Enquiry.customerName + " : " + self.actualProblem 52 | 53 | class RepairDetail(models.Model): 54 | Enquiry = models.ForeignKey(Enquiry, on_delete=models.CASCADE) 55 | componentsUsed = models.TextField(blank=True) 56 | repairCharge = models.IntegerField(blank=True) 57 | otherCharge = models.IntegerField(blank=True) 58 | totalPrice = models.IntegerField(blank=True) 59 | 60 | def __str__(self): 61 | return str(self.Enquiry.receiptID) + " : " + str(self.Enquiry.status) + " : " + self.Enquiry.customerName + " : " + str(self.totalPrice) 62 | 63 | class trialPeriod(models.Model): 64 | ID = models.AutoField(primary_key=True) 65 | counter = models.IntegerField() 66 | date = models.DateField() -------------------------------------------------------------------------------- /repair/static/css/form.css: -------------------------------------------------------------------------------- 1 | input[type="text"], 2 | input[type="number"], 3 | input[type="password"], 4 | input[type="search"], 5 | input[type="email"], 6 | input[type="date"], 7 | input[type="datetime-local"], 8 | textarea, 9 | select { 10 | max-width: 70%; 11 | min-width: 70%; 12 | background: transparent; 13 | 14 | font-family: var(--font-medium); 15 | color: #2196F3; 16 | font-size: 17px; 17 | 18 | padding: 1% 1%; 19 | 20 | border-color :#f4f4f4; 21 | border-style: solid; 22 | border-style: unset; 23 | border-bottom: 2px rgba(150,150,150,1) solid; 24 | 25 | outline: none; 26 | appearance: none; 27 | box-shadow: none; 28 | } 29 | 30 | input[type="text"]::placeholder, 31 | input[type="number"]::placeholder, 32 | input[type="password"]::placeholder, 33 | input[type="search"]::placeholder, 34 | input[type="email"]::placeholder, 35 | input[type="date"]::placeholder, 36 | input[type="date-local"]::placeholder, 37 | textarea::placeholder 38 | select:placeholder { 39 | color: rgba(150,150,150,1); 40 | opacity: 1; 41 | } 42 | 43 | input[type="button"], 44 | input[type="reset"], 45 | input[type="submit"], 46 | button { 47 | /* background: #2196F3; */ 48 | background: var(--gradient-background); 49 | 50 | font-family: var(--font-medium); 51 | color: #f4f4f4; 52 | font-size: 13px; 53 | letter-spacing: 0.5px; 54 | 55 | border: solid 0px transparent; 56 | border-radius: 0.2em; 57 | padding: 2% 7%; 58 | 59 | outline: none; 60 | appearance: none; 61 | box-shadow: none; 62 | cursor: pointer; 63 | } 64 | 65 | input[type="button"]:focus, 66 | input[type="reset"]:focus, 67 | input[type="submit"]:focus, 68 | input[type="button"]:hover, 69 | input[type="reset"]:hover, 70 | input[type="submit"]:hover, 71 | button:focus, 72 | button:hover { 73 | /*box-shadow: 0px 1px 15px 0px black;*/ 74 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 75 | transition: box-shadow 0.3s; 76 | } 77 | 78 | input[type="text"]:focus, 79 | input[type="number"]:focus, 80 | input[type="password"]:focus, 81 | input[type="search"]:focus, 82 | input[type="email"]:focus, 83 | input[type="date"]:focus, 84 | input[type="datetime-local"]:focus, 85 | textarea:focus, 86 | select:focus { 87 | color: #2196F3; 88 | border-color: #2196F3; 89 | 90 | /* border-image: var(--gradient-background); */ 91 | 92 | transition: 0.5s; 93 | /* transform: scale(1.2); */ 94 | } 95 | 96 | input[type="text"]:hover, 97 | input[type="number"]:hover, 98 | input[type="password"]:hover, 99 | input[type="search"]:hover, 100 | input[type="eamil"]:hover, 101 | input[type="date"]:hover, 102 | input[type="datetime-local"]:hover, 103 | textarea:hover, 104 | select:hover { 105 | /* border-color: ; */ 106 | } 107 | 108 | textarea { 109 | overflow: hidden; 110 | resize: none; 111 | } -------------------------------------------------------------------------------- /repair/templates/repair/enquiryReceiptFrameContent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | {% for i in customerDetails%} 19 |
20 |
21 |
22 |   23 |
24 |
25 |
26 |

Old Computer Depot

27 |

SALES - SERVICE - REPAIR - RENT - BYBACK

28 |
29 |
30 |
31 |
32 | B-41, Dakshin Gangotri, Near Rly. Crossing, Supela, Bhilai, Ph. 0788 4060219 33 |
34 |
35 |
R. No. : {{ i.receiptID }}
36 |
Date : {{ i.enquiryDate }}
37 |
Customer Name : {{ i.customerName }}
38 |
Contact No : {{ i.contactNo }}
39 |
Problem : {{ i.problem }}
40 |
Problem Description : {{ i.problemDescription }}
41 |
Device Condition : {{ i.deviceCondition }}
42 |
43 |
44 |
Estimated Cost : {{ i.estimatedCost }}
45 |
Advance : {{ i.advance }}
46 |
47 |
48 |

ध्यान दें :-

49 |

1. कृप्या इस रसीद को माल ले जाते वक्त साथ लावे|

50 |

2. 10 दिन के भीतर सामान ले जावे , अन्यथा हमारी जवाबदारी नहीं होगी।

51 |

3. अपने उपकरण को रिपेयर, सर्विस के लिए देते वक्त अपना डाटा सुरक्षित रखे, डाटा डिलीट होने पर हमारी जवाबदारी नहीं होगी।

52 |

4. रिपेयर होने के पश्यात आपके उपकरण में कोई और परेशानी आती है तो उसकी जवाबदारी हमारी नहीं होगी।

53 |
54 |
55 |
Customer Signature
56 |
Old Computer Depot
57 |
58 |
59 | {% endfor %} 60 |
61 | 62 | -------------------------------------------------------------------------------- /repair/templates/repair/enquiryForm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |

Old Computer Depot

17 |
18 |
19 |
20 |
21 | {% csrf_token %} 22 |

23 |

Enquiry Form

24 |

25 |

26 |

27 |

28 |

29 |

30 |

31 |
32 |

33 |
34 |

35 |

36 |

37 | 38 |

39 |

40 |
41 |
42 |

43 |
44 | 45 |

50 |

51 |

52 |
53 |

54 |
55 |

56 |


57 |

58 | 59 |
60 |
61 |
62 |
63 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /repair/templates/repair/pendingRepairList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 65 | 66 | 67 | 68 |
69 |

Old Computer Depot

70 |
71 | 72 |
73 |
74 |
75 |
76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | {% for i in pendingRepairs %} 88 | 89 | 90 | {% csrf_token %} 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | {% endfor %} 101 | 102 | 103 | 104 |

Pending Repair Tasks


Receipt IDEnquiry DateDeviceDevice TypeProblem
{{ i.receiptID }}{{ i.enquiryDate }}{{ i.brand }} {{ i.deviceModel }}{{ i.deviceType }}{{ i.problem }}

105 |
106 |
107 |
108 |
109 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

110 |
111 | 112 | 113 | -------------------------------------------------------------------------------- /Bucks/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for Bucks project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11.7. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = ')5az3&z10_k&ijl20f=ansf_k8b(_s9aw4@))^&fp7)3a9jysu' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.admindocs', 36 | 'django.contrib.auth', 37 | 'django.contrib.contenttypes', 38 | 'django.contrib.sessions', 39 | 'django.contrib.messages', 40 | 'django.contrib.staticfiles', 41 | 'repair.apps.RepairConfig' 42 | ] 43 | 44 | MIDDLEWARE = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.messages.middleware.MessageMiddleware', 51 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 52 | ] 53 | 54 | ROOT_URLCONF = 'Bucks.urls' 55 | 56 | TEMPLATES = [ 57 | { 58 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 59 | 'DIRS': [], 60 | 'APP_DIRS': True, 61 | 'OPTIONS': { 62 | 'context_processors': [ 63 | 'django.template.context_processors.debug', 64 | 'django.template.context_processors.request', 65 | 'django.contrib.auth.context_processors.auth', 66 | 'django.contrib.messages.context_processors.messages', 67 | ], 68 | }, 69 | }, 70 | ] 71 | 72 | WSGI_APPLICATION = 'Bucks.wsgi.application' 73 | 74 | 75 | # Database 76 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 77 | 78 | DATABASES = { 79 | 'default': { 80 | 'ENGINE': 'django.db.backends.sqlite3', 81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 82 | } 83 | } 84 | 85 | 86 | # Password validation 87 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 88 | 89 | AUTH_PASSWORD_VALIDATORS = [ 90 | { 91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 92 | }, 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 101 | }, 102 | ] 103 | 104 | 105 | # Internationalization 106 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 107 | 108 | LANGUAGE_CODE = 'en-us' 109 | 110 | TIME_ZONE = 'Asia/Kolkata' 111 | 112 | USE_I18N = True 113 | 114 | USE_L10N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 121 | 122 | STATIC_URL = '/static/' 123 | 124 | #STATIC_ROOT = os.path.join(BASE_DIR, 'static') -------------------------------------------------------------------------------- /repair/static/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('form.css'); 2 | @import url('fonts.css'); 3 | @import url('dashboard.css'); 4 | 5 | :root { 6 | --primary-color: #2196f3; 7 | --gradient-background: linear-gradient(45deg,#2196f3,#683BB7); 8 | /* --gradient-background: linear-gradient(45deg,deeppink,orangered); */ 9 | 10 | --font-light: "gotham rounded light"; 11 | --font-book: "gotham rounded book"; 12 | --font-medium: "gotham rounded medium"; 13 | --font-bold: "gotham rounded bold"; 14 | } 15 | 16 | * { 17 | box-sizing: border-box; 18 | margin: 0px; 19 | padding: 0px; 20 | } 21 | 22 | body { 23 | min-height: 100vh; 24 | background: #F4F4F4; 25 | /* background: #FAFAFA;*/ 26 | /* background: #FF4081; */ 27 | 28 | font-family: var(--font-medium); 29 | } 30 | 31 | header{ 32 | min-width: 100%; 33 | max-width: 100%; 34 | max-height: 70px; 35 | min-height: 70px; 36 | 37 | padding-top: 1%; 38 | padding-bottom: 1%; 39 | 40 | position: fixed; 41 | z-index: 999; 42 | top: 0px; 43 | left: 0px; 44 | 45 | display: flex; 46 | justify-content: center; 47 | align-self: center; 48 | align-items: center; 49 | text-align: center; 50 | 51 | /* background: #2196f3; */ 52 | background: var(--gradient-background); 53 | font-family: var(--font-book); 54 | color: white; 55 | 56 | box-shadow: 0px 3px 6px rgba(0,0,0,0.16), 0px 3px 6px rgba(0,0,0,0.23); 57 | } 58 | 59 | .content{ 60 | display: flex; 61 | flex-wrap: wrap; 62 | 63 | justify-content: space-around; 64 | 65 | text-align: center; 66 | align-self: center; 67 | align-items: flex-start; 68 | 69 | position: relative; 70 | 71 | min-width: 100%; 72 | max-width: 100%; 73 | min-height: 100vh; 74 | max-height: 100vh; 75 | background: #F4F4F4; 76 | 77 | text-align: center; 78 | } 79 | 80 | .login{ 81 | min-width: 30%; 82 | max-width: 30%; 83 | min-height: 222px; 84 | max-height: 222px; 85 | 86 | background-color: white; 87 | 88 | border-radius: 0.3em; 89 | 90 | box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); 91 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 92 | 93 | animation-duration: .75s; 94 | animation-name: bounceIn; 95 | transform-origin: center middle; 96 | } 97 | 98 | .login:hover { 99 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 100 | transform: scale(1.1); 101 | } 102 | 103 | .formContainer{ 104 | min-width: 40%; 105 | max-width: 40%; 106 | 107 | margin-top: 100px; 108 | margin-bottom: 110px; 109 | padding: 10px; 110 | 111 | background-color: white; 112 | 113 | border-radius: 0.3em; 114 | box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); 115 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 116 | 117 | animation-duration: .75s; 118 | animation-name: fadeInUp; 119 | transform-origin: center bottom; 120 | } 121 | 122 | .formContainer:hover { 123 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 124 | /* transform: scale(1.02); */ 125 | } 126 | 127 | @media only screen and (max-width: 800px){ 128 | .login { 129 | top: none; 130 | right: none; 131 | min-width: 70%; 132 | max-width: 70%; 133 | } 134 | .login:hover { 135 | transform: none; 136 | } 137 | .formContainer{ 138 | min-width: 90%; 139 | max-width: 90%; 140 | } 141 | } 142 | .formContainer a { 143 | text-decoration: none; 144 | 145 | color: #2196f3; 146 | border: 1.5px #2196f3 solid; 147 | 148 | padding: 5px 9px 5px 9px; 149 | border-radius: 0.2em; 150 | } 151 | 152 | .formContainer a:hover { 153 | color:#683BB7; 154 | border: 1.5px #683BB7 solid; 155 | } 156 | 157 | footer{ 158 | display: flex; 159 | justify-content: center; 160 | flex-direction: column; 161 | text-align: center; 162 | 163 | min-width: 100%; 164 | max-width: 100%; 165 | 166 | position: fixed; 167 | bottom: 0px; 168 | left: 0px; 169 | z-index: 999; 170 | 171 | margin-top: 5%; 172 | margin-bottom: 0px; 173 | padding-top: 21px; 174 | padding-bottom: 21px; 175 | 176 | font-family: var(--font-book); 177 | 178 | background: rgba(0,0,0,0.8); 179 | color: white; 180 | } 181 | 182 | @keyframes fadeInUp { 183 | from { 184 | opacity: 0; 185 | transform: translate3d(0, 100%, 0); 186 | } 187 | 188 | to { 189 | opacity: 1; 190 | transform: none; 191 | } 192 | } -------------------------------------------------------------------------------- /repair/templates/repair/finalReceiptFrameContent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 |
21 |   22 |
23 |
24 |
25 |

Old Computer Depot

26 |

SALES - SERVICE - REPAIR - RENT - BYBACK

27 |
28 |
29 |
30 |
31 | B-41, Dakshin Gangotri, Near Rly. Crossing, Supela, Bhilai, Ph. 0788 4060219 32 |
33 | {% for i in customerDetails %} 34 |
35 |
R. No. : {{ i.receiptID }} 
36 |
Date : {{ i.enquiryDate }}
37 |
Customer Name : {{ i.customerName }}
38 |
Contact No : {{ i.contactNo }}
39 | {% for j in testDetails %} 40 |
Problem : {{ j.actualProblem }}
41 |
Problem Description : {{ j.actualProblemDescription }}
42 | {% endfor %} 43 |
Device Condition : {{ i.deviceCondition }}
44 |
45 | {% endfor %} 46 | 47 | {% if componentsUsed %} 48 |
49 |
50 |
Components Used
51 |
52 |
53 |
S No.
54 |
Items
55 |
Price
56 |
57 | {% for i in componentsUsed %} 58 |
59 |
{{ forloop.counter }}
60 | {% for j in i %} 61 |
{{ j }}
62 | {% endfor %} 63 |
64 | {% endfor %} 65 |
66 |
Total   
67 |
{{ componentsUsedPriceTotal }}
68 |
69 |
70 | {% endif %} 71 | 72 |
73 |
74 |
Final Bill
75 |
76 |
77 |
S No.
78 |
Services
79 |
Price
80 |
81 |
82 |
1
83 |
Components Used Charge
84 |
{% if componentsUsedPriceTotal %} {{ componentsUsedPriceTotal }} {% else %} 0 {% endif %}
85 |
86 |
87 |
2
88 |
Repair Charge
89 |
{% for i in repairDetails %}{{ i.repairCharge }}{% endfor %}
90 |
91 |
92 |
3
93 |
Other Charges
94 |
{% for i in repairDetails %}{{ i.otherCharge }}{% endfor %}
95 |
96 |
97 |
Total Repair Charge   
98 |
{% for i in repairDetails %}{{ i.totalPrice }}{% endfor %}
99 |
100 |
101 |
Advance   
102 |
{% for i in customerDetails %}{{ i.advance }}{% endfor %}
103 |
104 |
105 |
Balance   
106 |
{{ balance }}
107 |
108 |
109 | 110 |
111 |
Customer Signature
112 |
Old Computer Depot
113 |
114 |
115 |
116 | 117 | -------------------------------------------------------------------------------- /repair/templates/repair/checkStatusShow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Status - Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

Old Computer Depot

19 |
20 | 21 |
22 | {% for i in customerDetails %} 23 |
24 |
25 |
26 |
27 |

Receipt ID : {{ i.receiptID }}

28 |
29 |
30 |

Status : 31 | {% ifequal "EN" i.status %} 32 | Enquired 33 | {% endifequal %} 34 | {% ifequal "CH" i.status %} 35 | Checked 36 | {% endifequal %} 37 | {% ifequal "RE" i.status %} 38 | Repaired 39 | {% endifequal %} 40 | {% ifequal "CO" i.status %} 41 | Completed 42 | {% endifequal %} 43 |

44 | 45 |

46 |
47 |
48 |

Enquiry Date : {{ i.enquiryDate }}

49 |
50 |
51 |
52 |
53 |
54 |

{{ i.customerName }}

55 |
56 |
57 |
58 |

{{i.brand}} {{i.deviceModel}}

59 |
60 |
61 |

Serial No. : {{ i.serialNo }}

62 |
63 |
64 |
65 |
66 |

Contact Details :

67 |
68 |
69 |

{{ i.contactNo }}

70 |
71 |
72 |

{{ i.email }}

73 |
74 |
75 |

{{ i.address }}

76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |

Problem : {{ i.problem }}

84 |
85 |
86 |

Problem Category : 87 | {% ifequal "HW" i.problemCategory %} 88 | Hardware 89 | {% endifequal %} 90 | {% ifequal "SW" i.problemCategory %} 91 | Software 92 | {% endifequal %} 93 |

94 |
95 |
96 |
97 |
98 |

Problem Description : {{ i.problemDescription }}

99 |
100 |
101 |
102 |

Device Condition : {{ i.deviceCondition }}

103 |
104 |
105 | {% endfor %} 106 | 107 | {% for i in customerDetails %} 108 |
109 | {% if testDetails %} 110 |
111 |
112 |

Actual Problem

113 |
114 | {% for i in testDetails%} 115 |

Actual Problem : {{ i.actualProblem }}

116 |

Actual Problem Description : {{ i.actualProblemDescription }}

117 | {% endfor %} 118 |
119 | {% else %} 120 |
121 |
122 |

Actual Problem

123 |
124 |

No Details Available : Device is not checked

125 |
126 |
127 |
128 | {% csrf_token %} 129 | 130 | 131 | 132 |
133 |
134 | {% endif %} 135 |
136 | {% endfor %} 137 |
138 | 139 |
140 |
141 | {% if repairDetails %} 142 |
143 |
144 |

Repair Description

145 |
146 |
147 |
148 | {% if componentsUsed %} 149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | {% for component in componentsUsed %} 159 | 160 | {% for j in component%} 161 | 162 | {% endfor %} 163 | 164 | {% endfor %} 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 |

Components Used


ComponentsPrice
{{ j }}
Total{{ componentsUsedPriceTotal }}

173 |
174 |
175 | {% endif %} 176 |
177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 |

Total Price


ServicesPrice
Components Used Charge{% if componentsUsedPriceTotal %} {{ componentsUsedPriceTotal }} {% else %} 0 {% endif %}
Repair Charge{% for i in repairDetails %}{{ i.repairCharge }}{% endfor %}
Other Charge{% for i in repairDetails %}{{ i.otherCharge }}{% endfor %}
Total Repair Charge{% for i in repairDetails %}{{ i.totalPrice }}{% endfor %}
Advance{% for i in customerDetails %}{{ i.advance }}{% endfor %}
Balance{{ balance }}

213 |
214 |
215 | 216 | {% else %} 217 |
218 |
219 |

Repair Details

220 |
221 |

No Details Available : Device is not repaired

222 |
223 |
224 |
225 | {% csrf_token %} 226 | 227 | 228 | 229 |
230 |
231 | {% endif %} 232 |
233 |
234 |
235 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

236 |
237 | 238 | 239 | -------------------------------------------------------------------------------- /repair/templates/repair/updateForm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Old Computer Depot 5 | 6 | 7 | {% load static %} 8 | {% load staticfiles %} 9 | 10 | 11 | 12 | 13 | 14 | 92 | 93 | 94 | 95 |
96 |

Old Computer Depot

97 |
98 | 99 |
100 |
101 |

Update Details

102 |
103 |
104 |
105 | {% for i in customerDetails %} 106 |
107 |
108 |

Receipt ID : {{ i.receiptID }}

109 |
110 |
111 |

Status : 112 | {% ifequal "EN" i.status %} 113 | Enquired 114 | {% endifequal %} 115 | {% ifequal "CH" i.status %} 116 | Checked 117 | {% endifequal %} 118 | {% ifequal "RE" i.status %} 119 | Repaired 120 | {% endifequal %} 121 | {% ifequal "CO" i.status %} 122 | Completed 123 | {% endifequal %} 124 |

125 | 126 |

127 |
128 |
129 |

Enquiry Date : {{ i.enquiryDate }}

130 |
131 |
132 |
133 |
134 |
135 |

{{ i.customerName }}

136 |
137 |
138 |
139 |

{{i.brand}} {{i.deviceModel}}

140 |
141 |
142 |

Serial No. : {{ i.serialNo }}

143 |
144 |
145 |
146 |
147 |

Contact Details :

148 |
149 |
150 |

{{ i.contactNo }}

151 |
152 |
153 |

{{ i.email }}

154 |
155 |
156 |

{{ i.address }}

157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |

Problem : {{ i.problem }}

165 |
166 |
167 |

Problem Category : 168 | {% ifequal "HW" i.problemCategory %} 169 | Hardware 170 | {% endifequal %} 171 | {% ifequal "SW" i.problemCategory %} 172 | Software 173 | {% endifequal %} 174 |

175 |
176 |
177 |
178 |
179 |

Problem Description : {{ i.problemDescription }}

180 |
181 |
182 |
183 |

Device Condition : {{ i.deviceCondition }}

184 |
185 | {% endfor %} 186 |
187 |
188 | {% if testDetails %} 189 |
190 |
191 |
192 |

Actual Problem

193 |
194 | {% for i in testDetails%} 195 |

Actual Problem : {{ i.actualProblem }}

196 |

Actual Problem Description : {{ i.actualProblemDescription }}

197 | {% endfor %} 198 |
199 |
200 |
201 | {% else %} 202 |
203 |
204 | {% csrf_token %} 205 |

206 |

Actual Problem Description

207 |

208 | {% for i in customerDetails %} 209 | 210 | {% endfor %} 211 |

212 |

213 |

214 |
215 |
216 | {% endif %} 217 | 218 | 219 | {% if repairDetails %} 220 |
221 |
222 |
223 |

Repair Description

224 |
225 |
226 |
227 | {% if componentsUsed %} 228 |
229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | {% for component in componentsUsed %} 238 | 239 | {% for j in component %} 240 | 241 | {% endfor %} 242 | 243 | {% endfor %} 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 |

Components Used


ComponentsPrice
{{ j }}
Total{{ componentsUsedPriceTotal }}

252 |
253 |
254 | {% endif %} 255 |
256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 |

Total Price


ServicesPrice
Components Used Charge{% if componentsUsedPriceTotal %} {{ componentsUsedPriceTotal }} {% else %} 0 {% endif %}
Repair Charge{% for i in repairDetails %}{{ i.repairCharge }}{% endfor %}
Other Charge{% for i in repairDetails %}{{ i.otherCharge }}{% endfor %}
Total Repair Charge{% for i in repairDetails %}{{ i.totalPrice }}{% endfor %}
Advance{% for i in customerDetails %}{{ i.advance }}{% endfor %}
Balance{{ balance }}

292 |
293 |
294 | 295 |
296 |
297 | 298 | {% else %} 299 | 300 |
301 |
302 |
303 | {% csrf_token %} 304 |

305 |

Add Components

306 |

307 | {% for i in customerDetails %} 308 | 309 | {% endfor %} 310 | 311 |

312 |

313 | 314 |      315 |

316 |
317 | 318 |
319 |
320 |
321 |

322 |

Repair Charge

323 |

324 | 325 |

326 |

327 |

328 | 329 |
330 |
331 | {% endif %} 332 |
333 |
334 |

Developed By : Jitendra Nirnejak (7869290297), Nishant Kumar Sahu (9407940408) and Aadarsh Gupta

335 |
336 | 353 | 354 | 355 | 356 | -------------------------------------------------------------------------------- /repair/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from django.http import HttpResponse 3 | 4 | from django.contrib.auth import authenticate 5 | 6 | from django.core.exceptions import ObjectDoesNotExist, EmptyResultSet 7 | 8 | import datetime 9 | 10 | from repair.models import * 11 | 12 | # Create your views here. 13 | def dashboard(request): 14 | getDate = trialPeriod.objects.get(ID=1) 15 | if getDate.date != datetime.datetime.now().date(): 16 | getDate.counter += 1 17 | getDate.save() 18 | 19 | if (getDate.counter > 7): 20 | message = { 21 | 'errorMessage':'Trial Period Expired', 22 | } 23 | return render(request,'repair/errorPage.html', message) 24 | 25 | if(request.method == 'POST'): 26 | 27 | username = request.POST.get('username',''); 28 | password = request.POST.get('password',''); 29 | 30 | user = authenticate(username=username, password=password) 31 | if user is not None: 32 | return render(request,'repair/dashboard.html') 33 | else: 34 | message = { 35 | 'errorMessage':'Invalid Login Credentials', 36 | 'button':'../', 37 | 'buttonText':'Login', 38 | } 39 | return render(request,'repair/errorPage.html', message) 40 | else: 41 | message = { 42 | 'errorMessage':'You must login first', 43 | 'button':'../', 44 | 'buttonText':'Login', 45 | } 46 | return render(request,'repair/errorPage.html', message) 47 | 48 | 49 | def enquiryForm(request): 50 | Id = Enquiry.objects.latest('receiptID') 51 | #Id = Enquiry.objects.earliest('receiptID') 52 | Id.receiptID +=1 53 | 54 | currentDate = datetime.datetime.now().date() 55 | currentDate = str(currentDate) 56 | 57 | return render(request,'repair/enquiryForm.html', {'receiptID': Id.receiptID, 'currentDate' : currentDate}) 58 | 59 | def enquiryReceipt(request): 60 | if(request.method == 'POST'): 61 | enquiryDate = request.POST.get('enquiryDate', datetime.datetime.now().date()) 62 | customerName = request.POST.get('customerName','') 63 | contactNo = request.POST.get('contactNo','') 64 | email = request.POST.get('email','') 65 | address = request.POST.get('address','') 66 | 67 | deviceType = request.POST.get('deviceType','') 68 | brand = request.POST.get('brand','') 69 | deviceModel = request.POST.get('deviceModel','') 70 | serialNo = request.POST.get('serialNo','') 71 | deviceCondition = request.POST.get('deviceCondition','') 72 | 73 | problemCategory = request.POST.get('problemCategory','') 74 | problem = request.POST.get('problem','') 75 | problemDescription = request.POST.get('problemDescription','') 76 | 77 | estimatedCost = request.POST.get('estimatedCost',0) 78 | advance = request.POST.get('advance',0) 79 | 80 | if advance == '': 81 | advance = 0 82 | 83 | enq = Enquiry(enquiryDate=enquiryDate, customerName=customerName, contactNo = contactNo, email=email, address=address, deviceType = deviceType, brand=brand, deviceModel= deviceModel, serialNo = serialNo, deviceCondition=deviceCondition, problemCategory = problemCategory, problem = problem, problemDescription = problemDescription, estimatedCost = estimatedCost, advance = advance) 84 | enq.save() 85 | 86 | enquiryObject = Enquiry.objects.latest('receiptID') 87 | return render(request,'repair/enquiryReceipt.html', {'receiptID' : enquiryObject.receiptID}) 88 | else: 89 | message = { 90 | 'errorMessage':'Invalid Request', 91 | } 92 | return render(request,'repair/errorPage.html', message) 93 | 94 | def enquiryReceiptFrameContent(request): 95 | if(request.method=='GET'): 96 | receiptID = request.GET.get('receiptID','') 97 | 98 | customerDetails = Enquiry.objects.filter(receiptID = receiptID) 99 | 100 | return render(request, 'repair/enquiryReceiptFrameContent.html', {'customerDetails' : customerDetails}) 101 | else: 102 | message = { 103 | 'errorMessage':'Invalid Request', 104 | } 105 | return render(request,'repair/errorPage.html', message) 106 | 107 | 108 | def updateRequest(request): 109 | return render(request,'repair/updateRequest.html') 110 | 111 | def updateForm(request): 112 | if(request.method=='POST'): 113 | if(request.POST.get('requestType','')=='receiptID'): 114 | receiptID = request.POST.get('receiptID',0) 115 | customerDetails = Enquiry.objects.filter(receiptID = receiptID) 116 | 117 | try: 118 | enquiryInstance = Enquiry.objects.get(receiptID = receiptID) 119 | except ObjectDoesNotExist: 120 | message = { 121 | 'errorMessage':'No Record Exists for Receipt ID/No : ' + receiptID, 122 | } 123 | return render(request,'repair/errorPage.html', message) 124 | elif(request.POST.get('requestType','')=='serialNo'): 125 | serialNo = request.POST.get('serialNo','') 126 | 127 | customerDetails = Enquiry.objects.filter(serialNo = serialNo) 128 | 129 | try: 130 | enquiryInstance = Enquiry.objects.get(serialNo = serialNo) 131 | except ObjectDoesNotExist: 132 | message = { 133 | 'errorMessage':'No Record Exists for Device Serial No. : ' + serialNo, 134 | } 135 | return render(request,'repair/errorPage.html', message) 136 | else: 137 | message = { 138 | 'errorMessage':'Undefined Request Type', 139 | } 140 | return render(request,'repair/errorPage.html', message) 141 | 142 | # Add logic Here 143 | # Check Status 144 | if customerDetails[0].status == 'EN': 145 | data = { 146 | 'customerDetails' : customerDetails, 147 | } 148 | return render(request, 'repair/updateForm.html', data) 149 | elif customerDetails[0].status == 'CH': 150 | testDetails = TestDetail.objects.filter(Enquiry = enquiryInstance) 151 | data = { 152 | 'customerDetails' : customerDetails, 153 | 'testDetails' : testDetails, 154 | } 155 | return render(request, 'repair/updateForm.html', data) 156 | elif customerDetails[0].status == 'RE' or customerDetails[0].status == 'CO': 157 | testDetails = TestDetail.objects.filter(Enquiry = enquiryInstance) 158 | repairDetails = RepairDetail.objects.filter(Enquiry = enquiryInstance) 159 | componentsUsed = str(repairDetails[0].componentsUsed) 160 | 161 | componentsUsedBackup = str(componentsUsed) 162 | componentsUsed = componentsUsed.split('~') 163 | componentsUsed = [i.split(':') for i in componentsUsed] 164 | del(componentsUsed[0]) 165 | componentsUsedPriceTotal = str(sum([int(i[1]) for i in componentsUsed])) 166 | 167 | balance = int(repairDetails[0].totalPrice) - int(customerDetails[0].advance) 168 | 169 | data = { 170 | 'customerDetails' : customerDetails, 171 | 'testDetails' : testDetails, 172 | 'repairDetails' : repairDetails, 173 | 'componentsUsed' : componentsUsed, 174 | 'componentsUsedPriceTotal' : componentsUsedPriceTotal, 175 | 'balance' : balance, 176 | } 177 | return render(request, 'repair/updateForm.html', data) 178 | elif customerDetails[0].status == 'RJ': 179 | message = { 180 | 'errorMessage':'This Record is Rejected', 181 | } 182 | return render(request,'repair/errorPage.html', message) 183 | else: 184 | message = { 185 | 'errorMessage':'Your Database contains some invalid values for Enquiry.Status', 186 | } 187 | return render(request,'repair/errorPage.html', message) 188 | else: 189 | message = { 190 | 'errorMessage':'Invalid Request', 191 | } 192 | return render(request,'repair/errorPage.html', message) 193 | 194 | def updateTestDetails(request): 195 | if(request.method=='POST'): 196 | receiptID = request.POST.get('receiptID','') 197 | actualProblem = request.POST.get('actualProblem','') 198 | actualProblemDescription = request.POST.get('actualProblemDescription','') 199 | enquiryObj = Enquiry.objects.get(receiptID=receiptID) 200 | # Changing Status 201 | enquiryObj.status = 'CH' 202 | enquiryObj.save() 203 | # Updating Test Details 204 | testDetailsObj = TestDetail(Enquiry = enquiryObj, actualProblem = actualProblem, actualProblemDescription = actualProblemDescription) 205 | testDetailsObj.save() 206 | message = { 207 | 'errorMessage':'Checking Details Updated Successfully', 208 | 'button':'../', 209 | 'buttonText':'Back', 210 | } 211 | return render(request,'repair/errorPage.html', message) 212 | else: 213 | message = { 214 | 'errorMessage':'Invalid Request', 215 | 'button':'../', 216 | 'buttonText':'Back', 217 | } 218 | return render(request,'repair/errorPage.html', message) 219 | 220 | def updateRepairDetails(request): 221 | if(request.method=='POST'): 222 | receiptID = request.POST.get('receiptID','') 223 | componentsUsed = request.POST.get('componentsUsed','') 224 | repairCharge = request.POST.get('repairCharge',0) 225 | otherCharge = request.POST.get('otherCharge',0) 226 | 227 | if repairCharge == '': 228 | repairCharge = 0 229 | 230 | if otherCharge == '': 231 | otherCharge = 0 232 | 233 | # Changing Status 234 | enquiryObj = Enquiry.objects.get(receiptID=receiptID) 235 | enquiryObj.status = 'RE' 236 | enquiryObj.save() 237 | 238 | 239 | if (componentsUsed != ''): 240 | componentsUsedBackup = str(componentsUsed) 241 | componentsUsed = componentsUsed.split('~') 242 | componentsUsed = [i.split(':') for i in componentsUsed] 243 | del(componentsUsed[0]) 244 | componentsUsedPrice = [int(i[1]) for i in componentsUsed] 245 | 246 | totalPrice = sum(componentsUsedPrice) + int(repairCharge) + int(otherCharge) 247 | 248 | componentsUsed = str(componentsUsedBackup) 249 | else: 250 | totalPrice = int(repairCharge) + int(otherCharge) 251 | 252 | # Updating Repair Details 253 | repairDetailsObj = RepairDetail(Enquiry = enquiryObj, componentsUsed = componentsUsed, repairCharge = repairCharge, otherCharge = otherCharge, totalPrice = totalPrice) 254 | repairDetailsObj.save() 255 | 256 | message = { 257 | 'errorMessage':'Repair Details Updated Successfully', 258 | 'button': '../finalReceipt?&receiptID='+ receiptID, 259 | 'buttonText':'Generate Final Bill', 260 | } 261 | return render(request,'repair/errorPage.html', message) 262 | else: 263 | message = { 264 | 'errorMessage':'Invalid Request', 265 | 'button':'../', 266 | 'buttonText':'Back', 267 | } 268 | return render(request,'repair/errorPage.html', message) 269 | 270 | def finalReceipt(request): 271 | if(request.method=='GET'): 272 | receiptID = request.GET.get('receiptID','') 273 | 274 | # Changing Status 275 | enquiryObj = Enquiry.objects.get(receiptID=receiptID) 276 | enquiryObj.status = 'CO' 277 | enquiryObj.save() 278 | 279 | data = { 280 | 'receiptID' : receiptID, 281 | } 282 | return render(request, 'repair/finalReceipt.html', data) 283 | else: 284 | message = { 285 | 'errorMessage':'Invalid Request', 286 | } 287 | return render(request,'repair/errorPage.html', message) 288 | def finalReceiptFrameContent(request): 289 | if(request.method=='GET'): 290 | receiptID = request.GET.get('receiptID','') 291 | customerDetails = Enquiry.objects.filter(receiptID = receiptID) 292 | enquiryInstance = Enquiry.objects.get(receiptID = receiptID) 293 | 294 | testDetails = TestDetail.objects.filter(Enquiry = enquiryInstance) 295 | repairDetails = RepairDetail.objects.filter(Enquiry = enquiryInstance) 296 | 297 | componentsUsed = str(repairDetails[0].componentsUsed) 298 | 299 | componentsUsedBackup = str(componentsUsed) 300 | componentsUsed = componentsUsed.split('~') 301 | componentsUsed = [i.split(':') for i in componentsUsed] 302 | del(componentsUsed[0]) 303 | componentsUsedPriceTotal = str(sum([int(i[1]) for i in componentsUsed])) 304 | 305 | balance = int(repairDetails[0].totalPrice) - int(customerDetails[0].advance) 306 | 307 | data = { 308 | 'customerDetails' : customerDetails, 309 | 'testDetails' : testDetails, 310 | 'repairDetails' : repairDetails, 311 | 'componentsUsed' : componentsUsed, 312 | 'componentsUsedPriceTotal' : componentsUsedPriceTotal, 313 | 'balance' : balance, 314 | } 315 | return render(request, 'repair/finalReceiptFrameContent.html', data) 316 | else: 317 | message = { 318 | 'errorMessage':'Invalid Request', 319 | } 320 | return render(request,'repair/errorPage.html', message) 321 | 322 | 323 | def pendingRepairRequest(request): 324 | today = datetime.date.today() 325 | weekAgo = today - datetime.timedelta(days=7) 326 | monthAgo = today - datetime.timedelta(days=30) 327 | today, weekAgo, monthAgo = str(today), str(weekAgo), str(monthAgo) 328 | dates = { 329 | 'today' : today, 330 | 'weekAgo' : weekAgo, 331 | 'monthAgo' : monthAgo, 332 | } 333 | return render(request,'repair/pendingRepairRequest.html', dates) 334 | 335 | def pendingRepairList(request): 336 | if(request.method=='POST'): 337 | dateFrom = request.POST.get('dateFrom','') 338 | dateTo = request.POST.get('dateTo','') 339 | #Sample.objects.filter(date__year='2011', date__month='01') 340 | pendingRepairs = Enquiry.objects.filter(enquiryDate__range = [dateFrom, dateTo], status = 'EN') 341 | return render(request, 'repair/pendingRepairList.html', {'pendingRepairs' : pendingRepairs}) 342 | else: 343 | message = { 344 | 'errorMessage':'Invalid Request', 345 | } 346 | return render(request,'repair/errorPage.html', message) 347 | 348 | def checkStatusRequest(request): 349 | return render(request,'repair/checkStatusRequest.html') 350 | 351 | def checkStatusShow(request): 352 | if(request.method=='POST'): 353 | if(request.POST['requestType']=='receiptID'): 354 | receiptID = request.POST.get('receiptID','') 355 | 356 | customerDetails = Enquiry.objects.filter(receiptID = receiptID) 357 | 358 | try: 359 | enquiryInstance = Enquiry.objects.get(receiptID = receiptID) 360 | except ObjectDoesNotExist: 361 | message = { 362 | 'errorMessage':'No Record Exists for Receipt ID/No : ' + receiptID, 363 | } 364 | return render(request,'repair/errorPage.html', message) 365 | elif(request.POST.get('requestType','')=='serialNo'): 366 | serialNo = request.POST.get('serialNo','') 367 | 368 | customerDetails = Enquiry.objects.filter(serialNo = serialNo) 369 | 370 | try : 371 | enquiryInstance = Enquiry.objects.get(serialNo = serialNo) 372 | except ObjectDoesNotExist: 373 | message = { 374 | 'errorMessage':'No Record Exists for Device Serial No : ' + serialNo, 375 | } 376 | return render(request,'repair/errorPage.html', message) 377 | 378 | elif(request.POST.get('requestType','')=='personalDetails'): 379 | customerName = request.POST.get('customerName','') 380 | contactNo = request.POST.get('contactNo','') 381 | 382 | customerDetails = Enquiry.objects.filter(contactNo = contactNo).filter(customerName = customerName) 383 | 384 | try: 385 | enquiryInstance = Enquiry.objects.get(contactNo = contactNo, customerName = customerName) 386 | except ObjectDoesNotExist: 387 | message = { 388 | 'errorMessage':'No Record Exists for Customer : ' + customerName + " with Contact No " + contactNo, 389 | } 390 | return render(request,'repair/errorPage.html', message) 391 | 392 | else: 393 | message = { 394 | 'errorMessage':'Invalid Request Type', 395 | } 396 | return render(request,'repair/errorPage.html', message) 397 | 398 | # Check Status 399 | if customerDetails[0].status == 'EN': 400 | data = { 401 | 'customerDetails' : customerDetails, 402 | } 403 | return render(request, 'repair/checkStatusShow.html', data) 404 | elif customerDetails[0].status == 'CH': 405 | testDetails = TestDetail.objects.filter(Enquiry = enquiryInstance) 406 | data = { 407 | 'customerDetails' : customerDetails, 408 | 'testDetails' : testDetails, 409 | } 410 | return render(request, 'repair/checkStatusShow.html', data) 411 | elif customerDetails[0].status == 'RE' or customerDetails[0].status == 'CO': 412 | testDetails = TestDetail.objects.filter(Enquiry = enquiryInstance) 413 | repairDetails = RepairDetail.objects.filter(Enquiry = enquiryInstance) 414 | componentsUsed = str(repairDetails[0].componentsUsed) 415 | 416 | componentsUsedBackup = str(componentsUsed) 417 | componentsUsed = componentsUsed.split('~') 418 | componentsUsed = [i.split(':') for i in componentsUsed] 419 | del(componentsUsed[0]) 420 | componentsUsedPriceTotal = str(sum([int(i[1]) for i in componentsUsed])) 421 | 422 | balance = int(repairDetails[0].totalPrice) - int(customerDetails[0].advance) 423 | 424 | data = { 425 | 'customerDetails' : customerDetails, 426 | 'testDetails' : testDetails, 427 | 'repairDetails' : repairDetails, 428 | 'componentsUsed' : componentsUsed, 429 | 'componentsUsedPriceTotal' : componentsUsedPriceTotal, 430 | 'balance' : balance, 431 | } 432 | return render(request, 'repair/checkStatusShow.html', data) 433 | elif customerDetails[0].status == 'RJ': 434 | message = { 435 | 'errorMessage':'This Record is Rejected', 436 | } 437 | return render(request,'repair/errorPage.html', message) 438 | else: 439 | message = { 440 | 'errorMessage':'Your Database contains some invalid values for Enquiry.Status', 441 | } 442 | return render(request,'repair/errorPage.html', message) 443 | else: 444 | message = { 445 | 'errorMessage':'Invalid Request', 446 | } 447 | return render(request,'repair/errorPage.html', message) --------------------------------------------------------------------------------