diff --git a/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc b/osinaweb/addressbook/__pycache__/__init__.cpython-311.pyc index ca0f7694..a6f00b0d 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 8f737569..6785bf01 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 b27bc94d..5ca891e4 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 6e243424..9626d220 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 384ff4d8..0341be68 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 1c32728a..2628b70d 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 0c6f9ad1..7df64ce5 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 42fa612f..666161fa 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 099ea096..064ea3ec 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 6ff3a29e..66ca948b 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 b1c1ffac..c6c8bee4 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 ba7506de..e92917e1 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 f0513fab..da47cf9e 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 282d2023..46b64364 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 f538a96a..b21a33dd 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 5f7e1749..0c781761 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 4efb8f29..da338331 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 751875ee..40c8352e 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 141beac9..304ba24f 100644 --- a/osinaweb/billing/add/urls.py +++ b/osinaweb/billing/add/urls.py @@ -7,5 +7,4 @@ urlpatterns = [ path('service', views.add_service, name='addservice'), 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 f40b15e6..b9e2a183 100644 --- a/osinaweb/billing/add/views.py +++ b/osinaweb/billing/add/views.py @@ -8,7 +8,6 @@ import os from weasyprint import HTML, CSS - def add_product (request, *args, **kwargs): item_types = ProjectType.objects.all().order_by('name') if request.method == 'POST': @@ -174,3 +173,8 @@ def add_invoice_pdf(request, order_id): response['Content-Disposition'] = 'attachment; filename="my_pdf.pdf"' return response +
 + + + + diff --git a/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc b/osinaweb/billing/migrations/__pycache__/0001_initial.cpython-311.pyc index 91c05b86..a3635b91 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 a0fd6128..afaa850c 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 a514f771..cbe7c524 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 30c22202..f607baa1 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 b9e45287..8f7115bd 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 87b84500..15c99721 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 4db3233e..b5b13878 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 1e2078ab..d78e04d8 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 e3ae75ab..3cdcbfdb 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 130730ff..dbe2530a 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 d64e6794..a3684bc3 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 f5119014..7402bfc9 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 9a461b4c..b35e48a6 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 78cb2005..18d4bb6c 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 8c3ad44c..fec3ccac 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 0aa3b3f3..29cf3c6a 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 89ce147e..758308bb 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 43f01773..2ec82cf4 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 ba00d1b1..6f4e59e7 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 d0d5753a..cf443ec5 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 2d9808b5..471edbe7 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 369969eb..e55365d6 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 b900fe2c..1223f6d1 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 bbaabaa6..a43b381a 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 2c60d21a..5ac4d01a 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 b66bde46..6c726387 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 82d6d4d8..fbdcc863 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 0fb070ca..aabf880b 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 bc044e58..c0d3a5e3 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 97a12bbe..be840df9 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 65eb5076..29cf906a 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 new file mode 100644 index 00000000..585bad9c Binary files /dev/null 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 new file mode 100644 index 00000000..55c56f9c Binary files /dev/null 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 new file mode 100644 index 00000000..f7872051 Binary files /dev/null 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 new file mode 100644 index 00000000..7fd7bd0c Binary files /dev/null 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 new file mode 100644 index 00000000..4848ed5c Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0036_alter_invoice_invoice_number.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 1cac3086..1bb573bb 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/views.py b/osinaweb/billing/views.py index 72ae5377..38056455 100644 --- a/osinaweb/billing/views.py +++ b/osinaweb/billing/views.py @@ -72,16 +72,16 @@ def fetch_customer_businesses(request, customer_id): except CustomerProfile.DoesNotExist: customer_profile = None - if customer_profile and customer_profile.business: - # Retrieve the associated business - business = customer_profile.business - # Create a dictionary representation of the business - business_data = { - 'id': business.id, - 'name': business.name, - # Include other fields if needed - } + 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({'business': business_data}) + return JsonResponse({'businesses': business_data}) diff --git a/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc b/osinaweb/customercore/__pycache__/__init__.cpython-311.pyc index c83ce649..53cf900f 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 649702fb..5ad19901 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 0a8aa9c6..4500d1ae 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__/decorators.cpython-311.pyc b/osinaweb/customercore/__pycache__/decorators.cpython-311.pyc index cd73be8b..86a2e7e5 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 cc5f8b91..b3ffb484 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 cb828fd4..86d0f9de 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 a90dc132..8d637c0a 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__/__init__.cpython-311.pyc b/osinaweb/customercore/migrations/__pycache__/__init__.cpython-311.pyc index 23e9f9b8..fd4b5170 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/db.sqlite3 b/osinaweb/db.sqlite3 index 0886a572..8ef7dee5 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/input.css b/osinaweb/input.css index e235678d..571db178 100644 --- a/osinaweb/input.css +++ b/osinaweb/input.css @@ -70,7 +70,7 @@ /* GIVE THIS CLASS TO THE SELECTED EPIC IN PROJECT DETAILS PAGE */ .selectedEpic { - color: white !important; + color: #374a7a !important; font-weight: bold !important; } diff --git a/osinaweb/osinacore/__pycache__/__init__.cpython-311.pyc b/osinaweb/osinacore/__pycache__/__init__.cpython-311.pyc index 87f21b53..a2079bc0 100644 Binary files a/osinaweb/osinacore/__pycache__/__init__.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/admin.cpython-311.pyc b/osinaweb/osinacore/__pycache__/admin.cpython-311.pyc index c64aef0a..ad86596f 100644 Binary files a/osinaweb/osinacore/__pycache__/admin.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/admin.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/apps.cpython-311.pyc b/osinaweb/osinacore/__pycache__/apps.cpython-311.pyc index 89cb6f42..d9350139 100644 Binary files a/osinaweb/osinacore/__pycache__/apps.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/apps.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/custom_context.cpython-311.pyc b/osinaweb/osinacore/__pycache__/custom_context.cpython-311.pyc index e5b1119a..eae6da6f 100644 Binary files a/osinaweb/osinacore/__pycache__/custom_context.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/custom_context.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/decorators.cpython-311.pyc b/osinaweb/osinacore/__pycache__/decorators.cpython-311.pyc index f0fb41b7..bb84a596 100644 Binary files a/osinaweb/osinacore/__pycache__/decorators.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/decorators.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/forms.cpython-311.pyc b/osinaweb/osinacore/__pycache__/forms.cpython-311.pyc index 27aef077..8031af19 100644 Binary files a/osinaweb/osinacore/__pycache__/forms.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/forms.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/models.cpython-311.pyc b/osinaweb/osinacore/__pycache__/models.cpython-311.pyc index 9aa9d6ca..37eb8303 100644 Binary files a/osinaweb/osinacore/__pycache__/models.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/models.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-311.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-311.pyc index f7ebbe8e..3b381159 100644 Binary files a/osinaweb/osinacore/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc index 0ddfebef..146762b6 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/urls.cpython-311.pyc b/osinaweb/osinacore/add/__pycache__/urls.cpython-311.pyc index fdc840e8..26823c27 100644 Binary files a/osinaweb/osinacore/add/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinacore/add/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-311.pyc index 6821957c..ed2525ed 100644 Binary files a/osinaweb/osinacore/add/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/add/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/api/__pycache__/serializers.cpython-311.pyc b/osinaweb/osinacore/api/__pycache__/serializers.cpython-311.pyc index 8f63ad1d..fba10504 100644 Binary files a/osinaweb/osinacore/api/__pycache__/serializers.cpython-311.pyc and b/osinaweb/osinacore/api/__pycache__/serializers.cpython-311.pyc differ diff --git a/osinaweb/osinacore/api/__pycache__/urls.cpython-311.pyc b/osinaweb/osinacore/api/__pycache__/urls.cpython-311.pyc index 4f517675..609bb21a 100644 Binary files a/osinaweb/osinacore/api/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinacore/api/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinacore/api/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/api/__pycache__/views.cpython-311.pyc index cfc79d55..84dd6a8a 100644 Binary files a/osinaweb/osinacore/api/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/api/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/delete/__pycache__/urls.cpython-311.pyc b/osinaweb/osinacore/delete/__pycache__/urls.cpython-311.pyc index 0cd1d704..b77d10ef 100644 Binary files a/osinaweb/osinacore/delete/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinacore/delete/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinacore/delete/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/delete/__pycache__/views.cpython-311.pyc index 3741d6b2..22133a94 100644 Binary files a/osinaweb/osinacore/delete/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/delete/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/edit/__pycache__/urls.cpython-311.pyc b/osinaweb/osinacore/edit/__pycache__/urls.cpython-311.pyc index 2d7aec9a..0cb0be88 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/urls.cpython-311.pyc and b/osinaweb/osinacore/edit/__pycache__/urls.cpython-311.pyc differ diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-311.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-311.pyc index c9160f05..06a4ee26 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/views.cpython-311.pyc and b/osinaweb/osinacore/edit/__pycache__/views.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/0066_remove_customerprofile_business_business_customer.py b/osinaweb/osinacore/migrations/0066_remove_customerprofile_business_business_customer.py new file mode 100644 index 00000000..fab6b7f6 --- /dev/null +++ b/osinaweb/osinacore/migrations/0066_remove_customerprofile_business_business_customer.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.5 on 2024-04-18 08:21 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('osinacore', '0065_alter_customerprofile_status'), + ] + + operations = [ + migrations.RemoveField( + model_name='customerprofile', + name='business', + ), + migrations.AddField( + model_name='business', + name='customer', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='osinacore.customerprofile'), + ), + ] diff --git a/osinaweb/osinacore/migrations/__pycache__/0001_initial.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0001_initial.cpython-311.pyc index 4b2d16fb..d10d2fe5 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0001_initial.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0002_projecttype_alter_business_options_staffprofile_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0002_projecttype_alter_business_options_staffprofile_and_more.cpython-311.pyc index 8142885f..709c7142 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0002_projecttype_alter_business_options_staffprofile_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0002_projecttype_alter_business_options_staffprofile_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0003_milestone.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0003_milestone.cpython-311.pyc index 47565474..716a2643 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0003_milestone.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0003_milestone.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0004_epic.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0004_epic.cpython-311.pyc index 40058816..c7b610bc 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0004_epic.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0004_epic.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0005_staffprofile_image.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0005_staffprofile_image.cpython-311.pyc index 21b24bbe..6c07f0f9 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0005_staffprofile_image.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0005_staffprofile_image.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0006_note.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0006_note.cpython-311.pyc index fcb72ac8..c8b02781 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0006_note.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0006_note.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0007_project_project_id_alter_project_status.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0007_project_project_id_alter_project_status.cpython-311.pyc index e852ae77..41ae3516 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0007_project_project_id_alter_project_status.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0007_project_project_id_alter_project_status.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0008_alter_project_project_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0008_alter_project_project_id.cpython-311.pyc index a15eafee..08d748ec 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0008_alter_project_project_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0008_alter_project_project_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0009_alter_project_project_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0009_alter_project_project_id.cpython-311.pyc index c190c67d..e030cb79 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0009_alter_project_project_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0009_alter_project_project_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0010_remove_note_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0010_remove_note_date.cpython-311.pyc index f75c6fe3..54f1172b 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0010_remove_note_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0010_remove_note_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0011_note_date_alter_note_color_alter_note_text_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0011_note_date_alter_note_color_alter_note_text_and_more.cpython-311.pyc index a3fdd394..e8290c10 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0011_note_date_alter_note_color_alter_note_text_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0011_note_date_alter_note_color_alter_note_text_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-311.pyc index 2ea0a8bf..5a0359fa 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0012_projectrequirement.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-311.pyc index 0ce725f4..78d6ed5a 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0013_projectfile.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-311.pyc index af37787c..131a2218 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0014_alter_projectfile_file.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-311.pyc index de376349..285a7ee2 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0015_projectcredentials.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-311.pyc index 1be4e20f..99b389f0 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0016_rename_projectcredentials_projectcredential.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0017_alter_project_end_date_alter_project_start_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0017_alter_project_end_date_alter_project_start_date.cpython-311.pyc index a002c856..caeb2e03 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0017_alter_project_end_date_alter_project_start_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0017_alter_project_end_date_alter_project_start_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0018_epic_status.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0018_epic_status.cpython-311.pyc index f17e3cbb..64faf76f 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0018_epic_status.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0018_epic_status.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0019_alter_epic_end_date_alter_epic_start_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0019_alter_epic_end_date_alter_epic_start_date.cpython-311.pyc index 215e9392..6a31926a 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0019_alter_epic_end_date_alter_epic_start_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0019_alter_epic_end_date_alter_epic_start_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0020_task.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0020_task.cpython-311.pyc index 45eb756f..a3b86f24 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0020_task.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0020_task.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0021_alter_customerprofile_business_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0021_alter_customerprofile_business_and_more.cpython-311.pyc index 7d675dca..4823051f 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0021_alter_customerprofile_business_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0021_alter_customerprofile_business_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0022_customerprofile_customer_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0022_customerprofile_customer_id.cpython-311.pyc index a7776043..40d32f1d 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0022_customerprofile_customer_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0022_customerprofile_customer_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0023_task_assigned_to.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0023_task_assigned_to.cpython-311.pyc index 33bb5e14..a6c4cb12 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0023_task_assigned_to.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0023_task_assigned_to.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0024_task_task_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0024_task_task_id.cpython-311.pyc index 1c7a0ab7..fa585053 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0024_task_task_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0024_task_task_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0025_status.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0025_status.cpython-311.pyc index e0ce0de1..534572dc 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0025_status.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0025_status.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0026_remove_status_user_status_staff.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0026_remove_status_user_status_staff.cpython-311.pyc index 10bd52d4..7a108599 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0026_remove_status_user_status_staff.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0026_remove_status_user_status_staff.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0027_alter_status_staff.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0027_alter_status_staff.cpython-311.pyc index 14a36539..af2f51d0 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0027_alter_status_staff.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0027_alter_status_staff.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0028_remove_projecttype_color.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0028_remove_projecttype_color.cpython-311.pyc index ad8d1379..d999af84 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0028_remove_projecttype_color.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0028_remove_projecttype_color.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0029_alter_reference_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0029_alter_reference_date.cpython-311.pyc index 517a9651..2aa1ccc3 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0029_alter_reference_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0029_alter_reference_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0030_tag.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0030_tag.cpython-311.pyc index 836ba906..4518a204 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0030_tag.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0030_tag.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0031_alter_staffprofile_image.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0031_alter_staffprofile_image.cpython-311.pyc index d1b7d045..363d6bb5 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0031_alter_staffprofile_image.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0031_alter_staffprofile_image.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0032_point.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0032_point.cpython-311.pyc index 2b34ec4e..a2554ee1 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0032_point.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0032_point.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0033_point_date_completed_point_date_workingon_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0033_point_date_completed_point_date_workingon_and_more.cpython-311.pyc index a5c7d098..21b2a71e 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0033_point_date_completed_point_date_workingon_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0033_point_date_completed_point_date_workingon_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0034_alter_point_date_completed_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0034_alter_point_date_completed_and_more.cpython-311.pyc index 819b4a24..21c761c3 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0034_alter_point_date_completed_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0034_alter_point_date_completed_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0035_business_business_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0035_business_business_id.cpython-311.pyc index 4201d837..0fd78c2e 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0035_business_business_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0035_business_business_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0036_staffposition_alter_staffprofile_position.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0036_staffposition_alter_staffprofile_position.cpython-311.pyc index 04b60688..7bf5f905 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0036_staffposition_alter_staffprofile_position.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0036_staffposition_alter_staffprofile_position.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0037_remove_staffprofile_position.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0037_remove_staffprofile_position.cpython-311.pyc index f0e0190b..7e49b2db 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0037_remove_staffprofile_position.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0037_remove_staffprofile_position.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0038_staffprofile_staff_position.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0038_staffprofile_staff_position.cpython-311.pyc index e2e2c6fb..9e00c393 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0038_staffprofile_staff_position.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0038_staffprofile_staff_position.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0039_alter_staffprofile_staff_position.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0039_alter_staffprofile_staff_position.cpython-311.pyc index 275a2920..52cc7299 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0039_alter_staffprofile_staff_position.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0039_alter_staffprofile_staff_position.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0040_staffprofile_staff_id.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0040_staffprofile_staff_id.cpython-311.pyc index 519df920..aaeee6fb 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0040_staffprofile_staff_id.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0040_staffprofile_staff_id.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0041_dailyreport.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0041_dailyreport.cpython-311.pyc index a65f92d8..a639a4be 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0041_dailyreport.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0041_dailyreport.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0042_remove_customerprofile_email_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0042_remove_customerprofile_email_and_more.cpython-311.pyc index dbf50812..1d24c685 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0042_remove_customerprofile_email_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0042_remove_customerprofile_email_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-311.pyc index c95c94b4..1b6d2354 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0043_businesstype.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-311.pyc index 606a8f34..80ae04fd 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0044_remove_business_business_type.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-311.pyc index 2ac173ec..d30e08cc 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0045_business_type.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0046_task_requirement.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0046_task_requirement.cpython-311.pyc index 8ebc9f55..db643fe8 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0046_task_requirement.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0046_task_requirement.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0047_task_status_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0047_task_status_date.cpython-311.pyc index 8e6fd363..d886d816 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0047_task_status_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0047_task_status_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0048_alter_customerprofile_business.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0048_alter_customerprofile_business.cpython-311.pyc index d5116d5b..23460613 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0048_alter_customerprofile_business.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0048_alter_customerprofile_business.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0049_alter_customerprofile_business.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0049_alter_customerprofile_business.cpython-311.pyc index 978ee60b..537ad25e 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0049_alter_customerprofile_business.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0049_alter_customerprofile_business.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc index 6024939f..34dedb26 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0050_projectrequirement_added_by_projectrequirement_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc index 9ddce418..b331cf61 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0051_alter_task_requirement.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0052_note_project.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0052_note_project.cpython-311.pyc index e1231abd..cd27bfdd 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0052_note_project.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0052_note_project.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0053_pointactivity.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0053_pointactivity.cpython-311.pyc index d2742885..01135bdf 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0053_pointactivity.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0053_pointactivity.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0054_remove_point_date_completed_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0054_remove_point_date_completed_and_more.cpython-311.pyc index 543e4434..d137e3ab 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0054_remove_point_date_completed_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0054_remove_point_date_completed_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0055_alter_point_status.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0055_alter_point_status.cpython-311.pyc index 8d746dbd..e03fc088 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0055_alter_point_status.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0055_alter_point_status.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0056_alter_pointactivity_end_time.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0056_alter_pointactivity_end_time.cpython-311.pyc index d3fb5440..958629e8 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0056_alter_pointactivity_end_time.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0056_alter_pointactivity_end_time.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0057_point_total_time_hours_point_total_time_minutes_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0057_point_total_time_hours_point_total_time_minutes_and_more.cpython-311.pyc index 2abc46fd..03b394f7 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0057_point_total_time_hours_point_total_time_minutes_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0057_point_total_time_hours_point_total_time_minutes_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0058_remove_point_total_time_hours_and_more.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0058_remove_point_total_time_hours_and_more.cpython-311.pyc index 3dda5d2a..9952ca84 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0058_remove_point_total_time_hours_and_more.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0058_remove_point_total_time_hours_and_more.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0059_alter_task_requirement.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0059_alter_task_requirement.cpython-311.pyc index 3b67c64f..40a83ec3 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0059_alter_task_requirement.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0059_alter_task_requirement.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0060_pointactivity_total_time.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0060_pointactivity_total_time.cpython-311.pyc index 4902f378..b9ea6a09 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0060_pointactivity_total_time.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0060_pointactivity_total_time.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0061_alter_task_end_date_alter_task_start_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0061_alter_task_end_date_alter_task_start_date.cpython-311.pyc index 7a685756..bfcdbbb1 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0061_alter_task_end_date_alter_task_start_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0061_alter_task_end_date_alter_task_start_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0062_connection.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0062_connection.cpython-311.pyc index a7886d37..0d50e352 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0062_connection.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0062_connection.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0063_alter_connection_date.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0063_alter_connection_date.cpython-311.pyc index c24f30a1..03855f82 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0063_alter_connection_date.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0063_alter_connection_date.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0064_reaction.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0064_reaction.cpython-311.pyc index 80f8c821..92f0c24f 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0064_reaction.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0064_reaction.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0065_alter_customerprofile_status.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0065_alter_customerprofile_status.cpython-311.pyc index 5fffb863..30603413 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/0065_alter_customerprofile_status.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/0065_alter_customerprofile_status.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/0066_remove_customerprofile_business_business_customer.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/0066_remove_customerprofile_business_business_customer.cpython-311.pyc new file mode 100644 index 00000000..2aba87d6 Binary files /dev/null and b/osinaweb/osinacore/migrations/__pycache__/0066_remove_customerprofile_business_business_customer.cpython-311.pyc differ diff --git a/osinaweb/osinacore/migrations/__pycache__/__init__.cpython-311.pyc b/osinaweb/osinacore/migrations/__pycache__/__init__.cpython-311.pyc index 60678bdb..d4ff1e36 100644 Binary files a/osinaweb/osinacore/migrations/__pycache__/__init__.cpython-311.pyc and b/osinaweb/osinacore/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/osinaweb/osinacore/models.py b/osinaweb/osinacore/models.py index 71012844..27eb71cf 100644 --- a/osinaweb/osinacore/models.py +++ b/osinaweb/osinacore/models.py @@ -34,6 +34,34 @@ class BusinessType(models.Model): return self.name + + +class CustomerProfile(models.Model): + user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True) + mobile_number = models.CharField(max_length=50, blank=True) + personal_website = models.URLField(null=True, blank=True) + STATUS_CHOICES = ( + ('Active', 'Active'), + ('Suspended', 'Suspended'), + ('Terminated', 'Terminated'), + ) + status = models.CharField(max_length=200, choices=STATUS_CHOICES, default='Active', blank=True) + reference = models.ForeignKey(Reference, on_delete=models.CASCADE, null=True, blank=True) + customer_id = models.CharField(max_length=20, null=True, blank=True) + def __str__(self): + return self.user.username + def save(self, *args, **kwargs): + if not self.customer_id: + # Get the last two digits of the current year + current_year = str(datetime.now().year)[-2:] + # Find the maximum project ID in the database and increment it + max_id = CustomerProfile.objects.aggregate(models.Max('customer_id'))['customer_id__max'] + new_id = str(int(max_id[-4:]) + 1).zfill(4) if max_id else '0001' # If no existing records, start with '0001' + self.customer_id = current_year + new_id # Add 'p' prefix + super(CustomerProfile, self).save(*args, **kwargs) + + + class Business(models.Model): name = models.CharField(max_length=50) email = models.EmailField(unique=True) @@ -42,6 +70,7 @@ class Business(models.Model): commercial_registration = models.CharField(max_length=50) phone_number = models.CharField(max_length=50) website = models.URLField(null=True) + customer = models.ForeignKey(CustomerProfile, on_delete=models.CASCADE, null=True, blank=True) type = models.ForeignKey(BusinessType, on_delete=models.CASCADE, null=True, blank=True) logo = models.ImageField() business_id = models.CharField(max_length=20, null=True, blank=True) @@ -61,35 +90,6 @@ class Business(models.Model): self.business_id = 'B' + current_year + new_id # Add 'p' prefix super(Business, self).save(*args, **kwargs) - - - - -class CustomerProfile(models.Model): - user = models.OneToOneField(User, on_delete=models.CASCADE, blank=True) - mobile_number = models.CharField(max_length=50, blank=True) - personal_website = models.URLField(null=True, blank=True) - STATUS_CHOICES = ( - ('Active', 'Active'), - ('Suspended', 'Suspended'), - ('Terminated', 'Terminated'), - ) - status = models.CharField(max_length=200, choices=STATUS_CHOICES, default='Active', blank=True) - reference = models.ForeignKey(Reference, on_delete=models.CASCADE, null=True, blank=True) - business = models.ForeignKey(Business, on_delete=models.CASCADE, null=True, blank=True) - customer_id = models.CharField(max_length=20, null=True, blank=True) - def __str__(self): - return self.user.username - def save(self, *args, **kwargs): - if not self.customer_id: - # Get the last two digits of the current year - current_year = str(datetime.now().year)[-2:] - # Find the maximum project ID in the database and increment it - max_id = CustomerProfile.objects.aggregate(models.Max('customer_id'))['customer_id__max'] - new_id = str(int(max_id[-4:]) + 1).zfill(4) if max_id else '0001' # If no existing records, start with '0001' - self.customer_id = current_year + new_id # Add 'p' prefix - super(CustomerProfile, self).save(*args, **kwargs) - diff --git a/osinaweb/osinacore/templates/details_templates/customer-details.html b/osinaweb/osinacore/templates/details_templates/customer-details.html index fe1dedb3..bf2863a8 100644 --- a/osinaweb/osinacore/templates/details_templates/customer-details.html +++ b/osinaweb/osinacore/templates/details_templates/customer-details.html @@ -93,14 +93,14 @@
-
+
-

Businesses

+

Businesses

@@ -132,7 +132,7 @@ - {% for business in customer.businesses.all %} + {% for business in customer.business_set.all %}

{{ business.name }}

diff --git a/osinaweb/osinacore/templates/details_templates/project-details.html b/osinaweb/osinacore/templates/details_templates/project-details.html index 0c772f81..7affaddb 100644 --- a/osinaweb/osinacore/templates/details_templates/project-details.html +++ b/osinaweb/osinacore/templates/details_templates/project-details.html @@ -77,13 +77,13 @@ Project
-
+

Client: {{project.customer.user.first_name}} @@ -155,17 +155,36 @@

+ +
+

Tags:

+
+ + + + + +
+
+ +
+ class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
-

User Stories

+

User Stories

@@ -250,13 +269,13 @@
+ class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
-

Credentials

+

Credentials

@@ -318,13 +337,13 @@
+ class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
-

Related files

+

Related files

@@ -382,118 +401,53 @@
-
-
-
-

Notes

-
- - +
+
+

Notes

- - - - - - - - - - - - - - - - {% for note in project_notes %} - - - - - - - - - - {% endfor %} - - {% if project_notes.count == 0 %} - - - - {% endif %} - -
- Note - - Date - - Added By - - Actions -
-

{{ note.text }}

-
-

{{ note.date }}

-
-

{{ note.user.username }}

-
-
- - -
-
- No Available Notes -
-
-
- - - -
-

Tags:

-
+ class="h-full rounded-tr-md px-4 bg-secondosiblue text-gray-200 text-[18px] outline-none border-none cursor-pointer flex justify-center items-center addProjectNoteButton" + data-modal-url="{% url 'addprojectnotemodal' project.project_id %}"> + + +
- +
+ {% for note in project_notes %} +
+
+

{{ note.date|date:"F j, Y" }}

+ +
+
+

+ {{ note.text }} +

+
+
- + {% endfor %}
- -
-
-

Filter Tasks by Epics

+
+
+

Filter Tasks by Epics

|

@@ -510,7 +464,7 @@ -
+
diff --git a/osinaweb/osinacore/templates/details_templates/task-details.html b/osinaweb/osinacore/templates/details_templates/task-details.html index 6819ef35..8703e4a5 100644 --- a/osinaweb/osinacore/templates/details_templates/task-details.html +++ b/osinaweb/osinacore/templates/details_templates/task-details.html @@ -5,17 +5,23 @@
-
+

{{task.name}}

-
+
- - - - -

Total Time: {{ task.total_task_time.0 }}{% if task.total_task_time.0 == 1 %}hr{% else %}hrs{% endif %} {{ task.total_task_time.1 }}{% if task.total_task_time.1 == 1 %}min{% else %}mins{% endif %} {{ task.total_task_time.2 }}{% if task.total_task_time.2 == 1 %}sec{% else %}secs{% endif %}

+ + + + +

Total Time: {{ task.total_task_time.0 }} + {% if task.total_task_time.0 == 1 %}hr{% else %}hrs{% endif %} {{ task.total_task_time.1 }} + {% if task.total_task_time.1 == 1 %}min{% else %}mins{% endif %} {{ task.total_task_time.2 }} + {% if task.total_task_time.2 == 1 %}sec{% else %}secs{% endif %}

@@ -33,7 +39,7 @@
-
+

Description:

+ +
+

Tags:

+
+ + + + + +
+
+
+ class=" bg-gray-200 rounded-t-md flex justify-between items-center text-white text-xl font-bold h-[50px]">
-

Points

+

Points

-
- {% if points %} - {% for point in points %} - - -
+
+
+ {% if point.status == 'Completed' %} +

{{point.text}}

+ {% else %} +

{{point.text}}

+ {% endif %} +
+
+ {% if point.status == 'Not Completed' or point.status == 'Paused' and not point.status == 'Completed' %} + + + + {% endif %} - -
-

Tags:

-
- + {% if point.status == 'Working On' and not point.status == 'Completed' %} + + + + {% endif %} - + {% if not point.status == 'Completed' and not point.status == 'Paused' %} + + + + {% endif %} - + + {% if point.status == 'Completed' %} + + {% endif %} + + {% if not point.status == 'Completed' %} +
+ {% csrf_token %} + +
+ {% endif %} +
+
+ +
+
+

Total Time: + + {{ point.total_activity_time.0 }} hours, + {{ point.total_activity_time.1 }} minutes, + {{ point.total_activity_time.2 }} seconds + +

+
+ +
+ {% if point.status == 'Completed' %} +

Completed

+ {% elif point.status == 'Working On' %} +

Working On

+ {% elif point.status == 'Paused' %} +

Paused

+ {% else %} +

Created

+ {% endif %} +
+
+
+ {% endfor %} + {% else %} +
+

No Available Points

+
+ {% endif %}
+
diff --git a/osinaweb/osinacore/templates/epic-fetched-tasks.html b/osinaweb/osinacore/templates/epic-fetched-tasks.html index 99c4ef6a..b3d65336 100644 --- a/osinaweb/osinacore/templates/epic-fetched-tasks.html +++ b/osinaweb/osinacore/templates/epic-fetched-tasks.html @@ -19,235 +19,53 @@
- - -