Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
7a116cbaba
@ -442,6 +442,13 @@ class CarSelectionTable(tables.Table):
|
|||||||
|
|
||||||
|
|
||||||
class WizardForm1(forms.Form):
|
class WizardForm1(forms.Form):
|
||||||
|
hx_attrs = {
|
||||||
|
"hx-post":"",
|
||||||
|
"hx-target": "#wizardValidationForm1",
|
||||||
|
"hx-select": "#wizardValidationForm1",
|
||||||
|
"hx-trigger": "blur delay:500ms",
|
||||||
|
"hx-swap": "innerHTML",
|
||||||
|
}
|
||||||
email = forms.EmailField(
|
email = forms.EmailField(
|
||||||
label=_("Email Address"),
|
label=_("Email Address"),
|
||||||
widget=forms.EmailInput(
|
widget=forms.EmailInput(
|
||||||
@ -450,6 +457,7 @@ class WizardForm1(forms.Form):
|
|||||||
"placeholder": _("Email address"),
|
"placeholder": _("Email address"),
|
||||||
"name": _("email"),
|
"name": _("email"),
|
||||||
"required": "required",
|
"required": "required",
|
||||||
|
**hx_attrs
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
error_messages={
|
error_messages={
|
||||||
@ -464,11 +472,14 @@ class WizardForm1(forms.Form):
|
|||||||
"class": "form-control form-control-sm",
|
"class": "form-control form-control-sm",
|
||||||
"placeholder": _("Password"),
|
"placeholder": _("Password"),
|
||||||
"required": "required",
|
"required": "required",
|
||||||
}
|
**hx_attrs
|
||||||
|
},
|
||||||
|
render_value=True
|
||||||
),
|
),
|
||||||
error_messages={
|
error_messages={
|
||||||
"required": _("This field is required."),
|
"required": _("This field is required."),
|
||||||
},
|
},
|
||||||
|
min_length=8,
|
||||||
)
|
)
|
||||||
|
|
||||||
confirm_password = forms.CharField(
|
confirm_password = forms.CharField(
|
||||||
@ -478,11 +489,14 @@ class WizardForm1(forms.Form):
|
|||||||
"class": "form-control form-control-sm",
|
"class": "form-control form-control-sm",
|
||||||
"placeholder": _("Confirm Password"),
|
"placeholder": _("Confirm Password"),
|
||||||
"required": "required",
|
"required": "required",
|
||||||
}
|
**hx_attrs
|
||||||
|
},
|
||||||
|
render_value=True
|
||||||
),
|
),
|
||||||
error_messages={
|
error_messages={
|
||||||
"required": _("This field is required."),
|
"required": _("This field is required."),
|
||||||
},
|
},
|
||||||
|
min_length=8,
|
||||||
)
|
)
|
||||||
|
|
||||||
terms = forms.BooleanField(
|
terms = forms.BooleanField(
|
||||||
@ -491,12 +505,30 @@ class WizardForm1(forms.Form):
|
|||||||
attrs={
|
attrs={
|
||||||
"class": "form-check-input",
|
"class": "form-check-input",
|
||||||
"required": "required",
|
"required": "required",
|
||||||
|
**hx_attrs
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
error_messages={
|
error_messages={
|
||||||
"required": _("You must accept the terms and privacy policy."),
|
"required": _("You must accept the terms and privacy policy."),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def clean_email(self):
|
||||||
|
email = self.cleaned_data.get("email")
|
||||||
|
if email:
|
||||||
|
if User.objects.filter(email=email).exists():
|
||||||
|
raise forms.ValidationError(
|
||||||
|
_("An account with this email already exists.")
|
||||||
|
)
|
||||||
|
return email
|
||||||
|
|
||||||
|
def clean_confirm_password(self):
|
||||||
|
password = self.cleaned_data.get("password")
|
||||||
|
confirm_password = self.cleaned_data.get("confirm_password")
|
||||||
|
if password and confirm_password and password != confirm_password:
|
||||||
|
raise forms.ValidationError(_("Passwords do not match."))
|
||||||
|
return confirm_password
|
||||||
|
|
||||||
|
|
||||||
class WizardForm2(forms.Form):
|
class WizardForm2(forms.Form):
|
||||||
@ -531,10 +563,8 @@ class WizardForm2(forms.Form):
|
|||||||
phone_number = PhoneNumberField(
|
phone_number = PhoneNumberField(
|
||||||
label=_("Phone Number"),
|
label=_("Phone Number"),
|
||||||
widget=forms.TextInput(
|
widget=forms.TextInput(
|
||||||
attrs={
|
attrs={
|
||||||
"class": "form-control form-control-sm",
|
|
||||||
"placeholder": _("Phone"),
|
"placeholder": _("Phone"),
|
||||||
"required": "required",
|
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
region="SA",
|
region="SA",
|
||||||
@ -542,6 +572,7 @@ class WizardForm2(forms.Form):
|
|||||||
"required": _("This field is required."),
|
"required": _("This field is required."),
|
||||||
"invalid": _("Phone number must be in the format 05xxxxxxxx"),
|
"invalid": _("Phone number must be in the format 05xxxxxxxx"),
|
||||||
},
|
},
|
||||||
|
required=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -596,15 +627,15 @@ class WizardForm3(forms.Form):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def clean(self):
|
# def clean(self):
|
||||||
cleaned_data = super().clean()
|
# cleaned_data = super().clean()
|
||||||
password = cleaned_data.get("password")
|
# password = cleaned_data.get("password")
|
||||||
confirm_password = cleaned_data.get("confirm_password")
|
# confirm_password = cleaned_data.get("confirm_password")
|
||||||
|
|
||||||
if password != confirm_password:
|
# if password != confirm_password:
|
||||||
raise forms.ValidationError("Passwords do not match.")
|
# raise forms.ValidationError("Passwords do not match.")
|
||||||
else:
|
# else:
|
||||||
return cleaned_data
|
# return cleaned_data
|
||||||
|
|
||||||
|
|
||||||
class ItemForm(forms.Form):
|
class ItemForm(forms.Form):
|
||||||
@ -752,9 +783,9 @@ class InvoiceModelCreateForm(InvoiceModelCreateFormBase):
|
|||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
self.fields["cash_account"].widget = forms.HiddenInput()
|
# self.fields["cash_account"].widget = forms.HiddenInput()
|
||||||
self.fields["prepaid_account"].widget = forms.HiddenInput()
|
# self.fields["prepaid_account"].widget = forms.HiddenInput()
|
||||||
self.fields["unearned_account"].widget = forms.HiddenInput()
|
# self.fields["unearned_account"].widget = forms.HiddenInput()
|
||||||
self.fields["date_draft"] = forms.DateField(
|
self.fields["date_draft"] = forms.DateField(
|
||||||
widget=DateInput(attrs={"type": "date"})
|
widget=DateInput(attrs={"type": "date"})
|
||||||
)
|
)
|
||||||
|
|||||||
@ -19,7 +19,6 @@ from django_ledger.models import EntityModel, ItemModel,EstimateModel,InvoiceMod
|
|||||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
|
||||||
|
|
||||||
class DealerUserManager(UserManager):
|
class DealerUserManager(UserManager):
|
||||||
def create_user_with_dealer(
|
def create_user_with_dealer(
|
||||||
self,
|
self,
|
||||||
@ -408,10 +407,18 @@ class Car(models.Model):
|
|||||||
trim = self.id_car_trim.name if self.id_car_trim else "Unknown Trim"
|
trim = self.id_car_trim.name if self.id_car_trim else "Unknown Trim"
|
||||||
return f"{self.year} - {make} - {model} - {trim}"
|
return f"{self.year} - {make} - {model} - {trim}"
|
||||||
|
|
||||||
|
def get_reservation(self):
|
||||||
|
return self.reservations.filter(reserved_until__gt=now()).first()
|
||||||
def is_reserved(self):
|
def is_reserved(self):
|
||||||
active_reservations = self.reservations.filter(reserved_until__gt=now())
|
active_reservations = self.reservations.filter(reserved_until__gt=now())
|
||||||
return active_reservations.exists()
|
return active_reservations.exists()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def ready(self):
|
||||||
|
try:
|
||||||
|
return all([self.colors.exists() ,self.finances,])
|
||||||
|
except Exception as e:
|
||||||
|
return False
|
||||||
def get_transfer(self):
|
def get_transfer(self):
|
||||||
return self.transfer_logs.filter(active=True).first()
|
return self.transfer_logs.filter(active=True).first()
|
||||||
@property
|
@property
|
||||||
|
|||||||
@ -792,15 +792,15 @@ class CarFinanceCalculator:
|
|||||||
total_vat_amount = total_price_discounted * self.vat_rate
|
total_vat_amount = total_price_discounted * self.vat_rate
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"total_price": total_price_discounted,
|
"total_price": round(total_price_discounted, 2), # total_price_discounted,
|
||||||
"total_vat_amount": total_vat_amount,
|
"total_vat_amount": round(total_vat_amount, 2), # total_vat_amount,
|
||||||
"total_discount": total_discount,
|
"total_discount": round(total_discount,2),
|
||||||
"total_additionals": total_additionals,
|
"total_additionals": round(total_additionals, 2), # total_additionals,
|
||||||
"grand_total": round(total_price_discounted + total_vat_amount + total_additionals, 2)
|
"grand_total": round(total_price_discounted + total_vat_amount + total_additionals, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_finance_data(self):
|
def get_finance_data(self):
|
||||||
totals = self.calculate_totals()
|
totals = self.calculate_totals()
|
||||||
return {
|
return {
|
||||||
"cars": [self._get_car_data(item) for item in self.item_transactions],
|
"cars": [self._get_car_data(item) for item in self.item_transactions],
|
||||||
"quantity": sum(self._get_quantity(item) for item in self.item_transactions),
|
"quantity": sum(self._get_quantity(item) for item in self.item_transactions),
|
||||||
|
|||||||
@ -191,12 +191,19 @@ def switch_language(request):
|
|||||||
|
|
||||||
|
|
||||||
def dealer_signup(request, *args, **kwargs):
|
def dealer_signup(request, *args, **kwargs):
|
||||||
|
form1 = forms.WizardForm1()
|
||||||
|
form2 = forms.WizardForm2()
|
||||||
|
form3 = forms.WizardForm3()
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
|
if "Hx-Request" in request.headers:
|
||||||
|
form1 = forms.WizardForm1(request.POST)
|
||||||
|
return render(request,"account/signup-wizard.html",{"form1": form1, "form2": form2, "form3": form3})
|
||||||
|
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
wf1 = data.get("wizardValidationForm1")
|
wf1 = data.get("wizardValidationForm1")
|
||||||
wf2 = data.get("wizardValidationForm2")
|
wf2 = data.get("wizardValidationForm2")
|
||||||
wf3 = data.get("wizardValidationForm3")
|
wf3 = data.get("wizardValidationForm3")
|
||||||
# username = wf1.get("username")
|
|
||||||
email = wf1.get("email")
|
email = wf1.get("email")
|
||||||
password = wf1.get("password")
|
password = wf1.get("password")
|
||||||
password_confirm = wf1.get("confirm_password")
|
password_confirm = wf1.get("confirm_password")
|
||||||
@ -212,7 +219,6 @@ def dealer_signup(request, *args, **kwargs):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
# user = User.objects.create(username=username, email=email)
|
|
||||||
user = User.objects.create(username=email, email=email)
|
user = User.objects.create(username=email, email=email)
|
||||||
user.set_password(password)
|
user.set_password(password)
|
||||||
user.save()
|
user.save()
|
||||||
@ -226,26 +232,12 @@ def dealer_signup(request, *args, **kwargs):
|
|||||||
phone_number=phone,
|
phone_number=phone,
|
||||||
address=address,
|
address=address,
|
||||||
)
|
)
|
||||||
# user = authenticate(request, email=email, password=password)
|
return JsonResponse(
|
||||||
# if user is not None:
|
{"message": "User created successfully."}, status=200
|
||||||
# return JsonResponse(
|
)
|
||||||
# {"message": "User created successfully."}, status=200
|
|
||||||
# )
|
|
||||||
# else:
|
|
||||||
# return JsonResponse({"error": "User creation failed."}, status=400)
|
|
||||||
# return redirect("account_login")
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return JsonResponse({"error": str(e)}, status=400)
|
return JsonResponse({"error": str(e)}, status=400)
|
||||||
|
return render(request,"account/signup-wizard.html",{"form1": form1, "form2": form2, "form3": form3})
|
||||||
form1 = forms.WizardForm1()
|
|
||||||
form2 = forms.WizardForm2()
|
|
||||||
form3 = forms.WizardForm3()
|
|
||||||
return render(
|
|
||||||
request,
|
|
||||||
"account/signup-wizard.html",
|
|
||||||
{"form1": form1, "form2": form2, "form3": form3},
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# class OTPView(View, LoginRequiredMixin):
|
# class OTPView(View, LoginRequiredMixin):
|
||||||
@ -710,12 +702,12 @@ class CarListView(LoginRequiredMixin, ListView):
|
|||||||
if make and model:
|
if make and model:
|
||||||
make_ = models.CarMake.objects.get(id_car_make=int(make))
|
make_ = models.CarMake.objects.get(id_car_make=int(make))
|
||||||
model_ = models.CarModel.objects.get(id_car_model=int(model))
|
model_ = models.CarModel.objects.get(id_car_model=int(model))
|
||||||
context['year'] = models.Car.objects.filter(id_car_make=make_,id_car_model=model_).values_list('year').distinct()
|
context['year'] = models.Car.objects.filter(id_car_make=make_,id_car_model=model_).values_list('year').distinct()
|
||||||
|
|
||||||
|
|
||||||
return context
|
return context
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = super().get_queryset()
|
dealer = get_user_type(self.request)
|
||||||
|
qs = super().get_queryset()
|
||||||
|
qs = qs.filter(dealer=dealer)
|
||||||
status = self.request.GET.get('status')
|
status = self.request.GET.get('status')
|
||||||
search = self.request.GET.get('search')
|
search = self.request.GET.get('search')
|
||||||
make = self.request.GET.get('make',None)
|
make = self.request.GET.get('make',None)
|
||||||
@ -737,9 +729,7 @@ class CarListView(LoginRequiredMixin, ListView):
|
|||||||
if year:
|
if year:
|
||||||
query &= Q(year=year)
|
query &= Q(year=year)
|
||||||
if car_status:
|
if car_status:
|
||||||
query &= Q(status=car_status)
|
query &= Q(status=car_status)
|
||||||
# else:
|
|
||||||
# query &= Q(status="available")
|
|
||||||
qs = qs.filter(query)
|
qs = qs.filter(query)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
@ -989,7 +979,10 @@ class CarTransferDetailView(LoginRequiredMixin, SuccessMessageMixin, DetailView)
|
|||||||
template_name = "inventory/transfer_details.html"
|
template_name = "inventory/transfer_details.html"
|
||||||
context_object_name = "transfer"
|
context_object_name = "transfer"
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
context = super().get_context_data(**kwargs)
|
||||||
|
context["action"] = self.request.GET.get("action")
|
||||||
|
return context
|
||||||
def car_transfer_approve(request, car_pk, transfer_pk):
|
def car_transfer_approve(request, car_pk, transfer_pk):
|
||||||
car = get_object_or_404(models.Car, pk=car_pk)
|
car = get_object_or_404(models.Car, pk=car_pk)
|
||||||
transfer = get_object_or_404(models.CarTransfer, pk=transfer_pk)
|
transfer = get_object_or_404(models.CarTransfer, pk=transfer_pk)
|
||||||
@ -2355,6 +2348,7 @@ class AccountCreateView(LoginRequiredMixin, SuccessMessageMixin, CreateView):
|
|||||||
form.instance.entity_model = dealer.entity
|
form.instance.entity_model = dealer.entity
|
||||||
form.instance.coa_model = dealer.entity.get_default_coa()
|
form.instance.coa_model = dealer.entity.get_default_coa()
|
||||||
form.instance.depth = 0
|
form.instance.depth = 0
|
||||||
|
form.instance.path = form.instance.code
|
||||||
return super().form_valid(form)
|
return super().form_valid(form)
|
||||||
|
|
||||||
def get_form_kwargs(self):
|
def get_form_kwargs(self):
|
||||||
@ -2603,7 +2597,7 @@ def create_estimate(request,pk=None):
|
|||||||
|
|
||||||
if isinstance(items, list):
|
if isinstance(items, list):
|
||||||
for item in estimate_itemtxs.keys():
|
for item in estimate_itemtxs.keys():
|
||||||
item_instance = ItemModel.objects.get(item_number=item)
|
item_instance = ItemModel.objects.filter(item_number=item).first()
|
||||||
instance = models.Car.objects.get(vin=item_instance.name)
|
instance = models.Car.objects.get(vin=item_instance.name)
|
||||||
reserve_car(instance, request)
|
reserve_car(instance, request)
|
||||||
# for item in items:
|
# for item in items:
|
||||||
@ -2612,12 +2606,12 @@ def create_estimate(request,pk=None):
|
|||||||
# reserve_car(instance, request)
|
# reserve_car(instance, request)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
item_instance = ItemModel.objects.get(additioinal_info__car_info__hash=items)
|
item_instance = ItemModel.objects.filter(additioinal_info__car_info__hash=items).first()
|
||||||
instance = models.Car.objects.get(hash=item)
|
instance = models.Car.objects.get(hash=item)
|
||||||
response = reserve_car(instance, request)
|
response = reserve_car(instance, request)
|
||||||
|
|
||||||
opportunity_id = data.get("opportunity_id")
|
opportunity_id = data.get("opportunity_id")
|
||||||
if opportunity_id:
|
if opportunity_id != "None":
|
||||||
opportunity = models.Opportunity.objects.get(pk=int(opportunity_id))
|
opportunity = models.Opportunity.objects.get(pk=int(opportunity_id))
|
||||||
opportunity.estimate = estimate
|
opportunity.estimate = estimate
|
||||||
opportunity.save()
|
opportunity.save()
|
||||||
@ -2641,7 +2635,7 @@ def create_estimate(request,pk=None):
|
|||||||
customer = opportunity.customer
|
customer = opportunity.customer
|
||||||
form.initial['customer'] = customer
|
form.initial['customer'] = customer
|
||||||
|
|
||||||
car_list = models.Car.objects.filter(dealer=dealer).exclude(status="reserved").annotate(color=F('colors__exterior__rgb'),color_name=F('colors__exterior__name')).values_list(
|
car_list = models.Car.objects.filter(dealer=dealer,colors__isnull=False,finances__isnull=False,status="available").annotate(color=F('colors__exterior__rgb'),color_name=F('colors__exterior__name')).values_list(
|
||||||
'id_car_make__name', 'id_car_model__name','id_car_serie__name','id_car_trim__name','color','color_name','hash').distinct()
|
'id_car_make__name', 'id_car_model__name','id_car_serie__name','id_car_trim__name','color','color_name','hash').distinct()
|
||||||
context = {
|
context = {
|
||||||
"form": form,
|
"form": form,
|
||||||
@ -2790,6 +2784,12 @@ def estimate_mark_as(request, pk):
|
|||||||
if not estimate.can_complete():
|
if not estimate.can_complete():
|
||||||
messages.error(request, _("Estimate is not ready for completion"))
|
messages.error(request, _("Estimate is not ready for completion"))
|
||||||
return redirect("estimate_detail", pk=estimate.pk)
|
return redirect("estimate_detail", pk=estimate.pk)
|
||||||
|
elif mark == "canceled":
|
||||||
|
if not estimate.can_cancel():
|
||||||
|
messages.error(request, _("Estimate is not ready for cancelation"))
|
||||||
|
return redirect("estimate_detail", pk=estimate.pk)
|
||||||
|
estimate.mark_as_canceled()
|
||||||
|
messages.success(request, _("Estimate canceled successfully."))
|
||||||
estimate.save()
|
estimate.save()
|
||||||
messages.success(request, "Estimate marked as " + mark.upper())
|
messages.success(request, "Estimate marked as " + mark.upper())
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from django_ledger.models.invoice import InvoiceModel
|
from django_ledger.models.invoice import InvoiceModel
|
||||||
from django_ledger.utils import accruable_net_summary
|
from django_ledger.utils import accruable_net_summary
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from django_ledger.models import EstimateModel,EntityModel,ItemModel,ItemTransactionModel
|
from django_ledger.models import EstimateModel,EntityModel,ItemModel,ItemTransactionModel,AccountModel
|
||||||
from rich import print
|
from rich import print
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from inventory.models import Car, Dealer, VatRate,Lead,CarMake,CarModel,Schedule
|
from inventory.models import Car, Dealer, VatRate,Lead,CarMake,CarModel,Schedule
|
||||||
@ -94,25 +94,27 @@ def run():
|
|||||||
# print(hash_object.hexdigest() , i.id_car_make.name, i.id_car_model.name)
|
# print(hash_object.hexdigest() , i.id_car_make.name, i.id_car_model.name)
|
||||||
|
|
||||||
|
|
||||||
def get_item(tx:ItemTransactionModel):
|
# def get_item(tx:ItemTransactionModel):
|
||||||
data = {"data": {}}
|
# data = {"data": {}}
|
||||||
data["data"]["info"] = tx.item_model.additional_info.get('car_info')
|
# data["data"]["info"] = tx.item_model.additional_info.get('car_info')
|
||||||
data["data"]["finance"] = tx.item_model.additional_info.get('car_finance')
|
# data["data"]["finance"] = tx.item_model.additional_info.get('car_finance')
|
||||||
if tx.has_estimate():
|
# if tx.has_estimate():
|
||||||
data["data"]["estimate"] = tx.ce_model
|
# data["data"]["estimate"] = tx.ce_model
|
||||||
data["data"]["has_estimate"] = True
|
# data["data"]["has_estimate"] = True
|
||||||
data["data"]["customer"] = tx.ce_model.customer
|
# data["data"]["customer"] = tx.ce_model.customer
|
||||||
if tx.has_invoice():
|
# if tx.has_invoice():
|
||||||
data["data"]["invoice"] = tx.invoice_model
|
# data["data"]["invoice"] = tx.invoice_model
|
||||||
data["data"]["has_invoice"] = True
|
# data["data"]["has_invoice"] = True
|
||||||
data["data"]["customer"] = tx.invoice_model.customer
|
# data["data"]["customer"] = tx.invoice_model.customer
|
||||||
return data
|
# return data
|
||||||
|
|
||||||
transactions = ItemTransactionModel.objects.all()
|
# transactions = ItemTransactionModel.objects.all()
|
||||||
output = []
|
# output = []
|
||||||
for transaction in transactions:
|
# for transaction in transactions:
|
||||||
output.append(get_item(transaction))
|
# output.append(get_item(transaction))
|
||||||
print(output)
|
# print(output)
|
||||||
# info = item.additional_info["car_info"]
|
# info = item.additional_info["car_info"]
|
||||||
# finance = item.additional_info["car_finance"]
|
# 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"]})
|
# 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)
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row form-container" id="form-container">
|
||||||
<div class="row d-flex-center min-vh-50">
|
<div class="row d-flex-center min-vh-50">
|
||||||
<div class="col-12 "><a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'home' %}">
|
<div class="col-12 "><a class="d-flex flex-center text-decoration-none mb-4" href="{% url 'home' %}">
|
||||||
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block">
|
<div class="d-flex align-items-center fw-bolder fs-3 d-inline-block">
|
||||||
@ -37,8 +37,8 @@
|
|||||||
<div class="card-body pt-4 pb-0">
|
<div class="card-body pt-4 pb-0">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane active" role="tabpanel" aria-labelledby="bootstrap-wizard-validation-tab1" id="bootstrap-wizard-validation-tab1">
|
<div class="tab-pane active" role="tabpanel" aria-labelledby="bootstrap-wizard-validation-tab1" id="bootstrap-wizard-validation-tab1">
|
||||||
<form class="needs-validation" id="wizardValidationForm1" novalidate="novalidate" data-wizard-form="1">
|
<form class="needs-validation" id="wizardValidationForm1" novalidate="novalidate" data-wizard-form="1">
|
||||||
{{form1|crispy}}
|
{{form1|crispy}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" role="tabpanel" aria-labelledby="bootstrap-wizard-validation-tab2" id="bootstrap-wizard-validation-tab2">
|
<div class="tab-pane" role="tabpanel" aria-labelledby="bootstrap-wizard-validation-tab2" id="bootstrap-wizard-validation-tab2">
|
||||||
@ -78,85 +78,83 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="{% static 'js/phoenix.js' %}"></script>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
|
||||||
<script>
|
{% block customJS %}
|
||||||
|
<script>
|
||||||
|
const url = "{% url 'account_signup' %}";
|
||||||
const url = "{% url 'account_signup' %}";
|
let submit_btn = document.getElementById('submit_btn');
|
||||||
let submit_btn = document.getElementById('submit_btn');
|
const csrftoken = getCookie('csrftoken');
|
||||||
const csrftoken = getCookie('csrftoken');
|
|
||||||
|
submit_btn.addEventListener('click', async () => {
|
||||||
submit_btn.addEventListener('click', async () => {
|
const allFormData = getAllFormData();
|
||||||
const allFormData = getAllFormData();
|
|
||||||
console.log(allFormData);
|
try {
|
||||||
|
showLoading();
|
||||||
try {
|
const response = await fetch(url, {
|
||||||
showLoading();
|
method: 'POST',
|
||||||
const response = await fetch(url, {
|
headers: {
|
||||||
method: 'POST',
|
'X-CSRFToken': csrftoken,
|
||||||
headers: {
|
'Content-Type': 'application/json',
|
||||||
'X-CSRFToken': csrftoken,
|
},
|
||||||
'Content-Type': 'application/json',
|
body: JSON.stringify(allFormData),
|
||||||
},
|
});
|
||||||
body: JSON.stringify(allFormData),
|
hideLoading();
|
||||||
});
|
const data = await response.json();
|
||||||
hideLoading();
|
if (response.ok) {
|
||||||
const data = await response.json();
|
notify("success","Account created successfully");
|
||||||
if (response.ok) {
|
setTimeout(() => {
|
||||||
notify("success","Account created successfully");
|
window.location.href = "{% url 'account_login' %}";
|
||||||
setTimeout(() => {
|
}, 1000);
|
||||||
window.location.href = "{% url 'account_login' %}";
|
} else {
|
||||||
}, 1000);
|
notify("error",data.error);
|
||||||
} else {
|
}
|
||||||
notify("error",data.error);
|
} catch (error) {
|
||||||
}
|
notify("error",error);
|
||||||
} catch (error) {
|
|
||||||
notify("error",error);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
function getAllFormData() {
|
|
||||||
const forms = document.querySelectorAll('form');
|
|
||||||
const formData = {};
|
|
||||||
|
|
||||||
forms.forEach((form, index) => {
|
|
||||||
const formId = form.id || `form${index + 1}`;
|
|
||||||
formData[formId] = {};
|
|
||||||
|
|
||||||
const formElements = form.elements;
|
|
||||||
for (let element of formElements) {
|
|
||||||
if (element.name) {
|
|
||||||
formData[formId][element.name] = element.value;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
return formData;
|
|
||||||
}
|
|
||||||
|
|
||||||
function showLoading() {
|
|
||||||
Swal.fire({
|
|
||||||
title: "{% trans 'Please Wait' %}",
|
|
||||||
text: "{% trans 'Loading' %}...",
|
|
||||||
allowOutsideClick: false,
|
|
||||||
didOpen: () => {
|
|
||||||
Swal.showLoading();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
function hideLoading() {
|
function getAllFormData() {
|
||||||
Swal.close();
|
const forms = document.querySelectorAll('form');
|
||||||
}
|
const formData = {};
|
||||||
|
|
||||||
function notify(tag,msg){
|
forms.forEach((form, index) => {
|
||||||
Swal.fire({
|
const formId = form.id || `form${index + 1}`;
|
||||||
icon: tag,
|
formData[formId] = {};
|
||||||
titleText: msg
|
|
||||||
|
const formElements = form.elements;
|
||||||
|
for (let element of formElements) {
|
||||||
|
if (element.name) {
|
||||||
|
formData[formId][element.name] = element.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
return formData;
|
||||||
|
}
|
||||||
</script>
|
|
||||||
|
function showLoading() {
|
||||||
{% endblock content %}
|
Swal.fire({
|
||||||
|
title: "{% trans 'Please Wait' %}",
|
||||||
|
text: "{% trans 'Loading' %}...",
|
||||||
|
allowOutsideClick: false,
|
||||||
|
didOpen: () => {
|
||||||
|
Swal.showLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideLoading() {
|
||||||
|
Swal.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
function notify(tag,msg){
|
||||||
|
Swal.fire({
|
||||||
|
icon: tag,
|
||||||
|
titleText: msg
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock customJS %}
|
||||||
@ -56,7 +56,7 @@
|
|||||||
{% block customCSS %}
|
{% block customCSS %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
||||||
{% include "toast-alert.html" %}
|
{% include "toast-alert.html" %}
|
||||||
<main class="main" id="top">
|
<main class="main" id="top">
|
||||||
{% include 'header.html' %}
|
{% include 'header.html' %}
|
||||||
|
|||||||
@ -12,10 +12,10 @@
|
|||||||
id="lead-save"
|
id="lead-save"
|
||||||
class="btn btn-phoenix-primary"
|
class="btn btn-phoenix-primary"
|
||||||
>
|
>
|
||||||
{{ _("Save") }}
|
<i class="fa-solid fa-floppy-disk"></i> {{ _("Save") }}
|
||||||
</button>
|
</button>
|
||||||
<a href="{% url 'lead_list' %}" class="btn btn-phoenix-secondary">
|
<a href="{% url 'lead_list' %}" class="btn btn-phoenix-secondary">
|
||||||
{{ _("Cancel") }}
|
<i class="fa-solid fa-ban"></i> {{ _("Cancel") }}
|
||||||
</a>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -12,9 +12,9 @@
|
|||||||
<div class="d-sm-flex justify-content-between">
|
<div class="d-sm-flex justify-content-between">
|
||||||
<h3 class="mb-3">
|
<h3 class="mb-3">
|
||||||
{% if customer.created %}
|
{% if customer.created %}
|
||||||
{{ _("Edit Customer") }}
|
<i class="fa-solid fa-user"></i> {{ _("Edit Customer") }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ _("Add Customer") }}
|
<i class="fa-solid fa-user"></i> {{ _("Add Customer") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button class="btn btn-primary" type="submit">{% trans "Save" %}</button>
|
<button class="btn btn-primary" type="submit"><i class="fa-solid fa-floppy-disk"></i> {% trans "Save" %}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -249,7 +249,7 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'bill_list' %}">
|
<a class="nav-link" href="{% url 'bill_list' %}">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
<i class="fa-solid fa-money-bills"></i><span class="nav-link-text">{% trans 'bills'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -260,7 +260,7 @@
|
|||||||
<a class="nav-link dropdown-indicator label-1" href="#nv-reports" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-reports">
|
<a class="nav-link dropdown-indicator label-1" href="#nv-reports" role="button" data-bs-toggle="collapse" aria-expanded="false" aria-controls="nv-reports">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<div class="dropdown-indicator-icon-wrapper"><span class="fas fa-caret-right dropdown-indicator-icon"></span></div>
|
<div class="dropdown-indicator-icon-wrapper"><span class="fas fa-caret-right dropdown-indicator-icon"></span></div>
|
||||||
<span class="nav-link-icon"><span class="fas fa-money-check-alt"></span></span><span class="nav-link-text">{% trans 'Reports' %}</span>
|
<span class="nav-link-icon"><i class="fa-solid fa-book-open"></i></span><span class="nav-link-text">{% trans 'Reports' %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="parent-wrapper label-1">
|
<div class="parent-wrapper label-1">
|
||||||
@ -272,7 +272,7 @@
|
|||||||
<a class="nav-link" href="#">
|
<a class="nav-link" href="#">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'Dashboard'|capfirst %}</span>
|
<i class="fa-solid fa-chart-line"></i><span class="nav-link-text">{% trans 'Dashboard'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% if request.user.is_authenticated and request.user.dealer %}
|
{% if request.user.is_authenticated and request.user.dealer %}
|
||||||
@ -281,7 +281,7 @@
|
|||||||
<a class="nav-link" href="#">
|
<a class="nav-link" href="#">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'Cash Flow'|capfirst %}</span>
|
<i class="fa-solid fa-sack-dollar"></i><span class="nav-link-text">{% trans 'Cash Flow'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% if request.user.is_authenticated and request.user.dealer %}
|
{% if request.user.is_authenticated and request.user.dealer %}
|
||||||
@ -290,7 +290,7 @@
|
|||||||
<a class="nav-link" href="#">
|
<a class="nav-link" href="#">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'Income Statement'|capfirst %}</span>
|
<i class="fa-solid fa-sheet-plastic"></i><span class="nav-link-text">{% trans 'Income Statement'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% if request.user.is_authenticated and request.user.dealer %}
|
{% if request.user.is_authenticated and request.user.dealer %}
|
||||||
@ -299,7 +299,7 @@
|
|||||||
<a class="nav-link" href="#">
|
<a class="nav-link" href="#">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<span class="nav-link-icon"><span data-feather="package"></span></span><span class="nav-link-text">{% trans 'Balance Sheet'|capfirst %}</span>
|
<i class="fa-solid fa-scale-balanced"></i><span class="nav-link-text">{% trans 'Balance Sheet'|capfirst %}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -4,7 +4,27 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{% if not car.ready %}
|
||||||
|
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
||||||
|
<svg class="svg-inline--fa fa-circle-info text-warning fs-5 me-3" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg><!-- <span class="fas fa-info-circle text-warning fs-5 me-3"></span> Font Awesome fontawesome.com -->
|
||||||
|
<p class="mb-0 flex-1">{{ _("This car information is not complete , please add colors and finances before making it ready for sale .") }}</p>
|
||||||
|
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if car.get_transfer %}
|
||||||
|
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
||||||
|
<svg class="svg-inline--fa fa-circle-info text-warning fs-5 me-3" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg><!-- <span class="fas fa-info-circle text-warning fs-5 me-3"></span> Font Awesome fontawesome.com -->
|
||||||
|
<p class="mb-0 flex-1">{{ _("This car is in transfer process to another dealer, please wait for the acceptance .") }}</p>
|
||||||
|
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if car.is_reserved %}
|
||||||
|
<div class="alert alert-outline-warning d-flex align-items-center" role="alert">
|
||||||
|
<svg class="svg-inline--fa fa-circle-info text-warning fs-5 me-3" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="circle-info" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"></path></svg><!-- <span class="fas fa-info-circle text-warning fs-5 me-3"></span> Font Awesome fontawesome.com -->
|
||||||
|
<p class="mb-0 flex-1">{{ _("This car is reserved until ") }}{{ car.get_reservation.reserved_until }}</p>
|
||||||
|
<button class="btn-close" type="button" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Main row -->
|
<!-- Main row -->
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
@ -134,7 +154,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="{% url 'car_update' car.pk %}" class="btn btn-phoenix-warning btn-sm mt-1">{% trans "Edit" %}</a>
|
{% if not car.get_transfer %}
|
||||||
|
<a href="{% url 'car_update' car.pk %}" class="btn btn-phoenix-warning btn-sm mt-1">{% trans "Edit" %}</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -165,11 +189,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% if car.finances.additional_services.first.pk %}
|
{% if car.finances.additional_services.first.pk %}
|
||||||
{% for service in car.finances.additional_services.all %}
|
{% for service in car.finances.additional_services.all %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{service.name}}</td>
|
<td>{{service.name}}</td>
|
||||||
<td>{{ service.price_|floatformat:2 }}</td>
|
<td>{{ service.price_|floatformat:2 }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "VAT Amount"|capfirst %}</th>
|
<th>{% trans "VAT Amount"|capfirst %}</th>
|
||||||
@ -181,17 +205,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<a href="{% url 'car_finance_update' car.finances.pk %}" class="btn btn-phoenix-warning btn-sm mb-3">
|
{% if not car.get_transfer %}
|
||||||
{% trans "Edit" %}
|
<a href="{% url 'car_finance_update' car.finances.pk %}" class="btn btn-phoenix-warning btn-sm mb-3">
|
||||||
</a>
|
{% trans "Edit" %}
|
||||||
{% else %}
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
<p>{% trans "No finance details available." %}</p>
|
<p>{% trans "No finance details available." %}</p>
|
||||||
<a href="{% url 'car_finance_create' car.pk %}" class="btn btn-phoenix-success btn-sm mb-3">
|
<a href="{% url 'car_finance_create' car.pk %}" class="btn btn-phoenix-success btn-sm mb-3">
|
||||||
{% trans "Add" %}
|
{% trans "Add" %}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -100,9 +100,11 @@
|
|||||||
<div class="row g-1">
|
<div class="row g-1">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="d-flex gap-1">
|
<div class="d-flex gap-1">
|
||||||
<button type="button" class="btn btn-sm btn-success w-100" data-bs-toggle="modal" data-bs-target="#approveCardModal">
|
{% if not action == 'cancel' %}
|
||||||
|
<button type="button" class="btn btn-sm btn-success w-100" data-bs-toggle="modal" data-bs-target="#approveCardModal">
|
||||||
{% trans 'Approve' %}
|
{% trans 'Approve' %}
|
||||||
</button>
|
</button>
|
||||||
|
{% endif %}
|
||||||
<button type="button" class="btn btn-sm btn-warning w-100" data-bs-toggle="modal" data-bs-target="#cancelCardModal">
|
<button type="button" class="btn btn-sm btn-warning w-100" data-bs-toggle="modal" data-bs-target="#cancelCardModal">
|
||||||
{% trans 'Cancel Transfer' %}
|
{% trans 'Cancel Transfer' %}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -38,8 +38,8 @@
|
|||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<div class="mt-5 text-center">
|
<div class="mt-5 text-center">
|
||||||
<button type="submit" class="btn btn-success me-2" {% if not items %}disabled{% endif %}>{% trans "Save" %}</button>
|
<button type="submit" class="btn btn-success me-2" {% if not items %}disabled{% endif %}><i class="fa-solid fa-floppy-disk"></i>{% trans "Save" %}</button>
|
||||||
<a href="{% url 'bill_list' %}" class="btn btn-secondary">{% trans "Cancel" %}</a>
|
<a href="{% url 'bill_list' %}" class="btn btn-secondary"><i class="fa-solid fa-ban"></i> {% trans "Cancel" %}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -73,14 +73,14 @@
|
|||||||
<tr class="has-text-centered">
|
<tr class="has-text-centered">
|
||||||
<td>{{ tx.journal_entry.je_number }}</td>
|
<td>{{ tx.journal_entry.je_number }}</td>
|
||||||
<td>{{ tx.journal_entry.timestamp }}</td>
|
<td>{{ tx.journal_entry.timestamp }}</td>
|
||||||
<td>
|
<td class="text-success">
|
||||||
{% if tx.tx_type == 'debit' %}
|
{% if tx.tx_type == 'debit' %}
|
||||||
{{ tx.amount }}
|
<i class="fa-solid fa-circle-up"></i> {{ tx.amount }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="text-danger">
|
||||||
{% if tx.tx_type == 'credit' %}
|
{% if tx.tx_type == 'credit' %}
|
||||||
{{ tx.amount }}
|
<i class="fa-solid fa-circle-down"></i> {{ tx.amount }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ tx.description }}</td>
|
<td>{{ tx.description }}</td>
|
||||||
@ -98,8 +98,8 @@
|
|||||||
<tr class="has-text-weight-bold">
|
<tr class="has-text-weight-bold">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="has-text-right"><span class="fw-bold fs-8">{{ _("Total") }}</span></td>
|
<td class="has-text-right"><span class="fw-bold fs-8">{{ _("Total") }}</span></td>
|
||||||
<td class="has-text-centered"><span class="fw-bold fs-8">{{ total_debits }} {{ _("SAR") }}</span></td>
|
<td class="has-text-centered"><span class="fw-bold fs-8 text-success">{{ total_debits }} {{ _("SAR") }}</span></td>
|
||||||
<td class="has-text-centered"><span class="fw-bold fs-8">{{ total_credits }} {{ _("SAR") }}</span></td>
|
<td class="has-text-centered"><span class="fw-bold fs-8 text-danger">{{ total_credits }} {{ _("SAR") }}</span></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -111,15 +111,15 @@
|
|||||||
<div class="mt-3 d-flex">
|
<div class="mt-3 d-flex">
|
||||||
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' account.pk %}">
|
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' account.pk %}">
|
||||||
<!-- <i class="bi bi-pencil-square"></i> -->
|
<!-- <i class="bi bi-pencil-square"></i> -->
|
||||||
{{ _('Edit') }}
|
<i class="fa-solid fa-pen-to-square"></i> {{ _('Edit') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-sm btn-phoenix-danger me-1" data-bs-toggle="modal" data-bs-target="#deleteModal">
|
<a class="btn btn-sm btn-phoenix-danger me-1" data-bs-toggle="modal" data-bs-target="#deleteModal">
|
||||||
<!-- <i class="bi bi-trash-fill"></i> -->
|
<!-- <i class="bi bi-trash-fill"></i> -->
|
||||||
{{ _('Delete') }}
|
<i class="fa-solid fa-trash"></i> {{ _('Delete') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-sm btn-phoenix-secondary" href="{% url 'account_list' %}">
|
<a class="btn btn-sm btn-phoenix-secondary" href="{% url 'account_list' %}">
|
||||||
<!-- <i class="bi bi-arrow-left-square-fill"></i> -->
|
<!-- <i class="bi bi-arrow-left-square-fill"></i> -->
|
||||||
{% trans 'Back to List' %}
|
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to List' %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,10 +11,10 @@
|
|||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
{% if account.created %}
|
{% if account.created %}
|
||||||
<!--<i class="bi bi-pencil-square"></i>-->
|
<!--<i class="bi bi-pencil-square"></i>-->
|
||||||
{{ _("Edit Account") }}
|
<i class="fa-solid fa-book"></i> {{ _("Edit Account") }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<!--<i class="bi bi-person-plus"></i> -->
|
<!--<i class="bi bi-person-plus"></i> -->
|
||||||
{{ _("Add Account") }}
|
<i class="fa-solid fa-book"></i> {{ _("Add Account") }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -27,9 +27,9 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="d-flex justify-content-end">
|
<div class="d-flex justify-content-end">
|
||||||
<button class="btn btn-sm btn-success me-1" type="submit">
|
<button class="btn btn-sm btn-success me-1" type="submit">
|
||||||
{{ _("Save") }}
|
<i class="fa-solid fa-floppy-disk"></i> {{ _("Save") }}
|
||||||
</button>
|
</button>
|
||||||
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger">{% trans "Cancel"|capfirst %}</a>
|
<a href="{{request.META.HTTP_REFERER}}" class="btn btn-sm btn-danger"><i class="fa-solid fa-ban"></i> {% trans "Cancel"|capfirst %}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<!-- Search Bar -->
|
<!-- Search Bar -->
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="mb-3">{% trans "Accounts" %}</h3>
|
<h3 class="mb-3"><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<form method="get" class=" mb-4">
|
<form method="get" class=" mb-4">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
@ -89,9 +89,9 @@
|
|||||||
<td class="align-middle text-end py-3 pe-3">
|
<td class="align-middle text-end py-3 pe-3">
|
||||||
|
|
||||||
{% if account.balance_type == 'debit' %}
|
{% if account.balance_type == 'debit' %}
|
||||||
<div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold">{{ _("Debit") }}</span><span class="ms-1 fas fa-arrow-circle-down"></span></div>
|
<div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold"><i class="fa-solid fa-circle-up"></i> {{ _("Debit") }}</span></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold">{{ _("Credit") }}</span><span class="ms-1 fas fa-arrow-circle-up"></span></div>
|
<div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold"><i class="fa-solid fa-circle-down"></i> {{ _("Credit") }}</span></div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle text-end py-3 pe-3">
|
<td class="align-middle text-end py-3 pe-3">
|
||||||
|
|||||||
@ -4,6 +4,28 @@
|
|||||||
{% block title %}{{ _("View Quotation") }}{% endblock title %}
|
{% block title %}{{ _("View Quotation") }}{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<!-- Cancel Modal -->
|
||||||
|
<div class="modal fade" id="CancelModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="CancelModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-sm">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header justify-content-between align-items-start gap-5 px-4 pt-4 pb-3 border-0">
|
||||||
|
<h4 class="mb-0 me-2 text-danger">{{ _("Delete")}}<i class="fas fa-exclamation-circle text-danger ms-2"></i></h4>
|
||||||
|
<button class="btn p-0 text-body-quaternary fs-6" data-bs-dismiss="modal" aria-label="Close"><span class="fas fa-times"></span></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body p-4">
|
||||||
|
<p>{% trans "Are you sure you want to Cancel this Estimate?" %}</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer flex justify-content-center border-top-0">
|
||||||
|
<a type="button" class="btn btn-sm btn-danger w-100" href="{% url 'estimate_mark_as' estimate.pk %}?mark=canceled">
|
||||||
|
<i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Confirm Modal -->
|
||||||
<div class="modal fade" id="confirmModal" tabindex="-1" aria-labelledby="confirmModalLabel" aria-hidden="true">
|
<div class="modal fade" id="confirmModal" tabindex="-1" aria-labelledby="confirmModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-sm">
|
<div class="modal-dialog modal-sm">
|
||||||
<div class="modal-content ">
|
<div class="modal-content ">
|
||||||
@ -16,13 +38,13 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{% trans 'Are you sure' %}
|
{% trans 'Are you sure ?' %}
|
||||||
<div class="modal-footer flex justify-content-center border-top-0">
|
<div class="modal-footer flex justify-content-center border-top-0">
|
||||||
<form id="confirmForm" method="POST" action="{% url 'estimate_mark_as' estimate.pk %}?mark=approved" class="form">
|
<form id="confirmForm" method="POST" action="{% url 'estimate_mark_as' estimate.pk %}?mark=approved" class="form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="container-fluid m-0 p-0">
|
<div class="container-fluid m-0 p-0">
|
||||||
<button type="button" class="btn btn-danger btn-sm" data-bs-dismiss="modal">{% trans 'No' %}</button>
|
<button type="button" class="btn btn-danger btn-sm" data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}</button>
|
||||||
<button type="submit" class="btn btn-success btn-sm">{% trans "Yes" %}</button>
|
<button type="submit" class="btn btn-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -36,22 +58,30 @@
|
|||||||
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
||||||
<div class="row-small mt-3">
|
<div class="row-small mt-3">
|
||||||
<div class="d-flex justify-content-between align-items-end mb-4 mx-3">
|
<div class="d-flex justify-content-between align-items-end mb-4 mx-3">
|
||||||
<h2 class="mb-0">{% trans 'Quotation' %}</h2>
|
<h2 class="mb-0"><i class="fa-regular fa-file-lines"></i> {% trans 'Quotation' %}</h2>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2">
|
||||||
|
{% if estimate.invoicemodel_set.first %}
|
||||||
|
<a href="{% url 'invoice_detail' estimate.invoicemodel_set.first.pk %}" class="btn btn-primary btn-lg me-1 mb-1" type="button"><i class="fa-solid fa-receipt"></i> View Invoice</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if estimate.status == 'draft' %}
|
{% if estimate.status == 'draft' %}
|
||||||
<a href="{% url 'send_email' estimate.pk %}" class="btn btn-phoenix-primary me-2"><span class="fa-regular fa-paper-plane me-sm-2"></span><span class="d-none d-sm-inline-block">{% trans 'Send Quotation' %}</span></a>
|
<a href="{% url 'send_email' estimate.pk %}" class="btn btn-phoenix-primary me-2"><span class="fa-regular fa-paper-plane me-sm-2"></span><span class="d-none d-sm-inline-block">{% trans 'Send Quotation' %}</span></a>
|
||||||
<button id="mark_as_sent_estimate" class="btn btn-phoenix-secondary" onclick="setFormAction('review')" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block">{% trans 'Mark As Sent' %}</span></button>
|
<button id="mark_as_sent_estimate" class="btn btn-phoenix-secondary" onclick="setFormAction('review')" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Sent' %}</span></button>
|
||||||
{% elif estimate.status == 'in_review' %}
|
{% elif estimate.status == 'in_review' %}
|
||||||
<button id="accept_estimate" onclick="setFormAction('approved')" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block">{% trans 'Mark As Accept' %}</span></button>
|
<button id="accept_estimate" onclick="setFormAction('approved')" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Mark As Accept' %}</span></button>
|
||||||
{% elif estimate.status == 'approved' %}
|
{% elif estimate.status == 'approved' %}
|
||||||
{% if estimate.sale_orders.first %}
|
{% if estimate.sale_orders.first %}
|
||||||
<a href="{% url 'invoice_create' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Create Invoice' %}</span></a>
|
<a href="{% url 'invoice_create' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-receipt"></i> {% trans 'Create Invoice' %}</span></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'create_sale_order' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Create Sale Order' %}</span></a>
|
<a href="{% url 'create_sale_order' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-file-import"></i> {% trans 'Create Sale Order' %}</span></a>
|
||||||
{% comment %} <a href="{% url 'preview_sale_order' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Preview Sale Order' %}</span></a> {% endcomment %}
|
{% comment %} <a href="{% url 'preview_sale_order' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Preview Sale Order' %}</span></a> {% endcomment %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif estimate.status == 'in_review' %}
|
{% elif estimate.status == 'in_review' %}
|
||||||
<a href="{% url 'estimate_preview' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Preview' %}</span></a>
|
<a href="{% url 'estimate_preview' estimate.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if estimate.can_cancel %}
|
||||||
|
<button class="btn btn-phoenix-danger" data-bs-toggle="modal" data-bs-target="#CancelModal"><i class="fa-solid fa-ban"></i> {% trans "Cancel" %}</button>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -62,17 +92,17 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-12">
|
<div class="col-12 col-sm-6 col-lg-12">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="mb-0 me-3">{% trans 'Quotation Number' %} :</h6>
|
<h6 class="mb-0 me-3"><i class="fa-solid fa-hashtag"></i> {% trans 'Quotation Number' %} :</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto col-lg-6 col-xl-7">
|
<div class="col-auto col-lg-6 col-xl-7">
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">#{{estimate.estimate_number}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.estimate_number}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-lg-12">
|
<div class="col-12 col-sm-6 col-lg-12">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="me-3">{% trans 'Quotation Date' %} :</h6>
|
<h6 class="me-3"><i class="fa-solid fa-calendar-days"></i> {% trans 'Quotation Date' %} :</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto col-lg-6 col-xl-7">
|
<div class="col-auto col-lg-6 col-xl-7">
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.created}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.created}}</p>
|
||||||
@ -84,11 +114,11 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-5">
|
<div class="col-12 col-sm-6 col-lg-5">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="mb-2 me-3">{% trans 'Customer' %} :</h6>
|
<h6 class="mb-2 me-3"><i class="fa-solid fa-user"></i> {% trans 'Customer' %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.customer_name}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.customer_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-4">
|
<div class="col-12 col-lg-4">
|
||||||
<h6 class="mb-2"> {% trans 'Email' %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-envelope"></i> {% trans 'Email' %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.email}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{estimate.customer.email}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,7 +126,7 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-4">
|
<div class="col-12 col-sm-6 col-lg-4">
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<h6 class="mb-2"> {% trans "Quotation Status" %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-list"></i> {% trans "Quotation Status" %} :</h6>
|
||||||
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
||||||
{% if estimate.status == 'draft' %}
|
{% if estimate.status == 'draft' %}
|
||||||
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
||||||
@ -120,7 +150,7 @@
|
|||||||
<table id="estimate-table" class="table fs-9 text-body mb-0">
|
<table id="estimate-table" class="table fs-9 text-body mb-0">
|
||||||
<thead class="bg-body-secondary">
|
<thead class="bg-body-secondary">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" style="width: 24px;">#</th>
|
<th scope="col" style="width: 24px;"><i class="fa-solid fa-hashtag"></i> </th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Make" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Make" %}</th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Model" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Model" %}</th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Year" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Year" %}</th>
|
||||||
|
|||||||
@ -6,14 +6,14 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="text-center">{% trans "Create Quotation" %}</h3>
|
<h3 class="text-center"><i class="fa-regular fa-file-lines"></i> {% trans "Create Quotation" %}</h3>
|
||||||
<form id="mainForm" method="post" class="needs-validation">
|
<form id="mainForm" method="post" class="needs-validation">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<div class="row mt-5">
|
<div class="row mt-5">
|
||||||
<div id="formrow">
|
<div id="formrow">
|
||||||
<h3 class="text-start">{{ _("Cars") }}</h3>
|
<h3 class="text-start"><i class="fa-solid fa-car-side"></i> {{ _("Cars") }}</h3>
|
||||||
<div class="form-row row g-3 mb-3 mt-5">
|
<div class="form-row row g-3 mb-3 mt-5">
|
||||||
<div class="mb-2 col-sm-4">
|
<div class="mb-2 col-sm-4">
|
||||||
<select class="form-control item" name="item[]" required>
|
<select class="form-control item" name="item[]" required>
|
||||||
@ -26,20 +26,20 @@
|
|||||||
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
|
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 col-sm-1">
|
<div class="mb-2 col-sm-1">
|
||||||
<button class="btn btn-sm btn-danger removeBtn">{{ _("Remove") }}</button>
|
<button class="btn btn-sm btn-danger removeBtn"><i class="fa-solid fa-trash"></i> {{ _("Remove") }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button id="addMoreBtn" class="btn btn-sm btn-primary">{{ _("Add More")}}</button>
|
<button id="addMoreBtn" class="btn btn-sm btn-primary"><i class="fa-solid fa-plus"></i> {{ _("Add More")}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<div class="mt-5 text-center">
|
<div class="mt-5 text-center">
|
||||||
<button type="submit" class="btn btn-success me-2" {% if not items %}disabled{% endif %}>{% trans "Save" %}</button>
|
<button type="submit" class="btn btn-success me-2" {% if not items %}disabled{% endif %}><i class="fa-solid fa-floppy-disk"></i> {% trans "Save" %}</button>
|
||||||
<a href="{% url 'estimate_list' %}" class="btn btn-secondary">{% trans "Cancel" %}</a>
|
<a href="{% url 'estimate_list' %}" class="btn btn-secondary"><i class="fa-solid fa-ban"></i> {% trans "Cancel" %}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
|
<input class="form-control quantity" type="number" placeholder="Quantity" name="quantity[]" required>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 col-sm-1">
|
<div class="mb-2 col-sm-1">
|
||||||
<button class="btn btn-danger removeBtn">Remove</button>
|
<button class="btn btn-danger removeBtn"><i class="fa-solid fa-trash"></i> {{ _("Remove") }}</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
formrow.appendChild(newForm);
|
formrow.appendChild(newForm);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="mb-3">{% trans "Quotations" %}</h3>
|
<h3 class="mb-3"><i class="fa-regular fa-file-lines"></i> {% trans "Quotations" %}</h3>
|
||||||
|
|
||||||
<div class="table-responsive px-1 scrollbar">
|
<div class="table-responsive px-1 scrollbar">
|
||||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||||
@ -46,7 +46,8 @@
|
|||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}"
|
<a href="{% url 'estimate_detail' estimate.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
{% trans "view"|capfirst %}
|
<i class="fa-regular fa-eye"></i>
|
||||||
|
{% trans "view"|capfirst %}
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'estimate_detail' estimate.pk %}"
|
<a href="{% url 'estimate_detail' estimate.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">{{ _("Add Invoice") }}</div>
|
<div class="card-header"><i class="fa-solid fa-receipt"></i> {{ _("Add Invoice") }}</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
|
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> {% trans 'Save' %}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -12,16 +12,15 @@
|
|||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{% trans 'Are you sure' %}
|
{% trans 'Are you sure ?' %}
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-danger"
|
class="btn btn-sm btn-danger"
|
||||||
data-bs-dismiss="modal">
|
data-bs-dismiss="modal"><i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
||||||
{% trans 'No' %}
|
|
||||||
</button>
|
</button>
|
||||||
<form id="confirmForm" method="POST" action="{% url 'invoice_mark_as' invoice.pk %}?mark=accept" class="d-inline">
|
<form id="confirmForm" method="POST" action="{% url 'invoice_mark_as' invoice.pk %}?mark=accept" class="d-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-success btn-sm">{% trans "Yes" %}</button>
|
<button type="submit" class="btn btn-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -37,16 +36,16 @@
|
|||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{% trans 'Are you sure' %}
|
{% trans 'Are you sure ?' %}
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-sm btn-danger"
|
class="btn btn-sm btn-danger"
|
||||||
data-bs-dismiss="modal">
|
data-bs-dismiss="modal">
|
||||||
{% trans 'No' %}
|
<i class="fa-solid fa-ban"></i> {% trans 'No' %}
|
||||||
</button>
|
</button>
|
||||||
<form id="confirmForm" method="POST" action="{% url 'payment_mark_as_paid' invoice.pk %}" class="d-inline">
|
<form id="confirmForm" method="POST" action="{% url 'payment_mark_as_paid' invoice.pk %}" class="d-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-success btn-sm">{% trans "Yes" %}</button>
|
<button type="submit" class="btn btn-success btn-sm"><i class="fa-solid fa-circle-check"></i> {% trans "Yes" %}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,18 +57,18 @@
|
|||||||
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
<section class="pt-5 pb-9 bg-body-emphasis dark__bg-gray-1200 border-top">
|
||||||
<div class="row-small mt-3 mx-3">
|
<div class="row-small mt-3 mx-3">
|
||||||
<div class="d-flex justify-content-between align-items-end mb-4 mx-3">
|
<div class="d-flex justify-content-between align-items-end mb-4 mx-3">
|
||||||
<h2 class="mb-0">{% trans 'Invoice' %}</h2>
|
<h2 class="mb-0"><i class="fa-solid fa-receipt"></i> {% trans 'Invoice' %}</h2>
|
||||||
<div class="d-flex align-items-center gap-2">
|
<div class="d-flex align-items-center gap-2">
|
||||||
{% if invoice.invoice_status == 'in_review' %}
|
{% if invoice.invoice_status == 'in_review' %}
|
||||||
<button id="accept_invoice" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block">{% trans 'Accept' %}</span></button>
|
<button id="accept_invoice" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Accept' %}</span></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if invoice.invoice_status == 'approved' %}
|
{% if invoice.invoice_status == 'approved' %}
|
||||||
<a href="{% url 'payment_create' invoice.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Record Payment' %}</span></a>
|
<a href="{% url 'payment_create' invoice.pk %}" class="btn btn-phoenix-success"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-money-bill"></i> {% trans 'Record Payment' %}</span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not invoice.is_paid %}
|
{% if not invoice.is_paid %}
|
||||||
<button id="mark_invoice_as_paid" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#mark_as_paid_Modal"><span class="d-none d-sm-inline-block">{% trans 'Mark as Paid' %}</span></button>
|
<button id="mark_invoice_as_paid" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#mark_as_paid_Modal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-money-check-dollar"></i> {% trans 'Mark as Paid' %}</span></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'invoice_preview' invoice.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block">{% trans 'Preview' %}</span></a>
|
<a href="{% url 'invoice_preview' invoice.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -153,17 +152,17 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-12">
|
<div class="col-12 col-sm-6 col-lg-12">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="mb-0 me-3">{% trans "Invoice Number" %} :</h6>
|
<h6 class="mb-0 me-3"><i class="fa-solid fa-hashtag"></i> {% trans "Invoice Number" %} :</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto col-lg-6 col-xl-7">
|
<div class="col-auto col-lg-6 col-xl-7">
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">#{{invoice.invoice_number}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.invoice_number}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6 col-lg-12">
|
<div class="col-12 col-sm-6 col-lg-12">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="me-3">{% trans "Invoice Date" %} :</h6>
|
<h6 class="me-3"><i class="fa-solid fa-calendar-days"></i> {% trans "Invoice Date" %} :</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto col-lg-6 col-xl-7">
|
<div class="col-auto col-lg-6 col-xl-7">
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.created}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.created}}</p>
|
||||||
@ -175,11 +174,11 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-5">
|
<div class="col-12 col-sm-6 col-lg-5">
|
||||||
<div class="row align-items-center g-0">
|
<div class="row align-items-center g-0">
|
||||||
<div class="col-auto col-lg-6 col-xl-5">
|
<div class="col-auto col-lg-6 col-xl-5">
|
||||||
<h6 class="mb-2 me-3">{% trans "Customer Name" %} :</h6>
|
<h6 class="mb-2 me-3"><i class="fa-solid fa-user"></i> {% trans "Customer Name" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.customer_name}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.customer_name}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-4">
|
<div class="col-12 col-lg-4">
|
||||||
<h6 class="mb-2"> {% trans "Customer Email" %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-envelope"></i> {% trans "Customer Email" %} :</h6>
|
||||||
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.email}}</p>
|
<p class="fs-9 text-body-secondary fw-semibold mb-0">{{invoice.customer.email}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -187,7 +186,7 @@
|
|||||||
<div class="col-12 col-sm-6 col-lg-4">
|
<div class="col-12 col-sm-6 col-lg-4">
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<h6 class="mb-2"> {% trans "Invoice Status" %} :</h6>
|
<h6 class="mb-2"><i class="fa-solid fa-list"></i> {% trans "Invoice Status" %} :</h6>
|
||||||
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
<div class="fs-9 text-body-secondary fw-semibold mb-0">
|
||||||
{% if invoice.invoice_status == 'draft' %}
|
{% if invoice.invoice_status == 'draft' %}
|
||||||
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
<span class="badge text-bg-warning">{% trans "Draft" %}</span>
|
||||||
@ -211,7 +210,7 @@
|
|||||||
<table id="invoice-table" class="table fs-9 text-body mb-0">
|
<table id="invoice-table" class="table fs-9 text-body mb-0">
|
||||||
<thead class="bg-body-secondary">
|
<thead class="bg-body-secondary">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" style="width: 24px;">#</th>
|
<th scope="col" style="width: 24px;"><i class="fa-solid fa-hashtag"></i> </th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Make" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Make" %}</th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Model" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Model" %}</th>
|
||||||
<th scope="col" style="min-width: 100px;">{% trans "Year" %}</th>
|
<th scope="col" style="min-width: 100px;">{% trans "Year" %}</th>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="mb-3">{% trans "Invoices" %}</h3>
|
<h3 class="mb-3"><i class="fa-solid fa-receipt"></i> {% trans "Invoices" %}</h3>
|
||||||
|
|
||||||
<div class="table-responsive px-1 scrollbar">
|
<div class="table-responsive px-1 scrollbar">
|
||||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||||
@ -57,6 +57,7 @@
|
|||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="{% url 'invoice_detail' invoice.pk %}"
|
<a href="{% url 'invoice_detail' invoice.pk %}"
|
||||||
class="btn btn-sm btn-phoenix-success">
|
class="btn btn-sm btn-phoenix-success">
|
||||||
|
<i class="fa-regular fa-eye"></i>
|
||||||
{% trans "View" %}
|
{% trans "View" %}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<h3 class="mb-3">{% trans "Transactions" %}</h3>
|
<h3 class="mb-3"><i class="fa-solid fa-right-left"></i> {% trans "Transactions" %}</h3>
|
||||||
|
|
||||||
<div class="table-responsive px-1 scrollbar">
|
<div class="table-responsive px-1 scrollbar">
|
||||||
<table class="table fs-9 mb-0 border-top border-translucent">
|
<table class="table fs-9 mb-0 border-top border-translucent">
|
||||||
@ -27,8 +27,8 @@
|
|||||||
<td class="align-middle product white-space-nowrap py-0">{{ transaction.created|date}}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ transaction.created|date}}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ transaction.account.name }}</td>
|
<td class="align-middle product white-space-nowrap">{{ transaction.account.name }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ transaction.account.code }}</td>
|
<td class="align-middle product white-space-nowrap">{{ transaction.account.code }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{% if transaction.tx_type == "debit" %}{{ transaction.amount }}{{ CURRENCY }}{% endif %}</td>
|
<td class="align-middle product white-space-nowrap text-success">{% if transaction.tx_type == "debit" %}<i class="fa-solid fa-circle-up"></i> {{ transaction.amount }}{{ CURRENCY }}{% endif %}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{% if transaction.tx_type == "credit" %}{{ transaction.amount }}{{ CURRENCY }}{% endif %}</td>
|
<td class="align-middle product white-space-nowrap text-danger">{% if transaction.tx_type == "credit" %}<i class="fa-solid fa-circle-down"></i> {{ transaction.amount }}{{ CURRENCY }}{% endif %}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ transaction.description }}</td>
|
<td class="align-middle product white-space-nowrap">{{ transaction.description }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
{% if model.is_paid %}
|
{% if model.is_paid %}
|
||||||
<div class="card-header">{{ _("Payment Already Made") }}</div>
|
<div class="card-header">{{ _("Payment Already Made") }}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card-header">{{ _("Make Payment") }}</div>
|
<div class="card-header"><i class="fa-solid fa-hand-holding-dollar"></i> {{ _("Make Payment") }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if model %}
|
{% if model %}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form|crispy }}
|
{{ form|crispy }}
|
||||||
<button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
|
<button type="submit" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i> {% trans 'Save' %}</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="d-flex justify-content-between mb-2">
|
<div class="d-flex justify-content-between mb-2">
|
||||||
<h3 class="mb-3">{% trans "Payments" %}</h3>
|
<h3 class="mb-3"><i class="fa-solid fa-hand-holding-dollar"></i> {% trans "Payments" %}</h3>
|
||||||
{% comment %} <a href="{% url 'payment_create' %}" class="btn btn-sm btn-phoenix-success ">{% trans "Add Payment" %}</a> {% endcomment %}
|
{% comment %} <a href="{% url 'payment_create' %}" class="btn btn-sm btn-phoenix-success ">{% trans "Add Payment" %}</a> {% endcomment %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -29,14 +29,16 @@
|
|||||||
<td class="align-middle product white-space-nowrap py-0">{{ forloop.counter }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ forloop.counter }}</td>
|
||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.je_number }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.je_number }}</td>
|
||||||
{% if journal.ledger.invoicemodel %}
|
{% if journal.ledger.invoicemodel %}
|
||||||
<td class="align-middle product white-space-nowrap py-0"><a href="{% url 'invoice_detail' journal.ledger.invoicemodel.pk %}">{{ journal.ledger.invoicemodel }}</a></td>
|
<td class="align-middle product white-space-nowrap py-0">
|
||||||
|
<a href="{% url 'invoice_detail' journal.ledger.invoicemodel.pk %}"><i class="fa-solid fa-receipt"></i> {{ journal.ledger.invoicemodel }}</a>
|
||||||
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class="align-middle product white-space-nowrap py-0"></td>
|
<td class="align-middle product white-space-nowrap py-0"></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.timestamp }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.timestamp }}</td>
|
||||||
<td class="align-middle product white-space-nowrap py-0">{{ journal.description }}</td>
|
<td class="align-middle product white-space-nowrap py-0">{{ journal.description }}</td>
|
||||||
<td class="text-center">
|
<td class="">
|
||||||
<a href="{% url 'payment_details' journal.pk %}" class="btn btn-sm btn-phoenix-primary">{% trans "View Tranactions" %}</a>
|
<a href="{% url 'payment_details' journal.pk %}" class="btn btn-sm btn-phoenix-primary"><i class="fa-solid fa-eye"></i> {% trans "View Tranactions" %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user