diff --git a/osinaweb/billing/__pycache__/models.cpython-310.pyc b/osinaweb/billing/__pycache__/models.cpython-310.pyc index 6692b3d6..4e0036be 100644 Binary files a/osinaweb/billing/__pycache__/models.cpython-310.pyc and b/osinaweb/billing/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/billing/__pycache__/views.cpython-310.pyc b/osinaweb/billing/__pycache__/views.cpython-310.pyc index 45b67e38..f57ba1f5 100644 Binary files a/osinaweb/billing/__pycache__/views.cpython-310.pyc and b/osinaweb/billing/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/billing/add/__pycache__/views.cpython-310.pyc b/osinaweb/billing/add/__pycache__/views.cpython-310.pyc index 2203774c..5fdb78a0 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-310.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/billing/models.py b/osinaweb/billing/models.py index 9f43a979..47b2c202 100644 --- a/osinaweb/billing/models.py +++ b/osinaweb/billing/models.py @@ -58,9 +58,16 @@ class Order(models.Model): return None def save(self, *args, **kwargs): if not self.order_id: - order_count = Order.objects.filter(customer=self.customer).count() - order_count_str = str(order_count).zfill(4) - self.order_id = f"{self.customer.customer_id}-{order_count_str}" + current_year_last_two_digits = timezone.now().strftime('%y') + last_order = Order.objects.filter(order_id__startswith=f'O{current_year_last_two_digits}').order_by('-order_id').first() + if last_order: + last_order_number = int(last_order.order_id[4:]) + new_order_number = last_order_number + 1 + else: + new_order_number = 0 + + new_order_number_str = str(new_order_number).zfill(4) + self.order_id = f'O{current_year_last_two_digits}{new_order_number_str}' super(Order, self).save(*args, **kwargs) diff --git a/osinaweb/billing/views.py b/osinaweb/billing/views.py index 85a5c2a2..06eb3252 100644 --- a/osinaweb/billing/views.py +++ b/osinaweb/billing/views.py @@ -17,7 +17,7 @@ def items(request, *args, **kwargs): def orders(request, *args, **kwargs): - orders = Order.objects.all().order_by('-id') + orders = Order.objects.all().filter(orderstatus__isnull=False).order_by('-id') context = { 'orders': orders, } diff --git a/osinaweb/customercore/payment/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/payment/__pycache__/views.cpython-310.pyc index 4bfccda0..b74488a2 100644 Binary files a/osinaweb/customercore/payment/__pycache__/views.cpython-310.pyc and b/osinaweb/customercore/payment/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/payment/views.py b/osinaweb/customercore/payment/views.py index f8233c76..93f578a1 100644 --- a/osinaweb/customercore/payment/views.py +++ b/osinaweb/customercore/payment/views.py @@ -126,9 +126,9 @@ def buy_now(request, item_id): @customer_login_required def buy_now_checkout(request): - api_username = 'merchant.TEST06127800' - api_password = '37846250a67c70e7fe9f82cf6ca81f93' - merchant_id = 'TEST06127800' + api_username = 'merchant.06127800' + api_password = '549c33e1bc4aea6fcf96f9943e6c0256' + merchant_id = '06127800' merchant_name = 'Ositcom Sal' customer = request.user.customerprofile diff --git a/osinaweb/customercore/templates/products/osicard-plans.html b/osinaweb/customercore/templates/products/osicard-plans.html index 6b1f4d44..f1ffad85 100644 --- a/osinaweb/customercore/templates/products/osicard-plans.html +++ b/osinaweb/customercore/templates/products/osicard-plans.html @@ -39,12 +39,19 @@

Features:

+
+ + + +

One business

+
-

One user

+

One profile

Features:
+
+ + + +

One business

+
-

One user

+

10 profiles

-

One digital business card

+

10 digital business cards

-

Unlimited user

+

One business

+
+
+ + + +

Unlimited profiles

-

Unlimited digital business card

+

Unlimited digital business cards