new
parent
040fc88d40
commit
48b30a4cf0
Binary file not shown.
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.5 on 2024-04-23 18:23
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('billing', '0040_rename_due_at_orderitem_end_at_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='orderitem',
|
||||
name='active',
|
||||
field=models.BooleanField(default=False, null=True),
|
||||
),
|
||||
]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
from billing.models import *
|
||||
from osinacore.models import *
|
||||
|
||||
def utilities(request):
|
||||
active_subscriptions = None
|
||||
if request.user.is_authenticated and CustomerProfile.objects.filter(user=request.user):
|
||||
customer = request.user.customerprofile
|
||||
active_subscriptions = OrderItem.objects.filter(active=True, order__customer=customer)
|
||||
|
||||
|
||||
|
||||
return {'active_subscriptions': active_subscriptions,}
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue