update
This commit is contained in:
parent
b0c234b59a
commit
e03fded3a4
@ -6,7 +6,7 @@ class InventoryConfig(AppConfig):
|
||||
|
||||
def ready(self):
|
||||
import inventory.signals
|
||||
from decimal import Decimal
|
||||
from inventory.models import VatRate
|
||||
VatRate.objects.get_or_create(rate=Decimal('0.15'), is_active=True)
|
||||
# from decimal import Decimal
|
||||
# from inventory.models import VatRate
|
||||
# VatRate.objects.get_or_create(rate=Decimal('0.15'), is_active=True)
|
||||
|
||||
|
||||
@ -136,7 +136,21 @@ class CustomerForm(forms.Form):
|
||||
last_name = forms.CharField()
|
||||
arabic_name = forms.CharField()
|
||||
email = forms.EmailField()
|
||||
phone_number = PhoneNumberField(region="SA")
|
||||
phone_number = PhoneNumberField(
|
||||
label=_("Phone Number"),
|
||||
widget=forms.TextInput(
|
||||
attrs={
|
||||
"placeholder": _("Phone"),
|
||||
}
|
||||
),
|
||||
region="SA",
|
||||
error_messages={
|
||||
"required": _("This field is required."),
|
||||
"invalid": _("Phone number must be in the format 05xxxxxxxx"),
|
||||
},
|
||||
required=True,
|
||||
)
|
||||
|
||||
national_id = forms.CharField(max_length=10,required=False)
|
||||
crn = forms.CharField(required=False)
|
||||
vrn = forms.CharField(required=False)
|
||||
@ -790,9 +804,9 @@ class InvoiceModelCreateForm(InvoiceModelCreateFormBase):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.fields["cash_account"].widget = forms.HiddenInput()
|
||||
self.fields["prepaid_account"].widget = forms.HiddenInput()
|
||||
self.fields["unearned_account"].widget = forms.HiddenInput()
|
||||
# self.fields["cash_account"].widget = forms.HiddenInput()
|
||||
# self.fields["prepaid_account"].widget = forms.HiddenInput()
|
||||
# self.fields["unearned_account"].widget = forms.HiddenInput()
|
||||
self.fields["date_draft"] = forms.DateField(
|
||||
widget=DateInput(attrs={"type": "date"})
|
||||
)
|
||||
|
||||
@ -15,6 +15,7 @@ from django_ledger.io.io_core import get_localdate
|
||||
from django.core.exceptions import ValidationError
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
from django.utils.timezone import now
|
||||
from django.contrib.auth.models import Group
|
||||
|
||||
from inventory.utils import get_user_type
|
||||
from .mixins import LocalizedNameMixin
|
||||
@ -1007,6 +1008,11 @@ class Staff(models.Model, LocalizedNameMixin):
|
||||
EntityManagementModel.objects.get_or_create(
|
||||
user=self.user,entity=self.dealer.entity
|
||||
)
|
||||
else:
|
||||
self.user.groups.clear()
|
||||
group = Group.objects.filter(customgroup__name__iexact=self.staff_type).first()
|
||||
if group:
|
||||
self.add_group(group)
|
||||
class Meta:
|
||||
verbose_name = _("Staff")
|
||||
verbose_name_plural = _("Staff")
|
||||
@ -1318,6 +1324,18 @@ class Lead(models.Model):
|
||||
return self.schedules.order_by('-scheduled_at').first()
|
||||
def get_latest_schedules(self):
|
||||
return self.schedules.filter(scheduled_at__gt=now()).exclude(status='Canceled').order_by('-scheduled_at')[:5]
|
||||
def get_all_schedules(self):
|
||||
return self.schedules.all().order_by('-scheduled_at')
|
||||
def get_calls(self):
|
||||
return self.get_all_schedules().filter(scheduled_type='Call')
|
||||
def get_meetings(self):
|
||||
return self.get_all_schedules().filter(scheduled_type='Meeting')
|
||||
def get_emails(self):
|
||||
return Email.objects.filter(content_type__model="lead", object_id=self.id)
|
||||
def get_notes(self):
|
||||
return Notes.objects.filter(content_type__model="lead", object_id=self.id)
|
||||
def get_activities(self):
|
||||
return Activity.objects.filter(content_type__model="lead", object_id=self.id)
|
||||
|
||||
class Schedule(models.Model):
|
||||
PURPOSE_CHOICES = [
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
from django.contrib.auth.models import Group
|
||||
from decimal import Decimal
|
||||
from django.db.models.signals import post_save, post_delete, pre_delete, pre_save
|
||||
from inventory.models import VatRate
|
||||
from plans.quota import get_user_quota
|
||||
|
||||
from .utils import to_dict
|
||||
from django.dispatch import receiver
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
@ -645,7 +645,7 @@ def create_ledger_vendor(sender, instance, created, **kwargs):
|
||||
if created:
|
||||
entity = EntityModel.objects.filter(name=instance.dealer.name).first()
|
||||
additionals = to_dict(instance)
|
||||
entity.create_vendor(
|
||||
vendor = entity.create_vendor(
|
||||
vendor_model_kwargs={
|
||||
"vendor_name": instance.name,
|
||||
"vendor_number": instance.crn,
|
||||
@ -659,6 +659,7 @@ def create_ledger_vendor(sender, instance, created, **kwargs):
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
coa = entity.get_default_coa()
|
||||
last_account = entity.get_all_accounts().filter(role=roles.LIABILITY_CL_ACC_PAYABLE).order_by('-created').first()
|
||||
# code = f"{int(last_account.code)}{1:03d}"
|
||||
@ -676,17 +677,6 @@ def create_ledger_vendor(sender, instance, created, **kwargs):
|
||||
active=True
|
||||
)
|
||||
print(f"VendorModel created for Vendor: {instance.name}")
|
||||
else:
|
||||
additionals = to_dict(instance)
|
||||
entity.get_vendors().filter(email=instance.email).first().update(
|
||||
vendor_name= instance.name,
|
||||
vendor_number= instance.crn,
|
||||
address_1= instance.address,
|
||||
phone= instance.phone_number,
|
||||
email= instance.email,
|
||||
tax_id_number= instance.vrn,
|
||||
additional_info= additionals,
|
||||
)
|
||||
|
||||
@receiver(post_save, sender=models.CustomerModel)
|
||||
def create_customer_user(sender, instance, created, **kwargs):
|
||||
@ -938,6 +928,10 @@ def create_dealer_settings(sender, instance, created, **kwargs):
|
||||
# raise ValidationError(_("You have reached the maximum number of staff users allowed for your plan."))
|
||||
|
||||
|
||||
@receiver(post_save, sender=models.Dealer)
|
||||
def create_vat(sender, instance, created, **kwargs):
|
||||
VatRate.objects.get_or_create(rate=Decimal('0.15'), is_active=True)
|
||||
|
||||
@receiver(post_save, sender=models.Dealer)
|
||||
def create_make_ledger_accounts(sender, instance, created, **kwargs):
|
||||
if created:
|
||||
@ -960,6 +954,7 @@ def create_make_ledger_accounts(sender, instance, created, **kwargs):
|
||||
active=True
|
||||
)
|
||||
|
||||
|
||||
# @receiver(post_save, sender=VendorModel)
|
||||
# def create_vendor_accounts(sender, instance, created, **kwargs):
|
||||
# if created:
|
||||
@ -982,7 +977,7 @@ def create_make_ledger_accounts(sender, instance, created, **kwargs):
|
||||
|
||||
def save_journal(car_finance,ledger,vendor):
|
||||
entity = ledger.entity
|
||||
|
||||
coa = entity.get_default_coa()
|
||||
journal = JournalEntryModel.objects.create(
|
||||
posted=False,
|
||||
description=f"Finances of Car:{car_finance.car.vin} for Vendor:{car_finance.car.vendor.vendor_name}",
|
||||
@ -994,7 +989,23 @@ def save_journal(car_finance,ledger,vendor):
|
||||
ledger.save()
|
||||
|
||||
inventory_account = entity.get_default_coa_accounts().filter(role=roles.ASSET_CA_INVENTORY).first()
|
||||
vendor_account = entity.get_default_coa_accounts().get(name=vendor.vendor_name)
|
||||
vendor_account = entity.get_default_coa_accounts().filter(name=vendor.vendor_name).first()
|
||||
|
||||
if not vendor_account:
|
||||
last_account = entity.get_all_accounts().filter(role=roles.LIABILITY_CL_ACC_PAYABLE).order_by('-created').first()
|
||||
if len(last_account.code) == 4:
|
||||
code = f"{int(last_account.code)}{1:03d}"
|
||||
elif len(last_account.code) > 4:
|
||||
code = f"{int(last_account.code)+1}"
|
||||
|
||||
vendor_account = entity.create_account(
|
||||
name=vendor.vendor_name,
|
||||
code=code,
|
||||
role=roles.LIABILITY_CL_ACC_PAYABLE,
|
||||
coa_model=coa,
|
||||
balance_type="credit",
|
||||
active=True
|
||||
)
|
||||
additional_services_account = entity.get_default_coa_accounts().filter(name="Additional Services",role=roles.COGS).first()
|
||||
|
||||
# Debit Inventory Account
|
||||
|
||||
@ -416,6 +416,9 @@ path(
|
||||
path(
|
||||
"ledgers/", views.LedgerModelListView.as_view(), name="ledger_list"
|
||||
),
|
||||
path(
|
||||
"ledgers/create/", views.LedgerModelCreateView.as_view(), name="ledger_create"
|
||||
),
|
||||
path(
|
||||
"ledgers/<slug:entity_slug>/detail/<uuid:pk>/", views.LedgerModelDetailView.as_view(), name="ledger_detail"
|
||||
),
|
||||
@ -451,6 +454,35 @@ path(
|
||||
path('journalentries/<slug:entity_slug>/<uuid:ledger_pk>/detail/<uuid:je_pk>/txs/',
|
||||
views.JournalEntryModelTXSDetailView.as_view(),
|
||||
name='journalentry_txs'),
|
||||
# ledger actions
|
||||
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/post/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='post'),
|
||||
name='ledger-action-post'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/post-journal-entries/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='post_journal_entries'),
|
||||
name='ledger-action-post-journal-entries'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unpost/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='unpost'),
|
||||
name='ledger-action-unpost'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/lock/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='lock'),
|
||||
name='ledger-action-lock'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/lock-journal-entries/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='lock_journal_entries'),
|
||||
name='ledger-action-lock-journal-entries'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unlock/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='unlock'),
|
||||
name='ledger-action-unlock'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/hide/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='hide'),
|
||||
name='ledger-action-hide'),
|
||||
path('ledgers/<slug:entity_slug>/action/<uuid:ledger_pk>/unhide/',
|
||||
views.LedgerModelModelActionView.as_view(action_name='unhide'),
|
||||
name='ledger-action-unhide'),
|
||||
path('ledgers/<slug:entity_slug>/delete/<uuid:ledger_pk>/',
|
||||
views.LedgerModelDeleteView.as_view(),
|
||||
name='ledger-delete'),
|
||||
# Bank Account
|
||||
path(
|
||||
"bank_accounts/", views.BankAccountListView.as_view(), name="bank_account_list"
|
||||
|
||||
@ -908,33 +908,33 @@ def handle_account_process(invoice,amount,finance_data):
|
||||
TransactionModel.objects.create(
|
||||
journal_entry=journal,
|
||||
account=make_account, # Debit car make Account
|
||||
amount=Decimal(car.finances.total),
|
||||
amount=Decimal(finance_data.get("grand_total")),
|
||||
tx_type="debit",
|
||||
description="Payment Received",
|
||||
)
|
||||
TransactionModel.objects.create(
|
||||
journal_entry=journal,
|
||||
account=additional_services_account, # Debit Additional Services
|
||||
amount=Decimal(car.finances.total_additionals),
|
||||
tx_type="debit",
|
||||
description="Additional Services",
|
||||
)
|
||||
# TransactionModel.objects.create(
|
||||
# journal_entry=journal,
|
||||
# account=additional_services_account, # Debit Additional Services
|
||||
# amount=Decimal(car.finances.total_additionals),
|
||||
# tx_type="debit",
|
||||
# description="Additional Services",
|
||||
# )
|
||||
|
||||
TransactionModel.objects.create(
|
||||
journal_entry=journal,
|
||||
account=inventory_account, # Credit Inventory account
|
||||
amount=Decimal(car.finances.total),
|
||||
amount=Decimal(finance_data.get("grand_total")),
|
||||
tx_type="credit",
|
||||
description="Account Adjustment",
|
||||
)
|
||||
|
||||
TransactionModel.objects.create(
|
||||
journal_entry=journal,
|
||||
account=vat_payable_account, # Credit VAT Payable
|
||||
amount=finance_data.get("total_vat_amount"),
|
||||
tx_type="credit",
|
||||
description="VAT Payable on Invoice",
|
||||
)
|
||||
# TransactionModel.objects.create(
|
||||
# journal_entry=journal,
|
||||
# account=vat_payable_account, # Credit VAT Payable
|
||||
# amount=finance_data.get("total_vat_amount"),
|
||||
# tx_type="credit",
|
||||
# description="VAT Payable on Invoice",
|
||||
# )
|
||||
|
||||
def create_make_accounts(dealer):
|
||||
entity = dealer.entity
|
||||
|
||||
1277
inventory/views.py
1277
inventory/views.py
File diff suppressed because it is too large
Load Diff
117
scripts/run.py
117
scripts/run.py
@ -1,4 +1,4 @@
|
||||
from django_ledger.forms.account import AccountModelUpdateForm,AccountModelCreateForm
|
||||
from django_ledger.forms.account import AccountModelUpdateForm, AccountModelCreateForm
|
||||
import requests
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
@ -7,12 +7,29 @@ from django.contrib.auth.models import Group
|
||||
from django_ledger.models.invoice import InvoiceModel
|
||||
from django_ledger.utils import accruable_net_summary
|
||||
from decimal import Decimal
|
||||
from django_ledger.models import EstimateModel,EntityModel,ItemModel,ItemTransactionModel,AccountModel,CustomerModel,EntityManagementModel
|
||||
from django_ledger.models import (
|
||||
EstimateModel,
|
||||
EntityModel,
|
||||
ItemModel,
|
||||
ItemTransactionModel,
|
||||
AccountModel,
|
||||
CustomerModel,
|
||||
EntityManagementModel,
|
||||
)
|
||||
from rich import print
|
||||
from datetime import date
|
||||
from inventory.models import Car, Dealer, VatRate,Lead,CarMake,CarModel,Schedule,CustomGroup
|
||||
from inventory.models import (
|
||||
Car,
|
||||
Dealer,
|
||||
VatRate,
|
||||
Lead,
|
||||
CarMake,
|
||||
CarModel,
|
||||
Schedule,
|
||||
CustomGroup,
|
||||
)
|
||||
from inventory.utils import CarFinanceCalculator
|
||||
from appointment.models import Appointment,AppointmentRequest,Service,StaffMember
|
||||
from appointment.models import Appointment, AppointmentRequest, Service, StaffMember
|
||||
from django.contrib.auth import get_user_model
|
||||
from django_ledger.io.io_core import get_localdate
|
||||
from datetime import datetime, timedelta
|
||||
@ -23,6 +40,8 @@ from django_ledger.io import roles
|
||||
User = get_user_model()
|
||||
|
||||
load_dotenv(".env")
|
||||
|
||||
|
||||
def run():
|
||||
# print(Service.objects.first().pk)
|
||||
# print(Appointment.objects.first().client)
|
||||
@ -101,7 +120,6 @@ def run():
|
||||
# hash_object.update(f"{i.id_car_make.name}{i.id_car_model.name}".encode('utf-8'))
|
||||
# print(hash_object.hexdigest() , i.id_car_make.name, i.id_car_model.name)
|
||||
|
||||
|
||||
# def get_item(tx:ItemTransactionModel):
|
||||
# data = {"data": {}}
|
||||
# data["data"]["info"] = tx.item_model.additional_info.get('car_info')
|
||||
@ -121,9 +139,9 @@ def run():
|
||||
# for transaction in transactions:
|
||||
# output.append(get_item(transaction))
|
||||
# print(output)
|
||||
# info = item.additional_info["car_info"]
|
||||
# finance = item.additional_info["car_finance"]
|
||||
# print({"vin":info["make"],"mode":info["model"],"year":info["year"],"trim":info["trim"],"mileage":info["mileage"],"cost_price":finance["cost_price"],"selling_price":finance["selling_price"]})
|
||||
# info = item.additional_info["car_info"]
|
||||
# finance = item.additional_info["car_finance"]
|
||||
# print({"vin":info["make"],"mode":info["model"],"year":info["year"],"trim":info["trim"],"mileage":info["mileage"],"cost_price":finance["cost_price"],"selling_price":finance["selling_price"]})
|
||||
# for account in AccountModel.objects.all():
|
||||
# print(account.path)
|
||||
|
||||
@ -156,8 +174,7 @@ def run():
|
||||
# EntityManagementModel.objects.create(entity=,user=)
|
||||
# print(Permission.objects.filter(codename__icontains='customermodel').first().codename)
|
||||
# print(os.getenv("DJANGO_ALLOWED_HOSTS"))
|
||||
|
||||
|
||||
|
||||
car_makes = CarMake.objects.all()[:10]
|
||||
|
||||
# Fetch the entity and COGS account
|
||||
@ -167,8 +184,8 @@ def run():
|
||||
|
||||
# Loop through car makes and create accounts
|
||||
for make in range(len(car_makes)): # Start from 0 to include all items
|
||||
# Generate a unique code
|
||||
|
||||
# Generate a unique code
|
||||
|
||||
# Create the account
|
||||
# account = AccountModel.objects.create(
|
||||
# name=car_makes[make].name,
|
||||
@ -188,11 +205,16 @@ def run():
|
||||
# balance_type="debit",
|
||||
# active=True
|
||||
# )
|
||||
last_account = entity.get_all_accounts().filter(role=roles.COGS).order_by('-created').first()
|
||||
last_account = (
|
||||
entity.get_all_accounts()
|
||||
.filter(role=roles.COGS)
|
||||
.order_by("-created")
|
||||
.first()
|
||||
)
|
||||
if len(last_account.code) == 4:
|
||||
code = f"{int(last_account.code)}{1:03d}"
|
||||
elif len(last_account.code) > 4:
|
||||
code = f"{int(last_account.code)+1}"
|
||||
code = f"{int(last_account.code) + 1}"
|
||||
|
||||
# account = entity.create_account(
|
||||
# name=car_makes[make].name,
|
||||
@ -209,24 +231,29 @@ def run():
|
||||
coa_model=coa,
|
||||
balance_type="debit",
|
||||
active=True,
|
||||
depth=3,
|
||||
)
|
||||
#00060004001S
|
||||
last_account = entity.get_all_accounts().filter(role=roles.COGS).order_by('-created').first()
|
||||
path = ''
|
||||
depth=3,
|
||||
)
|
||||
# 00060004001S
|
||||
last_account = (
|
||||
entity.get_all_accounts()
|
||||
.filter(role=roles.COGS)
|
||||
.order_by("-created")
|
||||
.first()
|
||||
)
|
||||
path = ""
|
||||
if len(last_account.code) == 12:
|
||||
path = f"{int(last_account.path)}{1:03d}"
|
||||
elif len(last_account.code) > 12:
|
||||
path = f"{int(last_account.path)+1}"
|
||||
path = f"{int(last_account.path) + 1}"
|
||||
# account.path = path
|
||||
try:
|
||||
try:
|
||||
account = cogs.add_child(instance=account)
|
||||
account.move(cogs, pos="sorted-sibling")
|
||||
account.refresh_from_db()
|
||||
account.save()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
# form_data = {
|
||||
# 'name': car_makes[make].name,
|
||||
# 'code': code,
|
||||
@ -235,27 +262,27 @@ def run():
|
||||
# 'active': True,
|
||||
# 'coa_model': coa # Ensure the COA model is included
|
||||
# }
|
||||
|
||||
|
||||
# Create the form instance with the data
|
||||
# create_form = AccountModelCreateForm(data=form_data, coa_model=coa)
|
||||
# # Validate and save the form
|
||||
# if create_form.is_valid():
|
||||
# account = create_form.save(commit=False)
|
||||
# account.coa_model = coa # Set the entity for the account
|
||||
|
||||
# Add the account as a child of the COGS account
|
||||
# cogs.add_child(instance=account)
|
||||
|
||||
# print(f"Account '{account.name}' created successfully.")
|
||||
# else:
|
||||
# print(f"Failed to create account. Errors: {create_form.errors}")
|
||||
# form = AccountModelUpdateForm(instance=account)
|
||||
|
||||
# if form.is_valid():
|
||||
# instance = form.save(commit=False)
|
||||
# instance._position = "sorted-sibling"
|
||||
# instance._ref_node_id = cogs.pk
|
||||
# instance.save()
|
||||
# print(f"Account {account.name} created successfully.")
|
||||
# else:
|
||||
# print(f"Failed to create account {account.name}. Errors: {form.errors}")
|
||||
# create_form = AccountModelCreateForm(data=form_data, coa_model=coa)
|
||||
# # Validate and save the form
|
||||
# if create_form.is_valid():
|
||||
# account = create_form.save(commit=False)
|
||||
# account.coa_model = coa # Set the entity for the account
|
||||
|
||||
# Add the account as a child of the COGS account
|
||||
# cogs.add_child(instance=account)
|
||||
|
||||
# print(f"Account '{account.name}' created successfully.")
|
||||
# else:
|
||||
# print(f"Failed to create account. Errors: {create_form.errors}")
|
||||
# form = AccountModelUpdateForm(instance=account)
|
||||
|
||||
# if form.is_valid():
|
||||
# instance = form.save(commit=False)
|
||||
# instance._position = "sorted-sibling"
|
||||
# instance._ref_node_id = cogs.pk
|
||||
# instance.save()
|
||||
# print(f"Account {account.name} created successfully.")
|
||||
# else:
|
||||
# print(f"Failed to create account {account.name}. Errors: {form.errors}")
|
||||
|
||||
38
scripts/run2.py
Normal file
38
scripts/run2.py
Normal file
@ -0,0 +1,38 @@
|
||||
from django_ledger.forms.account import AccountModelUpdateForm,AccountModelCreateForm
|
||||
import requests
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from django.contrib.auth.models import Permission
|
||||
from django.contrib.auth.models import Group
|
||||
from django_ledger.models.invoice import InvoiceModel
|
||||
from django_ledger.utils import accruable_net_summary
|
||||
from decimal import Decimal
|
||||
from django_ledger.models import EstimateModel,EntityModel,ItemModel,ItemTransactionModel,AccountModel,CustomerModel,EntityManagementModel
|
||||
from rich import print
|
||||
from datetime import date
|
||||
from inventory.models import Car, Dealer, VatRate,Lead,CarMake,CarModel,Schedule,CustomGroup
|
||||
from inventory.utils import CarFinanceCalculator
|
||||
from appointment.models import Appointment,AppointmentRequest,Service,StaffMember
|
||||
from django.contrib.auth import get_user_model
|
||||
from django_ledger.io.io_core import get_localdate
|
||||
from datetime import datetime, timedelta
|
||||
from django.utils import timezone
|
||||
import hashlib
|
||||
from django_ledger.io import roles
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
load_dotenv(".env")
|
||||
def run():
|
||||
invoice = InvoiceModel.objects.filter(invoice_number='I-2025-0000000001').first()
|
||||
calculator = CarFinanceCalculator(invoice)
|
||||
finance_data = calculator.get_finance_data()
|
||||
|
||||
for i in invoice.get_itemtxs_data()[0]:
|
||||
car = Car.objects.get(vin=invoice.get_itemtxs_data()[0].first().item_model.name)
|
||||
print(car.finances.total + car.finances.total_additionals)
|
||||
print(car.finances.total_additionals)
|
||||
print(finance_data.get("total_vat_amount"))
|
||||
print(finance_data.get("total"))
|
||||
|
||||
|
||||
@ -24,9 +24,9 @@
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/favicons/favicon.ico' %}">
|
||||
<link rel="manifest" href="{% static 'images/favicons/manifest.json' %}">
|
||||
<meta name="msapplication-TileImage" content="{% static 'images/logos/logo-d.png' %}">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
|
||||
|
||||
<script src="{% static 'vendors/simplebar/simplebar.min.js' %}"></script>
|
||||
<script src="{% static 'js/config.js' %}"></script>
|
||||
<script src="{% static 'js/sweetalert2.all.min.js' %}"></script>
|
||||
@ -36,7 +36,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link href="{% static 'vendors/simplebar/simplebar.min.css' %}" rel="stylesheet">
|
||||
|
||||
|
||||
<link href="{% static 'vendors/flatpickr/flatpickr.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/custom.css' %}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.8/css/line.css">
|
||||
@ -105,7 +105,7 @@
|
||||
<script src="{% static 'vendors/dayjs/dayjs.min.js' %}"></script>
|
||||
<script src="{% static 'js/phoenix.js' %}"></script>
|
||||
<script src="{% static 'js/apexcharts.js' %}"></script>
|
||||
{% comment %} <script src="{% static 'vendors/echarts/echarts.min.js' %}"></script> {% endcomment %}
|
||||
<script src="{% static 'vendors/echarts/echarts.min.js' %}"></script>
|
||||
<script src="{% static 'js/crm-analytics.js' %}"></script>
|
||||
<script src="{% static 'js/travel-agency-dashboard.js' %}"></script>
|
||||
<script src="{% static 'js/crm-dashboard.js' %}"></script>
|
||||
@ -115,9 +115,9 @@
|
||||
<script src="{% static 'vendors/turf.min.js' %}"></script>
|
||||
<script src="{% static 'vendors/htmx.min.js' %}"></script>
|
||||
<script src="{% static 'vendors/swiper/swiper-bundle.min.js' %}"></script>
|
||||
<script src="{% static 'vendors/flatpickr/flatpickr.min.js' %}"></script>
|
||||
<script src="{% static 'vendors/flatpickr/flatpickr.min.js' %}"></script>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
{% if entity_slug %}
|
||||
let entitySlug = "{{ view.kwargs.entity_slug }}"
|
||||
{% endif %}
|
||||
@ -132,6 +132,6 @@
|
||||
let datePickers = document.querySelectorAll("[id^='djl-datepicker']")
|
||||
datePickers.forEach(dp => djLedger.getCalendar(dp.attributes.id.value, dateNavigationUrl))
|
||||
{% endif %}
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -7,8 +7,7 @@
|
||||
<h2 class="mb-0">{{ _("Opportunity details")}}</h2>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto d-flex">
|
||||
<button class="btn btn-phoenix-secondary px-3 px-sm-5 me-2"><span class="fa-solid fa-edit me-sm-2"></span><span class="d-none d-sm-inline">{{ _("Edit") }}</span></button>
|
||||
<button class="btn btn-phoenix-danger me-2"><span class="fa-solid fa-trash me-2"></span><span>{{ _("Delete") }}</span></button>
|
||||
|
||||
<div>
|
||||
<button class="btn px-3 btn-phoenix-secondary" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fa-solid fa-ellipsis"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-end p-0" style="z-index: 9999;">
|
||||
@ -19,8 +18,6 @@
|
||||
<a class="dropdown-item" href="{% url 'estimate_create_from_opportunity' opportunity.pk %}">{{ _("Create Quotation")}}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="">Report</a></li>
|
||||
<li><a class="dropdown-item" href="">Manage notifications</a></li>
|
||||
<li><a class="dropdown-item text-danger" href="">Delete Lead</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -32,11 +29,11 @@
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="row align-items-center g-3">
|
||||
<div class="col-12 col-sm-auto flex-1">
|
||||
<div class="col-12 col-sm-auto flex-1">
|
||||
{% if opportunity.car %}
|
||||
<h3 class="fw-bolder mb-2 line-clamp-1">{{ opportunity.car.id_car_make.get_local_name }} - {{ opportunity.car.id_car_model.get_local_name }} - {{ opportunity.car.year }}</h3>
|
||||
{% endif %}
|
||||
<h3 class="fw-bolder mb-2 line-clamp-1">{{ opportunity.customer.customer_name }}</h3>
|
||||
{% endif %}
|
||||
<h3 class="fw-bolder mb-2 line-clamp-1">{{ opportunity.customer.customer_name }}</h3>
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
{% if opportunity.car.finances %}
|
||||
<h5 class="mb-0 me-4">{{ opportunity.car.finances.total }} <span class="fw-light"><span class="currency">{{ CURRENCY }}</span></span></h5>
|
||||
@ -91,7 +88,7 @@
|
||||
<h5 class="mb-0 text-body-highlight me-2">{{ _("Status") }}</h5>
|
||||
<a href="#" class="fw-bold fs-9" hx-on:click="htmx.find('#id_status').disabled = !htmx.find('#id_status').disabled;this.text = htmx.find('#id_status').disabled ? 'Update Status' : 'Cancel'">{{ _("Update Status")}}</a>
|
||||
</div>
|
||||
{{status_form.status}}
|
||||
{{status_form.status}}
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<div class="d-flex flex-wrap justify-content-between mb-2">
|
||||
@ -99,7 +96,7 @@
|
||||
<a href="#" class="fw-bold fs-9" hx-on:click="htmx.find('#id_stage').disabled = !htmx.find('#id_stage').disabled;this.text = htmx.find('#id_stage').disabled ? 'Update Stage' : 'Cancel'">{{ _("Update Stage")}}</a>
|
||||
</div>
|
||||
{{status_form.stage}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -280,10 +277,10 @@
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link active" id="activity-tab" data-bs-toggle="tab" href="#tab-activity" role="tab" aria-controls="tab-activity" aria-selected="false" tabindex="-1"> <span class="fa-solid fa-chart-line me-2 tab-icon-color"></span>Activity</a></li>
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="notes-tab" data-bs-toggle="tab" href="#tab-notes" role="tab" aria-controls="tab-notes" aria-selected="false" tabindex="-1"> <span class="fa-solid fa-clipboard me-2 tab-icon-color"></span>Notes</a></li>
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="meeting-tab" data-bs-toggle="tab" href="#tab-meeting" role="tab" aria-controls="tab-meeting" aria-selected="true"> <span class="fa-solid fa-video me-2 tab-icon-color"></span>Meeting</a></li>
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="task-tab" data-bs-toggle="tab" href="#tab-task" role="tab" aria-controls="tab-task" aria-selected="true"> <span class="fa-solid fa-square-check me-2 tab-icon-color"></span>Task</a></li>
|
||||
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="task-tab" data-bs-toggle="tab" href="#tab-task" role="tab" aria-controls="tab-task" aria-selected="true"> <span class="fa-solid fa-square-check me-2 tab-icon-color"></span>Task</a></li> {% endcomment %}
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="call-tab" data-bs-toggle="tab" href="#tab-call" role="tab" aria-controls="tab-call" aria-selected="true"> <span class="fa-solid fa-phone me-2 tab-icon-color"></span>Call</a></li>
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="emails-tab" data-bs-toggle="tab" href="#tab-emails" role="tab" aria-controls="tab-emails" aria-selected="true"> <span class="fa-solid fa-envelope me-2 tab-icon-color"></span>Emails </a></li>
|
||||
<li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="attachments-tab" data-bs-toggle="tab" href="#tab-attachments" role="tab" aria-controls="tab-attachments" aria-selected="true"> <span class="fa-solid fa-paperclip me-2 tab-icon-color"></span>Attachments</a></li>
|
||||
{% comment %} <li class="nav-item text-nowrap me-2" role="presentation"><a class="nav-link" id="attachments-tab" data-bs-toggle="tab" href="#tab-attachments" role="tab" aria-controls="tab-attachments" aria-selected="true"> <span class="fa-solid fa-paperclip me-2 tab-icon-color"></span>Attachments</a></li> {% endcomment %}
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade active show" id="tab-activity" role="tabpanel" aria-labelledby="activity-tab">
|
||||
@ -302,7 +299,7 @@
|
||||
<button class="btn btn-phoenix-primary px-6">Add Activity</button>
|
||||
</div>
|
||||
</div>
|
||||
{% for activity in activities %}
|
||||
{% for activity in opportunity.lead.get_activities %}
|
||||
<div class="border-bottom border-translucent py-4">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex bg-primary-subtle rounded-circle flex-center me-3 bg-primary-subtle" style="width:25px; height:25px">
|
||||
@ -314,7 +311,7 @@
|
||||
<span class="fa-solid fa-users text-danger fs-8"></span>
|
||||
{% elif activity.activity_type == "whatsapp" %}
|
||||
<span class="fab fa-whatsapp text-success-dark fs-7"></span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<div class="d-flex justify-content-between flex-column flex-xl-row mb-2 mb-sm-0">
|
||||
@ -328,7 +325,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-notes" role="tabpanel" aria-labelledby="notes-tab">
|
||||
<h2 class="mb-4">Notes</h2>
|
||||
@ -346,7 +343,7 @@
|
||||
<div class="fs-9 text-body-tertiary text-opacity-85"><span class="fa-solid fa-clock me-2"></span><span class="fw-semibold me-1">{{note.created}}</span></div>
|
||||
<p class="fs-9 mb-0 text-body-tertiary text-opacity-85">by<a class="ms-1 fw-semibold" href="#!">{{note.created_by}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@ -368,329 +365,35 @@
|
||||
<button class="btn btn-link p-0 ms-3 fs-9 text-primary fw-bold text-decoration-none"><span class="fas fa-sort me-1 fw-extra-bold fs-10"></span>Sorting</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-primary"><span class="fa-solid fa-plus me-2"></span>Add Meeting </button>
|
||||
<a href="{% url 'schedule_lead' opportunity.lead.id %}" class="btn btn-primary"><span class="fa-solid fa-plus me-2"></span>Add Meeting </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<div class="col-xxl-6">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap mb-4 gap-2">
|
||||
<div class="mb-3 mb-sm-0">
|
||||
<h4 class="line-clamp-1 mb-2 mb-sm-1">Onboarding Meeting</h4>
|
||||
<div><span class="uil uil-calendar-alt text-primary me-2"></span><span class="fw-semibold text-body-secondary fs-9">5:30 pm</span><span class="text-body-tertiary text-opacity-85"> to </span><span class="fw-semibold text-body-secondary fs-9">7:00pm</span><span class="text-body-secondary fs-9"> - 1h 30min</span></div>
|
||||
</div>
|
||||
<div class="avatar-group avatar-group-dense">
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="../../assets/img/team/9.webp" alt="" />
|
||||
|
||||
</div>
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="../../assets/img/team/25.webp" alt="" />
|
||||
|
||||
</div>
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="../../assets/img/team/32.webp" alt="" />
|
||||
|
||||
</div>
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="../../assets/img/team/35.webp" alt="" />
|
||||
|
||||
</div>
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<div class="avatar-name rounded-circle "><span>+1</span></div>
|
||||
{% for metting in opportunity.lead.get_meetings %}
|
||||
<div class="col-xxl-6">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap mb-4 gap-2">
|
||||
<div class="mb-3 mb-sm-0">
|
||||
<h4 class="line-clamp-1 mb-2 mb-sm-1">{{metting.purpose}}</h4>
|
||||
<div><span class="uil uil-calendar-alt text-primary me-2"></span><span class="fw-semibold text-body-secondary fs-9">{{metting.scheduled_at}}</span><span class="text-body-secondary fs-9"> - {{meeting.duration}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center"><span class="badge badge-phoenix me-2 badge-phoenix-primary ">today</span>
|
||||
<div class="d-flex align-items-center flex-1"><span class="fa-solid fa-circle me-1 text-danger" data-fa-transform="shrink-6 up-1"></span><span class="fw-bold fs-9 text-body">Urgent</span></div>
|
||||
<button class="btn btn-phoenix-primary"><span class="fa-solid fa-video me-2 d-none d-sm-inline-block"></span>Join</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-6">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap mb-4 gap-2">
|
||||
<div class="mb-3 mb-sm-0">
|
||||
<h4 class="line-clamp-1 mb-2 mb-sm-1">Agile Mindset Meetup</h4>
|
||||
<div><span class="uil uil-calendar-alt text-primary me-2"></span><span class="fw-semibold text-body-secondary fs-9">4:30 pm</span><span class="text-body-tertiary text-opacity-85"> to </span><span class="fw-semibold text-body-secondary fs-9">6:00pm</span><span class="text-body-secondary fs-9"> - 1h 30min</span></div>
|
||||
</div>
|
||||
<div class="avatar-group avatar-group-dense">
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="../../assets/img/team/11.webp" alt="" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<div class="avatar-name rounded-circle "><span>+1</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center"><span class="badge badge-phoenix me-2 badge-phoenix-warning">tomorrow</span>
|
||||
<div class="d-flex align-items-center flex-1"><span class="fa-solid fa-circle me-1 text-success" data-fa-transform="shrink-6 up-1"></span><span class="fw-bold fs-9 text-body">Medium</span></div>
|
||||
<button class="btn btn-phoenix-primary"><span class="fa-solid fa-video me-2 d-none d-sm-inline-block"></span>Join</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-6">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap mb-4 gap-2">
|
||||
<div class="mb-3 mb-sm-0">
|
||||
<h4 class="line-clamp-1 mb-2 mb-sm-1">Meeting Fundamentals</h4>
|
||||
<div><span class="uil uil-calendar-alt text-primary me-2"></span><span class="fw-semibold text-body-secondary fs-9">6:00 pm</span><span class="text-body-tertiary text-opacity-85"> to </span><span class="fw-semibold text-body-secondary fs-9">7:20pm</span><span class="text-body-secondary fs-9"> - 1h 20min</span></div>
|
||||
</div>
|
||||
<div class="avatar-group avatar-group-dense">
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<div class="avatar-name rounded-circle"><span>R</span></div>
|
||||
</div>
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<div class="avatar-name rounded-circle "><span>+2</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center"><span class="badge badge-phoenix me-2 badge-phoenix-warning">tomorrow</span>
|
||||
<div class="d-flex align-items-center flex-1"><span class="fa-solid fa-circle me-1 text-warning" data-fa-transform="shrink-6 up-1"></span><span class="fw-bold fs-9 text-body">High</span></div>
|
||||
<button class="btn btn-phoenix-primary"><span class="fa-solid fa-video me-2 d-none d-sm-inline-block"></span>Join</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-6">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start flex-wrap mb-4 gap-2">
|
||||
<div class="mb-3 mb-sm-0">
|
||||
<h4 class="line-clamp-1 mb-2 mb-sm-1">Design System Meeting</h4>
|
||||
<div><span class="uil uil-calendar-alt text-primary me-2"></span><span class="fw-semibold text-body-secondary fs-9">7:30 pm</span><span class="text-body-tertiary text-opacity-85"> to </span><span class="fw-semibold text-body-secondary fs-9">8:45pm</span><span class="text-body-secondary fs-9"> - 1h 45min</span></div>
|
||||
</div>
|
||||
<div class="avatar-group avatar-group-dense">
|
||||
<div class="avatar avatar-s rounded-circle">
|
||||
<img class="rounded-circle " src="{% static 'images/team/13.webp' %}" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center"><span class="badge badge-phoenix me-2 badge-phoenix-warning">tomorrow</span>
|
||||
<div class="d-flex align-items-center flex-1"><span class="fa-solid fa-circle me-1 text-info" data-fa-transform="shrink-6 up-1"></span><span class="fw-bold fs-9 text-body">Low</span></div>
|
||||
<button class="btn btn-phoenix-primary"><span class="fa-solid fa-video me-2 d-none d-sm-inline-block"></span>Join</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-task" role="tabpanel" aria-labelledby="task-tab">
|
||||
<h2 class="mb-4">Tasks</h2>
|
||||
<div class="row align-items-center g-0 justify-content-start mb-3">
|
||||
<div class="col-12 col-sm-auto">
|
||||
<div class="search-box w-100 mb-2 mb-sm-0" style="max-width:30rem;">
|
||||
<form class="position-relative">
|
||||
<input class="form-control search-input search" type="search" placeholder="Search tasks" aria-label="Search" />
|
||||
<span class="fas fa-search search-box-icon"></span>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto d-flex">
|
||||
<p class="mb-0 ms-sm-3 fs-9 text-body-tertiary fw-bold"><span class="fas fa-filter me-1 fw-extra-bold fs-10"></span>23 tasks</p>
|
||||
<button class="btn btn-link p-0 ms-3 fs-9 text-primary fw-bold"><span class="fas fa-sort me-1 fw-extra-bold fs-10"></span>Sorting</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-1">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-0" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-0">Platforms for data administration</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">19 Nov, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">11:56 PM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-2">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-1" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-1">Make wiser business choices.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">05 Nov, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">09:30 PM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-3">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-2" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-2">Market and consumer insights</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">02 Nov, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">05:25 AM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-4">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-3" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-3">Dashboards for business insights</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">29 Oct, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">08:21 PM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-5">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-4" checked="checked" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-4">Analytics and consultancy for data</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">21 Oct, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">03:45 PM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-6">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-5" checked="checked" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-5">Planning your locations Customer data platform</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">14 Oct, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">10:00 PM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-md-center hover-actions-trigger btn-reveal-trigger border-translucent py-3 gx-0 border-top">
|
||||
<div class="col-12 col-lg-auto flex-1">
|
||||
<div data-todo-offcanvas-toogle="data-todo-offcanvas-toogle" data-todo-offcanvas-target="todoOffcanvas-7">
|
||||
<div class="form-check mb-1 mb-md-0 d-flex align-items-center lh-1">
|
||||
<input class="form-check-input flex-shrink-0 form-check-line-through mt-0 me-2 form-check-input-undefined" type="checkbox" id="checkbox-todo-6" checked="checked" />
|
||||
<label class="form-check-label mb-0 fs-8 me-2 line-clamp-1" for="checkbox-todo-6">Promotion of technology</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto">
|
||||
<div class="d-flex ms-4 lh-1 align-items-center">
|
||||
<p class="text-body-tertiary fs-10 mb-md-0 me-2 me-lg-3 mb-0">12 Oct, 2022</p>
|
||||
<div class="d-none d-lg-block end-0 position-absolute" style="top: 23%;">
|
||||
<div class="hover-actions end-0">
|
||||
<button class="btn btn-phoenix-secondary btn-icon me-1 fs-10 text-body px-0 me-1"><span class="fas fa-edit"></span></button>
|
||||
<button class="btn btn-phoenix-secondary btn-icon fs-10 text-danger px-0"><span class="fas fa-trash"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hover-lg-hide">
|
||||
<p class="text-body-tertiary fs-10 ps-lg-3 border-start-lg fw-bold mb-md-0 mb-0">02:00 AM</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><a class="fw-bold fs-9 mt-4" href="#!"><span class="fas fa-plus me-1"></span>Add new task</a>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-call" role="tabpanel" aria-labelledby="call-tab">
|
||||
<div class="row align-items-center gx-4 gy-3 flex-wrap mb-3">
|
||||
<div class="col-auto d-flex flex-1">
|
||||
<h2 class="mb-0">Call</h2>
|
||||
</div>
|
||||
|
||||
<div class="col-auto">
|
||||
<div class="d-flex gap-3 gap-sm-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="allCall" type="radio" name="allCall" checked="checked" />
|
||||
<label class="form-check-label" for="allCall">All Call</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="incomingCall" type="radio" name="allCall" />
|
||||
<label class="form-check-label" for="incomingCall">Incoming Call</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" id="outgoingCall" type="radio" name="allCall" />
|
||||
<label class="form-check-label" for="outgoingCall">OutgoingCall</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-primary"><span class="fa-solid fa-plus me-2"></span>Add Call</button>
|
||||
<a href="{% url 'schedule_lead' opportunity.lead.id %}" class="btn btn-primary"><span class="fa-solid fa-plus me-2"></span>Add Call</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-top border-bottom border-translucent" id="leadDetailsTable" data-list='{"valueNames":["name","description","create_date","create_by","last_activity"],"page":5,"pagination":true}'>
|
||||
@ -698,47 +401,27 @@
|
||||
<table class="table fs-9 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"lead-details-table-body"}' />
|
||||
</div>
|
||||
</th>
|
||||
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="name" style="width:20%; min-width:100px">Name</th>
|
||||
<th class="sort align-middle pe-6 text-uppercase" scope="col" data-sort="description" style="width:20%; max-width:60px">description</th>
|
||||
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="create_date" style="width:20%; min-width:115px">create date</th>
|
||||
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="create_by" style="width:20%; min-width:150px">create by</th>
|
||||
<th class="sort align-middle ps-0 text-end text-uppercase" scope="col" data-sort="last_activity" style="width:20%; max-width:115px">Last Activity</th>
|
||||
<th class="align-middle pe-0 text-end" scope="col" style="width:15%;"></th>
|
||||
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="name" style="width:20%; min-width:100px">Purpose</th>
|
||||
<th class="sort align-middle pe-6 text-uppercase" scope="col" data-sort="description" style="width:20%; max-width:60px">Scheduled By</th>
|
||||
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="create_date" style="width:20%; min-width:115px">Created at</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list" id="lead-details-table-body">
|
||||
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"Name":{"avatar":"/team/35.webp","name":"Ansolo Lazinatov","status":"online"},"description":"Purchasing-Related Vendors","date":"Dec 29, 2021","creatBy":"Ansolo Lazinarov","lastActivity":{"iconColor":"text-success","label":"Active"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="name align-middle white-space-nowrap py-2 ps-0"><a class="d-flex align-items-center text-body-highlight" href="#!">
|
||||
<div class="avatar avatar-m me-3 status-online"><img class="rounded-circle" src="{% static 'images/team/35.webp' %}" alt="" />
|
||||
{% for call in opportunity.lead.get_calls %}
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="description align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 pe-6">{{call.purpose}}</td>
|
||||
<td class="create_date text-end align-middle white-space-nowrap text-body py-2">{{call.scheduled_by}}</td>
|
||||
<td class="create_by align-middle white-space-nowrap fw-semibold text-body-highlight">{{call.created_at}}</td>
|
||||
<td class="align-middle text-end white-space-nowrap pe-0 action py-2">
|
||||
<div class="btn-reveal-trigger position-static">
|
||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
|
||||
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
|
||||
</div>
|
||||
</div>
|
||||
<h6 class="mb-0 text-body-highlight fw-bold"></h6>
|
||||
</a></td>
|
||||
<td class="description align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2 pe-6">Purchasing-Related Vendors</td>
|
||||
<td class="create_date text-end align-middle white-space-nowrap text-body py-2">Dec 29, 2021</td>
|
||||
<td class="create_by align-middle white-space-nowrap fw-semibold text-body-highlight">Ansolo Lazinarov</td>
|
||||
<td class="last_activity align-middle text-center py-2">
|
||||
<div class="d-flex align-items-center flex-1"><span class="fa-solid fa-clock me-1 text-success" data-fa-transform="shrink-2 up-1"></span><span class="fw-bold fs-9 text-body">Active</span></div>
|
||||
</td>
|
||||
<td class="align-middle text-end white-space-nowrap pe-0 action py-2">
|
||||
<div class="btn-reveal-trigger position-static">
|
||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2"><a class="dropdown-item" href="#!">View</a><a class="dropdown-item" href="#!">Export</a>
|
||||
<div class="dropdown-divider"></div><a class="dropdown-item text-danger" href="#!">Remove</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -759,9 +442,7 @@
|
||||
<div>
|
||||
<div class="scrollbar">
|
||||
<ul class="nav nav-underline fs-9 flex-nowrap mb-1" id="emailTab" role="tablist">
|
||||
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0 active" id="mail-tab" data-bs-toggle="tab" href="#tab-mail" aria-controls="mail-tab" role="tab" aria-selected="true">Mails (68)<span class="text-body-tertiary fw-normal"></span></a></li>
|
||||
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0" id="drafts-tab" data-bs-toggle="tab" href="#tab-drafts" aria-controls="drafts-tab" role="tab" aria-selected="true">Drafts (6)<span class="text-body-tertiary fw-normal"></span></a></li>
|
||||
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0" id="schedule-tab" data-bs-toggle="tab" href="#tab-schedule" aria-controls="schedule-tab" role="tab" aria-selected="true">Scheduled (17)</a></li>
|
||||
<li class="nav-item me-3"><a class="nav-link text-nowrap border-0 active" id="mail-tab" data-bs-toggle="tab" href="#tab-mail" aria-controls="mail-tab" role="tab" aria-selected="true">Mails ({{opportunity.lead.get_emails|length}})<span class="text-body-tertiary fw-normal"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="search-box w-100 mb-3">
|
||||
@ -791,7 +472,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list" id="all-email-table-body">
|
||||
{% for email in emails.sent %}
|
||||
{% for email in opportunity.lead.get_emails %}
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
@ -806,201 +487,7 @@
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-between py-2 pe-0 fs-9">
|
||||
<div class="col-auto d-flex">
|
||||
<p class="mb-0 d-none d-sm-block me-3 fw-semibold text-body" data-list-info="data-list-info"></p><a class="fw-semibold" href="#!" data-list-view="*">View all<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a><a class="fw-semibold d-none" href="#!" data-list-view="less">View Less<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a>
|
||||
</div>
|
||||
<div class="col-auto d-flex">
|
||||
<button class="page-link" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
|
||||
<ul class="mb-0 pagination"></ul>
|
||||
<button class="page-link pe-0" data-list-pagination="next"><span class="fas fa-chevron-right"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-drafts" role="tabpanel" aria-labelledby="drafts-tab">
|
||||
<div class="border-top border-bottom border-translucent" id="draftsEmailsTable" data-list='{"valueNames":["subject","sent","date","source","status"],"page":7,"pagination":true}'>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table fs-9 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"drafts-email-table-body"}' />
|
||||
</div>
|
||||
</th>
|
||||
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="subject" style="width:31%; min-width:350px">Subject</th>
|
||||
<th class="sort align-middle pe-3 text-uppercase" scope="col" data-sort="sent" style="width:15%; min-width:130px">Sent by</th>
|
||||
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="date" style="min-width:165px">Date</th>
|
||||
<th class="sort align-middle pe-0 text-uppercase" scope="col" style="width:15%; min-width:100px">Action</th>
|
||||
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="status" style="width:15%; min-width:100px">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list" id="drafts-email-table-body">
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Quary about purchased soccer socks","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 29, 2021 10:23 am","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Quary about purchased soccer socks</a>
|
||||
<div class="fs-10 d-block">jackson@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 29, 2021 10:23 am</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How to take the headache out of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 27, 2021 3:27 pm","source":"Call","type_status":{"label":"delivered","type":"badge-phoenix-info"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How to take the headache out of Order</a>
|
||||
<div class="fs-10 d-block">ansolo45@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 27, 2021 3:27 pm</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">delivered</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"The Arnold Schwarzenegger of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 24, 2021 10:44 am","source":"Call","type_status":{"label":"Bounce","type":"badge-phoenix-warning"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">The Arnold Schwarzenegger of Order</a>
|
||||
<div class="fs-10 d-block">ansolo45@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 24, 2021 10:44 am</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">Bounce</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"My order is not being taken","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 4:55 pm","source":"Call","type_status":{"label":"Spam","type":"badge-phoenix-danger"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">My order is not being taken</a>
|
||||
<div class="fs-10 d-block">jackson@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 4:55 pm</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">Spam</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Shipment is missing","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 2:43 pm","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Shipment is missing</a>
|
||||
<div class="fs-10 d-block">jackson@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 2:43 pm</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-between py-2 pe-0 fs-9">
|
||||
<div class="col-auto d-flex">
|
||||
<p class="mb-0 d-none d-sm-block me-3 fw-semibold text-body" data-list-info="data-list-info"></p><a class="fw-semibold" href="#!" data-list-view="*">View all<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a><a class="fw-semibold d-none" href="#!" data-list-view="less">View Less<span class="fas fa-angle-right ms-1" data-fa-transform="down-1"></span></a>
|
||||
</div>
|
||||
<div class="col-auto d-flex">
|
||||
<button class="page-link" data-list-pagination="prev"><span class="fas fa-chevron-left"></span></button>
|
||||
<ul class="mb-0 pagination"></ul>
|
||||
<button class="page-link pe-0" data-list-pagination="next"><span class="fas fa-chevron-right"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-schedule" role="tabpanel" aria-labelledby="schedule-tab">
|
||||
<div class="border-top border-bottom border-translucent" id="scheduledEmailsTable" data-list='{"valueNames":["subject","sent","date","source","status"],"page":7,"pagination":true}'>
|
||||
<div class="table-responsive scrollbar mx-n1 px-1">
|
||||
<table class="table fs-9 mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="white-space-nowrap fs-9 align-middle ps-0" style="width:26px;">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select='{"body":"scheduled-email-table-body"}' />
|
||||
</div>
|
||||
</th>
|
||||
<th class="sort white-space-nowrap align-middle pe-3 ps-0 text-uppercase" scope="col" data-sort="subject" style="width:31%; min-width:350px">Subject</th>
|
||||
<th class="sort align-middle pe-3 text-uppercase" scope="col" data-sort="sent" style="width:15%; min-width:130px">Sent by</th>
|
||||
<th class="sort align-middle text-start text-uppercase" scope="col" data-sort="date" style="min-width:165px">Date</th>
|
||||
<th class="sort align-middle pe-0 text-uppercase" scope="col" style="width:15%; min-width:100px">Action</th>
|
||||
<th class="sort align-middle text-end text-uppercase" scope="col" data-sort="status" style="width:15%; min-width:100px">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list" id="scheduled-email-table-body">
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"Quary about purchased soccer socks","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 29, 2021 10:23 am","source":"Call","type_status":{"label":"sent","type":"badge-phoenix-success"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">Quary about purchased soccer socks</a>
|
||||
<div class="fs-10 d-block">jackson@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 29, 2021 10:23 am</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-success">sent</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"How to take the headache out of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 27, 2021 3:27 pm","source":"Call","type_status":{"label":"delivered","type":"badge-phoenix-info"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">How to take the headache out of Order</a>
|
||||
<div class="fs-10 d-block">ansolo45@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 27, 2021 3:27 pm</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-info">delivered</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"The Arnold Schwarzenegger of Order","email":"ansolo45@mail.com"},"active":true,"sent":"Ansolo Lazinatov","date":"Dec 24, 2021 10:44 am","source":"Call","type_status":{"label":"Bounce","type":"badge-phoenix-warning"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">The Arnold Schwarzenegger of Order</a>
|
||||
<div class="fs-10 d-block">ansolo45@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Ansolo Lazinatov</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 24, 2021 10:44 am</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-warning">Bounce</span></td>
|
||||
</tr>
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="fs-9 align-middle px-0 py-3">
|
||||
<div class="form-check mb-0 fs-8">
|
||||
<input class="form-check-input" type="checkbox" data-bulk-select-row='{"mail":{"subject":"My order is not being taken","email":"jackson@mail.com"},"active":true,"sent":"Jackson Pollock","date":"Dec 19, 2021 4:55 pm","source":"Call","type_status":{"label":"Spam","type":"badge-phoenix-danger"}}' />
|
||||
</div>
|
||||
</td>
|
||||
<td class="subject order align-middle white-space-nowrap py-2 ps-0"><a class="fw-semibold text-primary" href="#!">My order is not being taken</a>
|
||||
<div class="fs-10 d-block">jackson@mail.com</div>
|
||||
</td>
|
||||
<td class="sent align-middle white-space-nowrap text-start fw-bold text-body-tertiary py-2">Jackson Pollock</td>
|
||||
<td class="date align-middle white-space-nowrap text-body py-2">Dec 19, 2021 4:55 pm</td>
|
||||
<td class="align-middle white-space-nowrap ps-3"><a class="text-body" href="#!"><span class="fa-solid fa-phone text-primary me-2"></span>Call</a></td>
|
||||
<td class="status align-middle fw-semibold text-end py-2"><span class="badge badge-phoenix fs-10 badge-phoenix-danger">Spam</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -286,7 +286,7 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'bill_list' %}">
|
||||
<div class="d-flex align-items-center">
|
||||
<i class="fa-solid fa-money-bills"></i><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
||||
<span><i class="fa-solid fa-money-bills"></i></span><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -10,30 +10,30 @@
|
||||
<h3 class="text-center">{% trans "Expenses" %}</h3>
|
||||
<a href="{% url 'item_expense_create' %}" class="btn btn-sm btn-success ">{% trans "Add Expense" %}</a>
|
||||
</div>
|
||||
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 bg-body-emphasis pt-7 border-y">
|
||||
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 pt-7 border-y">
|
||||
|
||||
<div class="table-responsive mx-n1 px-1 scrollbar">
|
||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Item Number" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list">
|
||||
{% for expense in expenses %}
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="align-middle product white-space-nowrap py-0">{{ expense.item_number }}</td>
|
||||
<td class="align-middle product white-space-nowrap">{{ expense.name }}</td>
|
||||
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
|
||||
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
|
||||
<td class="">
|
||||
<a href="{% url 'item_expense_update' expense.pk %}"
|
||||
<a href="{% url 'item_expense_update' expense.pk %}"
|
||||
class="btn btn-sm btn-phoenix-success">
|
||||
{% trans "Update" %}
|
||||
</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
@ -43,7 +43,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="d-flex justify-content-center">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
<form id="mainForm" method="post" class="needs-validation">
|
||||
{% csrf_token %}
|
||||
<div class="row g-3">
|
||||
{{ form|crispy }}
|
||||
{{ form|crispy }}
|
||||
<div class="row mt-5">
|
||||
<div id="formrow">
|
||||
<h3 class="text-start">Unit Items</h3>
|
||||
<div class="form-row row g-3 mb-3 mt-5">
|
||||
<div class="mb-2 col-sm-2">
|
||||
<div class="mb-2 col-sm-4">
|
||||
<select class="form-control item" name="item[]" required>
|
||||
{% for item in items %}
|
||||
<option value="{{ item.product.pk }}">{{ item.car.id_car_model }}</option>
|
||||
<option value="{{ item.product.pk }}">{{item.car.vin}} - {{ item.car }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<div class="mb-2 col-sm-2">
|
||||
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-2 col-sm-1">
|
||||
<button class="btn btn-danger removeBtn">Remove</button>
|
||||
</div>
|
||||
@ -123,7 +123,7 @@
|
||||
document.querySelectorAll('[name="quantity[]"]').forEach(input => {
|
||||
formData.quantity.push(input.value);
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
// Send data to the server using fetch
|
||||
const response = await fetch("{% url 'bill_create' %}", {
|
||||
@ -150,8 +150,8 @@
|
||||
notify("error","Unexpected response from the server");
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
notify("error", error);
|
||||
|
||||
notify("error", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -11,6 +11,11 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<a href="{% url 'bill_create' %}" class="btn btn-md btn-phoenix-primary">
|
||||
<i class="fa fa-plus"></i>
|
||||
{% trans 'New Bill' %}</a>
|
||||
</div>
|
||||
<div class="d-flex flex-column flex-sm-grow-1 p-4">
|
||||
<main class="d-grid gap-4 p-1">
|
||||
<!-- Search Bar -->
|
||||
@ -30,7 +35,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Customer Table -->
|
||||
<!-- Customer Table -->
|
||||
<div id="accountsTable">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm fs-9 mb-0">
|
||||
@ -41,37 +46,15 @@
|
||||
</th>
|
||||
<th class="border-top border-translucent">
|
||||
{% trans 'Bill Status' %}
|
||||
</th>
|
||||
</th>
|
||||
<th class="border-top border-translucent text-end pe-3">
|
||||
{% trans 'Vendor' %}
|
||||
</th>
|
||||
<th class="border-top border-translucent text-end align-middle pe-0 ps-4" scope="col"></th>
|
||||
<th class="border-top border-translucent text-end pe-3" scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="list">
|
||||
<tbody class="list">
|
||||
{% for bill in bills %}
|
||||
<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="deleteModalLabel">
|
||||
{% trans 'Delete Bill' %}
|
||||
<span data-feather="alert-circle"></span>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<p class="mb-0 text-danger fw-bold">
|
||||
{% trans 'Are you sure you want to delete this Bill?' %}
|
||||
</p>
|
||||
<div class="d-grid gap-2">
|
||||
<button type="button" class="btn btn-phoenix-secondary btn-sm" data-bs-dismiss="modal">{% trans 'No' %}</button>
|
||||
<a type="button" class="btn btn-phoenix-danger btn-sm" href="{% url 'account_delete' bill.uuid %}">{% trans 'Yes' %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<tr>
|
||||
<td class="align-middle ps-3">{{ bill.bill_number }}</td>
|
||||
<td class="align-middle">
|
||||
@ -90,12 +73,11 @@
|
||||
<td class="align-middle text-end py-3 pe-3">
|
||||
{{bill.vendor.vendor_name}}
|
||||
</td>
|
||||
<td>
|
||||
<td class="align-middle text-end py-3 pe-3">
|
||||
<div class="btn-reveal-trigger position-static">
|
||||
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
<a href="{% url 'bill_detail' bill.pk %}" class="dropdown-item text-success-dark">{% trans 'View' %}</a>
|
||||
<div class="dropdown-divider"></div><button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans 'Delete' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -149,7 +131,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -11,7 +11,13 @@
|
||||
|
||||
<!-- Search Bar -->
|
||||
<div class="row mt-4">
|
||||
<h3 class="mb-3"><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary">
|
||||
<i class="fa fa-plus"></i>
|
||||
{% trans 'New Account' %}</a>
|
||||
</div>
|
||||
<h3 class="mb-3">
|
||||
<i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
||||
<div class="col-12">
|
||||
<form method="get" class=" mb-4">
|
||||
<div class="input-group input-group-sm">
|
||||
@ -34,8 +40,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if page_obj.object_list %}
|
||||
|
||||
<div class="table-responsive px-1 scrollbar">
|
||||
<div class="table-responsive px-1 scrollbar mt-3">
|
||||
<table class="table align-items-center table-flush">
|
||||
<thead>
|
||||
|
||||
|
||||
31
templates/ledger/journal_entry/journal_entry_delete.html
Normal file
31
templates/ledger/journal_entry/journal_entry_delete.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load django_ledger %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form action="{% url 'journalentry_delete' journal_entry.pk %}"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<h5 class="card-title fw-light">Are you sure you want to delete?</h5>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="{% url 'journalentry_list' journal_entry.ledger.pk %}"
|
||||
class="btn btn-primary me-2">{% trans 'Go Back' %}</a>
|
||||
<button type="submit" class="btn btn-danger">{% trans 'Delete' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
31
templates/ledger/ledger/ledger_delete.html
Normal file
31
templates/ledger/ledger/ledger_delete.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load django_ledger %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form action="{% url 'ledger-delete' entity_slug=view.kwargs.entity_slug ledger_pk=ledger_model.uuid %}"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-body text-center">
|
||||
<h5 class="card-title fw-light">{{ ledger_model.get_delete_message }}</h5>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="{% url 'ledger_list' %}"
|
||||
class="btn btn-primary me-2">{% trans 'Go Back' %}</a>
|
||||
<button type="submit" class="btn btn-danger">{% trans 'Delete' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -6,16 +6,20 @@
|
||||
{% block content %}
|
||||
<div class="row mt-4">
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h3 class="">{% trans "Ledger" %}</h3>
|
||||
<h3 class="">{% trans "Ledger" %}</h3>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive px-1 scrollbar">
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<a href="{% url 'ledger_create' %}" class="btn btn-md btn-phoenix-primary">
|
||||
<i class="fa fa-plus"></i>
|
||||
{% trans 'Create Ledger' %}</a>
|
||||
</div>
|
||||
<div class="table-responsive px-1 scrollbar mt-3">
|
||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Ledger Name" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Ledger Name" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Journal Entries" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Earliest Date" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Created Date" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Posted" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Locked" %}</th>
|
||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
|
||||
@ -23,16 +27,16 @@
|
||||
</thead>
|
||||
<tbody class="list">
|
||||
{% for ledger in ledgers %}
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
||||
<td class="align-middle product white-space-nowrap">
|
||||
{% if ledger.invoicemodel %}
|
||||
<a href="{% url 'invoice_detail' ledger.invoicemodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
|
||||
{% elif ledger.billmodel %}
|
||||
<a href="{% url 'bill_detail' ledger.billmodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
|
||||
{% else %}
|
||||
<a href="#">{{ ledger.name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<a href="#">{{ ledger.name }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle product white-space-nowrap">
|
||||
<a class="btn btn-sm btn-primary"
|
||||
href="{% url 'journalentry_list' ledger.pk %}">
|
||||
@ -44,7 +48,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="align-middle product white-space-nowrap">
|
||||
{% if ledger.earliest_timestamp %}{{ ledger.earliest_timestamp | date }}{% endif %}
|
||||
{{ ledger.created |date }}
|
||||
</td>
|
||||
<td class="align-middle product white-space-nowrap">
|
||||
{% if ledger.is_posted %}
|
||||
@ -60,7 +64,52 @@
|
||||
<i class="fa-solid fa-unlock text-danger"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="align-middle white-space-nowrap text-start">
|
||||
<div class="btn-reveal-trigger position-static">
|
||||
<button
|
||||
class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10"
|
||||
type="button"
|
||||
data-bs-toggle="dropdown"
|
||||
data-boundary="window"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
data-bs-reference="parent">
|
||||
<span class="fas fa-ellipsis-h fs-10"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||
{% if ledger.can_lock %}
|
||||
<a href="{% url 'ledger-action-lock' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-info has-text-weight-bold">{% trans 'Lock' %}</a>
|
||||
{% endif %}
|
||||
{% if ledger.can_unlock %}
|
||||
<a href="{% url 'ledger-action-unlock' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'UnLock' %}</a>
|
||||
{% endif %}
|
||||
{% if ledger.can_post %}
|
||||
<a href="{% url 'ledger-action-post' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-info has-text-weight-bold">{% trans 'Post' %}</a>
|
||||
{% endif %}
|
||||
{% if ledger.can_unpost %}
|
||||
<a href="{% url 'ledger-action-unpost' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'UnPost' %}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if ledger.can_hide %}
|
||||
<a href="{% url 'ledger-action-hide' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'Hide' %}</a>
|
||||
{% endif %}
|
||||
{% if ledger.can_unhide %}
|
||||
<a href="{% url 'ledger-action-unhide' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'UnHide' %}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if ledger.can_delete %}
|
||||
<a href="{% url 'ledger-delete' entity_slug=entity_slug ledger_pk=ledger.uuid %}"
|
||||
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'Delete' %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
@ -70,7 +119,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="d-flex justify-content-center">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user