diff --git a/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc b/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc index a6f00b0d..9ee47939 100644 Binary files a/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc and b/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/addressbook/__pycache__/admin.cpython-311.pyc b/osinaweb/addressbook/__pycache__/admin.cpython-311.pyc index 6785bf01..538307f9 100644 Binary files a/osinaweb/addressbook/__pycache__/admin.cpython-311.pyc and b/osinaweb/addressbook/__pycache__/admin.cpython-311.pyc differ diff --git a/osinaweb/addressbook/__pycache__/apps.cpython-311.pyc b/osinaweb/addressbook/__pycache__/apps.cpython-311.pyc index 5ca891e4..028d810c 100644 Binary files a/osinaweb/addressbook/__pycache__/apps.cpython-311.pyc and b/osinaweb/addressbook/__pycache__/apps.cpython-311.pyc differ diff --git a/osinaweb/addressbook/__pycache__/models.cpython-311.pyc b/osinaweb/addressbook/__pycache__/models.cpython-311.pyc index 9626d220..5280f783 100644 Binary files a/osinaweb/addressbook/__pycache__/models.cpython-311.pyc and b/osinaweb/addressbook/__pycache__/models.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/0001_initial.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/0001_initial.cpython-311.pyc index 0341be68..0a4ddd07 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/0001_initial.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/0002_country_addressbook.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/0002_country_addressbook.cpython-311.pyc index 2628b70d..02a82fa1 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/0002_country_addressbook.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/0002_country_addressbook.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/0003_contact.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/0003_contact.cpython-311.pyc index 7df64ce5..6c638fcc 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/0003_contact.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/0003_contact.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/0004_socialmedia.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/0004_socialmedia.cpython-311.pyc index 666161fa..cd6b1628 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/0004_socialmedia.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/0004_socialmedia.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/0005_socialmedia_addressbook.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/0005_socialmedia_addressbook.cpython-311.pyc index 064ea3ec..1918accd 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/0005_socialmedia_addressbook.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/0005_socialmedia_addressbook.cpython-311.pyc differ diff --git a/osinaweb/addressbook/migrations/__pycache__/__init__.cpython-311.pyc b/osinaweb/addressbook/migrations/__pycache__/__init__.cpython-311.pyc index 66ca948b..99b9d863 100644 Binary files a/osinaweb/addressbook/migrations/__pycache__/__init__.cpython-311.pyc and b/osinaweb/addressbook/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/__init__.cpython-311.pyc b/osinaweb/billing/__pycache__/__init__.cpython-311.pyc index c6c8bee4..859a66ac 100644 Binary files a/osinaweb/billing/__pycache__/__init__.cpython-311.pyc and b/osinaweb/billing/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/admin.cpython-311.pyc b/osinaweb/billing/__pycache__/admin.cpython-311.pyc index e92917e1..46b03094 100644 Binary files a/osinaweb/billing/__pycache__/admin.cpython-311.pyc and b/osinaweb/billing/__pycache__/admin.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/apps.cpython-311.pyc b/osinaweb/billing/__pycache__/apps.cpython-311.pyc index da47cf9e..2bf29a0d 100644 Binary files a/osinaweb/billing/__pycache__/apps.cpython-311.pyc and b/osinaweb/billing/__pycache__/apps.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/models.cpython-311.pyc b/osinaweb/billing/__pycache__/models.cpython-311.pyc index 46b64364..b5b4765a 100644 Binary files a/osinaweb/billing/__pycache__/models.cpython-311.pyc and b/osinaweb/billing/__pycache__/models.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/urls.cpython-311.pyc b/osinaweb/billing/__pycache__/urls.cpython-311.pyc index b21a33dd..44d201c7 100644 Binary files a/osinaweb/billing/__pycache__/urls.cpython-311.pyc and b/osinaweb/billing/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/billing/__pycache__/views.cpython-311.pyc b/osinaweb/billing/__pycache__/views.cpython-311.pyc index 0c781761..52915151 100644 Binary files a/osinaweb/billing/__pycache__/views.cpython-311.pyc and b/osinaweb/billing/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc b/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc index da338331..4fdc067a 100644 Binary files a/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc and b/osinaweb/billing/add/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/billing/add/__pycache__/views.cpython-311.pyc b/osinaweb/billing/add/__pycache__/views.cpython-311.pyc index 40c8352e..07abf47b 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-311.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/billing/add/urls.py b/osinaweb/billing/add/urls.py index 03d99eb7..aae47422 100644 --- a/osinaweb/billing/add/urls.py +++ b/osinaweb/billing/add/urls.py @@ -5,7 +5,6 @@ from billing.add import views urlpatterns = [ path('product', views.add_product, name='addproduct'), path('service', views.add_service, name='addservice'), - path('order', views.add_order, name='addorder'), - + path('order//', views.add_order, name='addorder'), path('invoice//', views.add_invoice_pdf, name='addinvoice'), ] diff --git a/osinaweb/billing/add/views.py b/osinaweb/billing/add/views.py index ca27fd2b..798ee4ff 100644 --- a/osinaweb/billing/add/views.py +++ b/osinaweb/billing/add/views.py @@ -5,8 +5,8 @@ from django.http import JsonResponse, HttpResponse from django.template.loader import get_template from django.conf import settings import os -from weasyprint import HTML, CSS from django.core.files.base import ContentFile +from weasyprint import HTML, CSS @@ -72,8 +72,10 @@ def add_service (request, *args, **kwargs): return render(request, 'add_templates/add-service.html', context) -def add_order (request, *args, **kwargs): - customers = CustomerProfile.objects.all().order_by('-id') +def add_order (request, customer_id): + customer= get_object_or_404(CustomerProfile, id=customer_id) + businesses = Business.objects.filter(customer=customer) + if request.method == 'POST': customer_id = request.POST.get('customer') customer = get_object_or_404(CustomerProfile, id=customer_id) @@ -104,7 +106,8 @@ def add_order (request, *args, **kwargs): context = { - 'customers': customers, + 'customer' : customer, + 'businesses' : businesses, } return render(request, 'add_templates/add-order.html', context) @@ -176,5 +179,3 @@ def add_invoice_pdf(request, order_id): - - diff --git a/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc index a3635b91..e0b15e35 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0002_service_active_service_cancelled_at_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0002_service_active_service_cancelled_at_and_more.cpython-311.pyc index afaa850c..90b8a0f5 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0002_service_active_service_cancelled_at_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0002_service_active_service_cancelled_at_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0003_payment_servicepayment.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0003_payment_servicepayment.cpython-311.pyc index cbe7c524..b8cf0606 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0003_payment_servicepayment.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0003_payment_servicepayment.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0004_rename_payment_paymenttype.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0004_rename_payment_paymenttype.cpython-311.pyc index f607baa1..d37197be 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0004_rename_payment_paymenttype.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0004_rename_payment_paymenttype.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0005_service_recurring_cycle.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0005_service_recurring_cycle.cpython-311.pyc index 8f7115bd..f9ad1922 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0005_service_recurring_cycle.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0005_service_recurring_cycle.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0006_alter_service_cancelled_at_alter_service_created_at_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0006_alter_service_cancelled_at_alter_service_created_at_and_more.cpython-311.pyc index 15c99721..6d275a6b 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0006_alter_service_cancelled_at_alter_service_created_at_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0006_alter_service_cancelled_at_alter_service_created_at_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0007_alter_service_recurring_cycle.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0007_alter_service_recurring_cycle.cpython-311.pyc index b5b13878..a0da3ae0 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0007_alter_service_recurring_cycle.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0007_alter_service_recurring_cycle.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0008_alter_service_type.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0008_alter_service_type.cpython-311.pyc index d78e04d8..4bde9f7e 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0008_alter_service_type.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0008_alter_service_type.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0009_remove_service_due_at_remove_servicepayment_service_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0009_remove_service_due_at_remove_servicepayment_service_and_more.cpython-311.pyc index 3cdcbfdb..89977afa 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0009_remove_service_due_at_remove_servicepayment_service_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0009_remove_service_due_at_remove_servicepayment_service_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0010_charge_amount.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0010_charge_amount.cpython-311.pyc index dbe2530a..481df9f8 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0010_charge_amount.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0010_charge_amount.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0011_invoice.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0011_invoice.cpython-311.pyc index a3684bc3..24b54f33 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0011_invoice.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0011_invoice.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0012_remove_servicepayment_charge_receipt_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0012_remove_servicepayment_charge_receipt_and_more.cpython-311.pyc index 7402bfc9..196b6f08 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0012_remove_servicepayment_charge_receipt_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0012_remove_servicepayment_charge_receipt_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0013_alter_invoice_date_created.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0013_alter_invoice_date_created.cpython-311.pyc index b35e48a6..1c002774 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0013_alter_invoice_date_created.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0013_alter_invoice_date_created.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0014_servicepayment_comment.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0014_servicepayment_comment.cpython-311.pyc index 18d4bb6c..ccb4af67 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0014_servicepayment_comment.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0014_servicepayment_comment.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0015_order.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0015_order.cpython-311.pyc index fec3ccac..62ed8bbd 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0015_order.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0015_order.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0016_alter_order_status.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0016_alter_order_status.cpython-311.pyc index 29cf3c6a..977c5323 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0016_alter_order_status.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0016_alter_order_status.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0017_service_order.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0017_service_order.cpython-311.pyc index 758308bb..1cbb5065 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0017_service_order.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0017_service_order.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0018_alter_order_status.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0018_alter_order_status.cpython-311.pyc index 2ec82cf4..9ce6d18b 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0018_alter_order_status.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0018_alter_order_status.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0019_item_orderpayment_remove_service_customer_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0019_item_orderpayment_remove_service_customer_and_more.cpython-311.pyc index 6f4e59e7..7b05856e 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0019_item_orderpayment_remove_service_customer_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0019_item_orderpayment_remove_service_customer_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0020_orderitem.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0020_orderitem.cpython-311.pyc index cf443ec5..43a2392a 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0020_orderitem.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0020_orderitem.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0021_remove_item_recurring_cycle_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0021_remove_item_recurring_cycle_and_more.cpython-311.pyc index 471edbe7..3bd02902 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0021_remove_item_recurring_cycle_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0021_remove_item_recurring_cycle_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-311.pyc index e55365d6..6c9bdded 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0023_alter_item_project_alter_item_type.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0023_alter_item_project_alter_item_type.cpython-311.pyc index 1223f6d1..3207657c 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0023_alter_item_project_alter_item_type.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0023_alter_item_project_alter_item_type.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0024_remove_item_active.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0024_remove_item_active.cpython-311.pyc index a43b381a..62816809 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0024_remove_item_active.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0024_remove_item_active.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-311.pyc index 5ac4d01a..7fc2cc2b 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0025_remove_item_project_item_customer.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0026_rename_type_item_item_type_remove_order_paid.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0026_rename_type_item_item_type_remove_order_paid.cpython-311.pyc index 6c726387..f0c1b734 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0026_rename_type_item_item_type_remove_order_paid.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0026_rename_type_item_item_type_remove_order_paid.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0027_item_type.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0027_item_type.cpython-311.pyc index fbdcc863..8e7638fd 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0027_item_type.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0027_item_type.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0028_remove_order_due_date.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0028_remove_order_due_date.cpython-311.pyc index aabf880b..a8bfc290 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0028_remove_order_due_date.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0028_remove_order_due_date.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0029_invoice_pdf.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0029_invoice_pdf.cpython-311.pyc index c0d3a5e3..708f9205 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0029_invoice_pdf.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0029_invoice_pdf.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0030_alter_invoice_order.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0030_alter_invoice_order.cpython-311.pyc index be840df9..440ef361 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0030_alter_invoice_order.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0030_alter_invoice_order.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0031_alter_invoice_invoice_number.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0031_alter_invoice_invoice_number.cpython-311.pyc index 29cf906a..bac0c533 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0031_alter_invoice_invoice_number.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0031_alter_invoice_invoice_number.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0032_order_business.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0032_order_business.cpython-311.pyc index 585bad9c..2612511e 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0032_order_business.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0032_order_business.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0033_alter_order_status.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0033_alter_order_status.cpython-311.pyc index 55c56f9c..71fa7228 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0033_alter_order_status.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0033_alter_order_status.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0034_alter_invoice_pdf.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0034_alter_invoice_pdf.cpython-311.pyc index f7872051..abb69ecc 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0034_alter_invoice_pdf.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0034_alter_invoice_pdf.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0035_alter_invoice_pdf.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0035_alter_invoice_pdf.cpython-311.pyc index 7fd7bd0c..70804af1 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0035_alter_invoice_pdf.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0035_alter_invoice_pdf.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0036_alter_invoice_invoice_number.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0036_alter_invoice_invoice_number.cpython-311.pyc index 4848ed5c..bedb6b8d 100644 Binary files a/osinaweb/billing/migrations/__pycache__/0036_alter_invoice_invoice_number.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/0036_alter_invoice_invoice_number.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0037_recurringcycle_item.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0037_recurringcycle_item.cpython-311.pyc new file mode 100644 index 00000000..84bd4a2d Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0037_recurringcycle_item.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0038_alter_invoice_pdf.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0038_alter_invoice_pdf.cpython-311.pyc new file mode 100644 index 00000000..6d45f8b5 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0038_alter_invoice_pdf.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0039_recurringcycle_cycle_price.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0039_recurringcycle_cycle_price.cpython-311.pyc new file mode 100644 index 00000000..f7bee54b Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0039_recurringcycle_cycle_price.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0040_rename_due_at_orderitem_end_at_and_more.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0040_rename_due_at_orderitem_end_at_and_more.cpython-311.pyc new file mode 100644 index 00000000..dd9ae374 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0040_rename_due_at_orderitem_end_at_and_more.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0041_orderitem_active.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0041_orderitem_active.cpython-311.pyc new file mode 100644 index 00000000..54686552 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0041_orderitem_active.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0042_order_due_date.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0042_order_due_date.cpython-311.pyc new file mode 100644 index 00000000..47e31bd5 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0042_order_due_date.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0043_alter_invoice_pdf.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0043_alter_invoice_pdf.cpython-311.pyc new file mode 100644 index 00000000..9f3fe81e Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0043_alter_invoice_pdf.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/0044_alter_orderitem_active.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0044_alter_orderitem_active.cpython-311.pyc new file mode 100644 index 00000000..f3012ea1 Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0044_alter_orderitem_active.cpython-311.pyc differ diff --git a/osinaweb/billing/migrations/__pycache__/__init__.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/__init__.cpython-311.pyc index 1bb573bb..899f67d6 100644 Binary files a/osinaweb/billing/migrations/__pycache__/__init__.cpython-311.pyc and b/osinaweb/billing/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/billing/templates/add_templates/add-order.html b/osinaweb/billing/templates/add_templates/add-order.html index c927ca21..579446ec 100644 --- a/osinaweb/billing/templates/add_templates/add-order.html +++ b/osinaweb/billing/templates/add_templates/add-order.html @@ -11,40 +11,21 @@

- Add Order + Add Order for {{customer.user.first_name}} {{customer.user.last_name}}

-
+ {% csrf_token %}
-
- - -
-
-
- -
- -
@@ -69,8 +50,7 @@
- - + diff --git a/osinaweb/billing/templates/details_templates/order-details.html b/osinaweb/billing/templates/details_templates/order-details.html new file mode 100644 index 00000000..9e38f3d6 --- /dev/null +++ b/osinaweb/billing/templates/details_templates/order-details.html @@ -0,0 +1,88 @@ +{% extends "main.html" %} +{%load static%} +{% block content %} + + + + +
+
+
+
+

Order 234443

+

Salim Elliye

+
+ +

Completed

+
+ +
+

Services

+
+
+
+

Service Name

+
+
+ + + +

Add

+
+
+
+
+ +
+

Products

+
+
+
+

Basic +

+ +
+

$0

+

monthly/restaurant

+
+
+
+ + + +

Add

+
+ +
+ +
+
+

Standard +

+ +
+

$20

+

monthly/restaurant

+
+
+
+ + + +

Add

+
+
+
+
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/osinaweb/billing/templates/listing_pages/orders.html b/osinaweb/billing/templates/listing_pages/orders.html index 0a993721..857ba323 100644 --- a/osinaweb/billing/templates/listing_pages/orders.html +++ b/osinaweb/billing/templates/listing_pages/orders.html @@ -18,13 +18,6 @@
-
@@ -78,7 +71,7 @@
- +
diff --git a/osinaweb/billing/urls.py b/osinaweb/billing/urls.py index 83109ae9..98fcf974 100644 --- a/osinaweb/billing/urls.py +++ b/osinaweb/billing/urls.py @@ -13,7 +13,5 @@ urlpatterns = [ # DETAILS path('invoice-details//', views.invoice_details, name='invoicedetails'), - - path('fetch-customer-items//', views.fetch_customer_items, name='fetch_customer_items'), - path('fetch-customer-businesses//', views.fetch_customer_businesses, name='fetch_customer_businesses'), + path('order-details//', views.order_details, name='orderdetails'), ] diff --git a/osinaweb/billing/views.py b/osinaweb/billing/views.py index dd31953c..2cac222a 100644 --- a/osinaweb/billing/views.py +++ b/osinaweb/billing/views.py @@ -47,42 +47,15 @@ def invoice_details(request, order_id): return render(request, 'details_templates/invoice-details.html', context) +def order_details(request, order_id): + order = get_object_or_404(Order, id=order_id) - - -# TO FETCH THE ITEMS RELATED TO TH SELECTED CUSTOMER AND THE ITEMS THAT ARE NOT RELATED TO A CUSTOMER -def fetch_customer_items(request, customer_id): - customer = get_object_or_404(CustomerProfile, id=customer_id) - - items_related_to_customer = Item.objects.filter(customer=customer) - - items_without_customer = Item.objects.filter(customer__isnull=True) - - data = { - 'items_related_to_customer': list(items_related_to_customer.values('id', 'title')), - 'items_without_customer': list(items_without_customer.values('id', 'title')), + context = { + 'order' : order, } - return JsonResponse(data) - + return render(request, 'details_templates/order-details.html', context) -def fetch_customer_businesses(request, customer_id): - try: - customer_profile = CustomerProfile.objects.get(id=customer_id) - except CustomerProfile.DoesNotExist: - customer_profile = None - if customer_profile: - businesses = Business.objects.filter(customer=customer_profile) - # Create a list to hold dictionary representations of each business - business_data = [] - for business in businesses: - business_data.append({ - 'id': business.id, - 'name': business.name, - }) - else: - business_data = None - return JsonResponse({'businesses': business_data}) diff --git a/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc b/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc index 53cf900f..9a32e553 100644 Binary files a/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc and b/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/admin.cpython-311.pyc b/osinaweb/customercore/__pycache__/admin.cpython-311.pyc index 5ad19901..b50421ce 100644 Binary files a/osinaweb/customercore/__pycache__/admin.cpython-311.pyc and b/osinaweb/customercore/__pycache__/admin.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/apps.cpython-311.pyc b/osinaweb/customercore/__pycache__/apps.cpython-311.pyc index 4500d1ae..069e6e05 100644 Binary files a/osinaweb/customercore/__pycache__/apps.cpython-311.pyc and b/osinaweb/customercore/__pycache__/apps.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/custom_context.cpython-311.pyc b/osinaweb/customercore/__pycache__/custom_context.cpython-311.pyc new file mode 100644 index 00000000..28730c15 Binary files /dev/null and b/osinaweb/customercore/__pycache__/custom_context.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/decorators.cpython-311.pyc b/osinaweb/customercore/__pycache__/decorators.cpython-311.pyc index 86a2e7e5..45bc7ddc 100644 Binary files a/osinaweb/customercore/__pycache__/decorators.cpython-311.pyc and b/osinaweb/customercore/__pycache__/decorators.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/models.cpython-311.pyc b/osinaweb/customercore/__pycache__/models.cpython-311.pyc index b3ffb484..f5e5952a 100644 Binary files a/osinaweb/customercore/__pycache__/models.cpython-311.pyc and b/osinaweb/customercore/__pycache__/models.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/urls.cpython-311.pyc b/osinaweb/customercore/__pycache__/urls.cpython-311.pyc index 86d0f9de..07c1b40f 100644 Binary files a/osinaweb/customercore/__pycache__/urls.cpython-311.pyc and b/osinaweb/customercore/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-311.pyc b/osinaweb/customercore/__pycache__/views.cpython-311.pyc index 8d637c0a..3eb76e67 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-311.pyc and b/osinaweb/customercore/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/customercore/migrations/__pycache__/0001_initial.cpython-311.pyc b/osinaweb/customercore/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 00000000..21e80e55 Binary files /dev/null and b/osinaweb/customercore/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/osinaweb/customercore/migrations/__pycache__/__init__.cpython-311.pyc b/osinaweb/customercore/migrations/__pycache__/__init__.cpython-311.pyc index fd4b5170..099fcf07 100644 Binary files a/osinaweb/customercore/migrations/__pycache__/__init__.cpython-311.pyc and b/osinaweb/customercore/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/customercore/templates/add_templates/customer-add-ticket.html b/osinaweb/customercore/templates/add_templates/customer-add-ticket.html index 9fcea554..3adf6554 100644 --- a/osinaweb/customercore/templates/add_templates/customer-add-ticket.html +++ b/osinaweb/customercore/templates/add_templates/customer-add-ticket.html @@ -20,17 +20,30 @@
- - {% for customer_product in customer_products %} - - {% endfor %} - {% for customer_project in customer_projects %} - - {% endfor %} + +
+ + + + + + +