Compare commits
6 Commits
f6d59da008
...
38e52d5e30
| Author | SHA1 | Date | |
|---|---|---|---|
| 38e52d5e30 | |||
| c7bd1d7761 | |||
| 0a3d8d3871 | |||
|
|
4184dfce85 | ||
| 82090ff820 | |||
| 391176f0ed |
26
inventory/management/commands/check_vin.py
Normal file
26
inventory/management/commands/check_vin.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
from inventory.services import get_model,get_make,decodevin
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Seed the Customer model with 20 records'
|
||||||
|
|
||||||
|
def handle(self, *args, **kwargs):
|
||||||
|
# vin,description = self.generate_vin()
|
||||||
|
result = decodevin("1HGCM82633A123456")
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
# self.stdout.write(self.style.SUCCESS(f'Generated VIN: {vin}'))
|
||||||
|
# self.stdout.write(self.style.SUCCESS(f'Description: {description}'))
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
self.stdout.write(self.style.SUCCESS(f'Decoded VIN: {result}'))
|
||||||
|
make,model,year_model = result.values()
|
||||||
|
self.stdout.write(self.style.SUCCESS(f'VIN:"1HGCM82633A123456" - Make {make} - Model {model} - Model Year {year_model}'))
|
||||||
|
make = get_make(make)
|
||||||
|
model = get_model(model,make)
|
||||||
|
|
||||||
|
self.stdout.write(self.style.SUCCESS(f'Make: {make} - Model: {model} - Year: {year_model}'))
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
self.stdout.write(self.style.SUCCESS('####################################################################################################'))
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ urlpatterns = [
|
|||||||
),
|
),
|
||||||
# Car URLs
|
# Car URLs
|
||||||
path('cars/upload_cars/', views.upload_cars, name='upload_cars'),
|
path('cars/upload_cars/', views.upload_cars, name='upload_cars'),
|
||||||
path('cars/<uuid:po_pk>/upload_cars/', views.upload_cars, name='upload_cars'),
|
path('cars/<uuid:pk>/upload_cars/', views.upload_cars, name='upload_cars'),
|
||||||
path("cars/add/", views.CarCreateView.as_view(), name="car_add"),
|
path("cars/add/", views.CarCreateView.as_view(), name="car_add"),
|
||||||
path("cars/inventory/", views.CarInventory.as_view(), name="car_inventory_all"),
|
path("cars/inventory/", views.CarInventory.as_view(), name="car_inventory_all"),
|
||||||
path(
|
path(
|
||||||
@ -874,7 +874,7 @@ path(
|
|||||||
path('purchase_orders/<slug:entity_slug>/delete/<uuid:po_pk>/',
|
path('purchase_orders/<slug:entity_slug>/delete/<uuid:po_pk>/',
|
||||||
views.PurchaseOrderModelDeleteView.as_view(),
|
views.PurchaseOrderModelDeleteView.as_view(),
|
||||||
name='po-delete'),
|
name='po-delete'),
|
||||||
|
path('purchase_orders/<slug:entity_slug>/<uuid:po_pk>/upload/',view=views.view_items_inventory,name='view_items_inventory'),
|
||||||
# Actions....
|
# Actions....
|
||||||
path('<slug:entity_slug>/action/<uuid:po_pk>/mark-as-draft/',
|
path('<slug:entity_slug>/action/<uuid:po_pk>/mark-as-draft/',
|
||||||
views.PurchaseOrderMarkAsDraftView.as_view(),
|
views.PurchaseOrderMarkAsDraftView.as_view(),
|
||||||
|
|||||||
@ -8858,7 +8858,7 @@ def InventoryItemCreateView(request):
|
|||||||
serie_name = models.CarSerie.objects.get(pk=serie)
|
serie_name = models.CarSerie.objects.get(pk=serie)
|
||||||
trim_name = models.CarTrim.objects.get(pk=trim)
|
trim_name = models.CarTrim.objects.get(pk=trim)
|
||||||
|
|
||||||
inventory_name = f"{make_name.name} - {model_name.name} - {serie_name.name} - {trim_name.name} - {year} - {exterior.name} - {interior.name}"
|
inventory_name = f"{make_name.name} || {model_name.name} || {serie_name.name} || {trim_name.name} || {year} || {exterior.name} || {interior.name}"
|
||||||
uom = entity.get_uom_all().get(name='Unit')
|
uom = entity.get_uom_all().get(name='Unit')
|
||||||
entity.create_item_inventory(
|
entity.create_item_inventory(
|
||||||
name=inventory_name,
|
name=inventory_name,
|
||||||
@ -9187,29 +9187,56 @@ class BillModelActionForceMigrateView(BaseBillActionView):
|
|||||||
###############################################################
|
###############################################################
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
def upload_cars(request,po_pk=None):
|
def view_items_inventory(request,entity_slug,po_pk):
|
||||||
dealer = get_user_type(request)
|
dealer = get_user_type(request)
|
||||||
|
po = PurchaseOrderModel.objects.get(pk=po_pk)
|
||||||
|
items = po.get_itemtxs_data()[0]
|
||||||
|
return render(request,'purchase_orders/po_upload_cars.html',{'po':po,"items":items})
|
||||||
|
|
||||||
|
def upload_cars(request,pk=None):
|
||||||
|
item = None
|
||||||
|
dealer = get_user_type(request)
|
||||||
|
response = redirect('upload_cars')
|
||||||
|
if pk:
|
||||||
|
item = get_object_or_404(ItemTransactionModel, pk=pk)
|
||||||
|
response = redirect('upload_cars', pk=pk)
|
||||||
|
if item.item_model.additional_info["uploaded"]:
|
||||||
|
messages.add_message(request, messages.ERROR, 'Item already uploaded.')
|
||||||
|
return redirect('view_items_inventory', entity_slug=dealer.slug, po_pk=item.po_model.pk)
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
csv_file = request.FILES.get('csv_file')
|
csv_file = request.FILES.get('csv_file')
|
||||||
year = request.POST.get("year")
|
|
||||||
receiving_date = datetime.strptime(request.POST.get("receiving_date"), "%Y-%m-%d")
|
|
||||||
receiving_date = timezone.make_aware(receiving_date)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
make = models.CarMake.objects.get(pk=request.POST.get("make"))
|
if item:
|
||||||
model = models.CarModel.objects.get(pk=request.POST.get("model"))
|
item = ItemTransactionModel.objects.get(pk=pk)
|
||||||
serie = models.CarSerie.objects.get(pk=request.POST.get("serie"))
|
data = [x.strip() for x in item.item_model.name.split("||")]
|
||||||
trim = models.CarTrim.objects.get(pk=request.POST.get("trim"))
|
make = models.CarMake.objects.get(name=data[0])
|
||||||
vendor = models.Vendor.objects.get(pk=request.POST.get("vendor"))
|
model = make.carmodel_set.get(name=data[1])
|
||||||
exterior = models.ExteriorColors.objects.get(pk=request.POST.get("exterior"))
|
trim = models.CarTrim.objects.filter(name=data[3],id_car_serie__id_car_model=model.id_car_model).first()
|
||||||
interior = models.InteriorColors.objects.get(pk=request.POST.get("interior"))
|
serie = trim.id_car_serie
|
||||||
|
year = data[4]
|
||||||
|
exterior = models.ExteriorColors.objects.get(name=data[5])
|
||||||
|
interior = models.InteriorColors.objects.get(name=data[6])
|
||||||
|
receiving_date = timezone.now()
|
||||||
|
vendor_model = item.bill_model.vendor
|
||||||
|
vendor = models.Vendor.objects.get(vendor_model=vendor_model)
|
||||||
|
else:
|
||||||
|
make = models.CarMake.objects.get(pk=request.POST.get("make"))
|
||||||
|
model = models.CarModel.objects.get(pk=request.POST.get("model"))
|
||||||
|
serie = models.CarSerie.objects.get(pk=request.POST.get("serie"))
|
||||||
|
trim = models.CarTrim.objects.get(pk=request.POST.get("trim"))
|
||||||
|
exterior = models.ExteriorColors.objects.get(pk=request.POST.get("exterior"))
|
||||||
|
interior = models.InteriorColors.objects.get(pk=request.POST.get("interior"))
|
||||||
|
year = request.POST.get("year")
|
||||||
|
receiving_date = datetime.strptime(request.POST.get("receiving_date"), "%Y-%m-%d")
|
||||||
|
vendor = models.Vendor.objects.get(pk=request.POST.get("vendor"))
|
||||||
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
messages.error(request, f"Error processing CSV: {str(e)}")
|
messages.error(request, f"Error processing CSV: {str(e)}")
|
||||||
if po_pk:
|
return response
|
||||||
return redirect('upload_cars',po_pk=po_pk)
|
|
||||||
else:
|
|
||||||
return redirect('upload_cars')
|
|
||||||
if not csv_file.name.endswith('.csv'):
|
if not csv_file.name.endswith('.csv'):
|
||||||
messages.error(request, "Please upload a CSV file")
|
messages.error(request, "Please upload a CSV file")
|
||||||
return redirect('upload_cars')
|
return redirect('upload_cars')
|
||||||
@ -9218,8 +9245,21 @@ def upload_cars(request,po_pk=None):
|
|||||||
file_content = csv_file.read().decode('utf-8')
|
file_content = csv_file.read().decode('utf-8')
|
||||||
csv_data = io.StringIO(file_content)
|
csv_data = io.StringIO(file_content)
|
||||||
reader = csv.DictReader(csv_data)
|
reader = csv.DictReader(csv_data)
|
||||||
|
data = [x for x in reader]
|
||||||
|
for row in data:
|
||||||
|
if result := decodevin(row['vin']):
|
||||||
|
if models.Car.objects.filter(vin=row['vin']).exists():
|
||||||
|
messages.error(request, f"vin {row['vin']} already exists")
|
||||||
|
return response
|
||||||
|
manufacturer_name, model_name, year_model = result.values()
|
||||||
|
car_make = get_make(manufacturer_name)
|
||||||
|
car_model = get_model(model_name, car_make)
|
||||||
|
if not all([car_make, car_model]) or (make.pk != car_make.pk) or (model.pk != car_model.pk) or (int(year) != int(year_model)):
|
||||||
|
messages.error(request, f"invalid data at vin {row['vin']}, Please upload a valid CSV file")
|
||||||
|
return response
|
||||||
|
|
||||||
cars_created = 0
|
cars_created = 0
|
||||||
for row in reader:
|
for row in data:
|
||||||
car = models.Car.objects.create(
|
car = models.Car.objects.create(
|
||||||
dealer=dealer,
|
dealer=dealer,
|
||||||
vin=row['vin'],
|
vin=row['vin'],
|
||||||
@ -9227,19 +9267,24 @@ def upload_cars(request,po_pk=None):
|
|||||||
id_car_model=model,
|
id_car_model=model,
|
||||||
id_car_serie=serie,
|
id_car_serie=serie,
|
||||||
id_car_trim=trim,
|
id_car_trim=trim,
|
||||||
year=year,
|
year=int(year),
|
||||||
vendor=vendor,
|
vendor=vendor,
|
||||||
receiving_date=receiving_date,
|
receiving_date=receiving_date,
|
||||||
)
|
)
|
||||||
car.add_colors(exterior=exterior, interior=interior)
|
car.add_colors(exterior=exterior, interior=interior)
|
||||||
cars_created += 1
|
cars_created += 1
|
||||||
|
if item:
|
||||||
|
item.item_model.additional_info["uploaded"] = True
|
||||||
|
item.item_model.save()
|
||||||
|
|
||||||
messages.success(request, f"Successfully imported {cars_created} cars")
|
messages.success(request, f"Successfully imported {cars_created} cars")
|
||||||
return redirect('car_list') # redirect to your car list view
|
return response
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
messages.error(request, f"Error processing CSV: {str(e)}")
|
messages.error(request, f"Error processing CSV: {str(e)}")
|
||||||
form = forms.CSVUploadForm()
|
form = forms.CSVUploadForm()
|
||||||
return render(request, 'csv_upload.html',{"make_data":models.CarMake.objects.all(),"form":form})
|
form.fields["vendor"].queryset = dealer.vendors.all()
|
||||||
|
|
||||||
|
return render(request, 'csv_upload.html',{"make_data":models.CarMake.objects.all(),"form":form,"item":item})
|
||||||
###############################################################
|
###############################################################
|
||||||
###############################################################
|
###############################################################
|
||||||
BIN
static/images/logos/.DS_Store
vendored
BIN
static/images/logos/.DS_Store
vendored
Binary file not shown.
BIN
static/images/logos/users/app_logo_OGF1wFV.png
Normal file
BIN
static/images/logos/users/app_logo_OGF1wFV.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
2
static/sample/cars_sample.csv
Normal file
2
static/sample/cars_sample.csv
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
vin,
|
||||||
|
1HGCM82633A123456,
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<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=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
<h3 class=""><i class="fas fa-right-to-bracket me-2"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Log Type Tabs -->
|
<!-- Log Type Tabs -->
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{% include 'partials/pagination.html' with q='loginEvents' %}
|
{% include 'partials/pagination.html' with q='loginEvents' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No authentication audit events found.</p>
|
<p>No authentication audit events found.</p>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<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=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
<h3 class=""><i class="fas fa-history me-2"></i>{% trans "Audit Log Dashboard" %}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Log Type Tabs -->
|
<!-- Log Type Tabs -->
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<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=""><i class="fa-solid fa-book"></i> {% trans "Audit Log Dashboard" %}</h3>
|
<h3 class=""><i class="fas fa-file-alt me-2"></i> {% trans "Audit Log Dashboard" %}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Log Type Tabs -->
|
<!-- Log Type Tabs -->
|
||||||
|
|||||||
@ -26,11 +26,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#djl-vendor-card-widget{
|
#djl-vendor-card-widget{
|
||||||
height:30rem;
|
|
||||||
|
|
||||||
|
max-height:30rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@ -39,12 +37,14 @@
|
|||||||
<div class="row g-4" >
|
<div class="row g-4" >
|
||||||
<!-- Left Sidebar -->
|
<!-- Left Sidebar -->
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm" >
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
|
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
|
||||||
<hr class="my-4">
|
<hr class="my-4">
|
||||||
|
|
||||||
{% include 'django_ledger/vendor/includes/card_vendor.html' with vendor=bill.vendor %}
|
{% include 'django_ledger/vendor/includes/card_vendor.html' with vendor=bill.vendor %}
|
||||||
<div class="d-grid mt-4">
|
|
||||||
|
<div class="d-grid mt-8">
|
||||||
<a href="{% url 'django_ledger:bill-list' entity_slug=view.kwargs.entity_slug %}"
|
<a href="{% url 'django_ledger:bill-list' entity_slug=view.kwargs.entity_slug %}"
|
||||||
class="btn btn-phoenix-primary">
|
class="btn btn-phoenix-primary">
|
||||||
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
|
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'PO' %}</th>
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans 'PO' %}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody class="list" id="project-list-table-body">
|
||||||
{% for bill_item in itemtxs_qs %}
|
{% for bill_item in itemtxs_qs %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="align-middle white-space-nowrap">
|
<td class="align-middle white-space-nowrap">
|
||||||
@ -257,7 +257,7 @@
|
|||||||
<h5 class="mb-0">{% trans 'Bill Transactions' %}</h5>
|
<h5 class="mb-0">{% trans 'Bill Transactions' %}</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body px-0 pt-0 pb-2">
|
<div class="card-body px-0 pt-0 pb-2 table-responsive">
|
||||||
{% transactions_table bill %}
|
{% transactions_table bill %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -74,18 +74,23 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container mt-4">
|
<div class="container mt-4">
|
||||||
<h2>Upload Cars CSV</h2>
|
<h2>Upload Cars CSV</h2>
|
||||||
|
<div class="d-flex justify-content-end">
|
||||||
|
<a href="{% static 'sample/cars_sample.csv' %}" class="btn btn-outline-success mt-4">
|
||||||
|
<i class="fa-solid fa-file-csv me-2"></i>Download Sample CSV
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<div class="alert alert-{{ message.tags }}">
|
<div class="alert alert-outline-warning }} mt-4" role="alert">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method="post" enctype="multipart/form-data" class="mt-4">
|
<form method="post" enctype="multipart/form-data" class="mt-4">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
{% if not item %}
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{% include "purchase_orders/partials/po-select.html" with name="make" target="model" data=make_data pk=po_model.pk %}
|
{% include "purchase_orders/partials/po-select.html" with name="make" target="model" data=make_data pk=po_model.pk %}
|
||||||
@ -117,70 +122,56 @@
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="row g-4">
|
<div class="row g-4">
|
||||||
|
<div class="col">
|
||||||
<p class="fs-5 mb-2">{% trans 'Exterior Colors' %}</p>
|
<p class="fs-5 mb-2">{% trans 'Exterior Colors' %}</p>
|
||||||
<div class="color-options-container">
|
<div class="color-options-container">
|
||||||
{% for color in form.fields.exterior.queryset %}
|
{% for color in form.fields.exterior.queryset %}
|
||||||
<div class="color-card">
|
<div class="color-card">
|
||||||
<label class="color-option">
|
<label class="color-option">
|
||||||
<input class="color-radio" type="radio" name="exterior" value="{{ color.id }}" {% if color.id == form.instance.exterior.id %}checked{% endif %}>
|
<input class="color-radio" type="radio" name="exterior" value="{{ color.id }}" {% if color.id == form.instance.exterior.id %}checked{% endif %}>
|
||||||
<div class="color-display" style="background-color: rgb({{ color.rgb }})">
|
<div class="color-display" style="background-color: rgb({{ color.rgb }})">
|
||||||
<span class="color-name">{{ color.get_local_name }}</span>
|
<span class="color-name">{{ color.get_local_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
<p class="fs-5 mb-2">{% trans 'Interior Colors' %}</p>
|
<p class="fs-5 mb-2">{% trans 'Interior Colors' %}</p>
|
||||||
<div class="color-options-container">
|
<div class="color-options-container">
|
||||||
{% for color in form.fields.interior.queryset %}
|
{% for color in form.fields.interior.queryset %}
|
||||||
<div class="color-card">
|
<div class="color-card">
|
||||||
<label class="color-option">
|
<label class="color-option">
|
||||||
<input class="color-radio" type="radio" name="interior" value="{{ color.id }}" {% if color.id == form.instance.interior.id %}checked{% endif %}>
|
<input class="color-radio" type="radio" name="interior" value="{{ color.id }}" {% if color.id == form.instance.interior.id %}checked{% endif %}>
|
||||||
<div class="color-display" style="background-color: rgb({{ color.rgb }})">
|
<div class="color-display" style="background-color: rgb({{ color.rgb }})">
|
||||||
<span class="color-name">{{ color.get_local_name }}</span>
|
<span class="color-name">{{ color.get_local_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if item %}
|
||||||
|
<h3 class="mt-4">List of Items</h3>
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item">
|
||||||
|
<span class="badge bg-primary">{{ item.item_model }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="csv_file" class="form-label">CSV File</label>
|
<label for="csv_file" class="form-label">CSV File</label>
|
||||||
<input type="file" class="form-control" id="csv_file" name="csv_file" accept=".csv" required>
|
<input type="file" class="form-control" id="csv_file" name="csv_file" accept=".csv" required>
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
CSV should include columns: vin, make, model, year (required)
|
CSV should include columns: vin
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Upload</button>
|
<button type="submit" class="btn btn-primary">Upload</button>
|
||||||
<a href="{% url 'car_list' %}" class="btn btn-secondary">Cancel</a>
|
<a href="{{ request.META.HTTP_REFERER }}" class="btn btn-secondary">Cancel</a>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="mt-4">
|
|
||||||
<h4>CSV Format Example</h4>
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>vin</th>
|
|
||||||
<th>make</th>
|
|
||||||
<th>model</th>
|
|
||||||
<th>year</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>1HGCM82633A123456</td>
|
|
||||||
<td>Honda</td>
|
|
||||||
<td>Accord</td>
|
|
||||||
<td>2023</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<a href="{% static 'sample/cars_sample.csv' %}" class="btn btn-outline-primary">
|
|
||||||
Download Sample CSV
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
{% if perms.django_ledger.change_customermodel %}
|
{% if perms.django_ledger.change_customermodel %}
|
||||||
<a href="{% url 'customer_update' customer.slug %}" class="btn btn-sm btn-phoenix-warning"><span class="fa-solid fa-pen-to-square me-2"></span>{{_("Update")}}</a>
|
<a href="{% url 'customer_update' customer.slug %}" class="btn btn-sm btn-phoenix-primary"><span class="fa-solid fa-pen-to-square me-2"></span>{{_("Update")}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -62,7 +62,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% trans "No Permissions" %}</td>
|
<td>{% trans "No User" %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<div class="text-danger">{{ error }}</div>
|
<div class="text-danger">{{ error }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="d-flex mb-3">
|
<div class="d-flex mb-3">
|
||||||
<a href="{% url 'group_detail' group.pk %}" class="btn btn-phoenix-primary me-2 px-6"><i class="fa-solid fa-ban"></i> {% trans "Cancel"|capfirst %}</a>
|
<a href="{% url 'group_detail' group.pk %}" class="btn btn-phoenix-primary me-2 "><i class="fa-solid fa-ban"></i> {% trans "Cancel"|capfirst %}</a>
|
||||||
<button class="btn btn-phoenix-primary" type="submit">
|
<button class="btn btn-phoenix-primary" type="submit">
|
||||||
<i class="fa-solid fa-floppy-disk"></i>
|
<i class="fa-solid fa-floppy-disk"></i>
|
||||||
{{ _("Save") }}
|
{{ _("Save") }}
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
<li class="page-item rounded-md overflow-hidden">
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page=1{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'First' %}">
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page=1{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'First' %}">
|
||||||
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
||||||
<span class="">{% trans 'First' %}</span>
|
{% if LANGUAGE_CODE == 'ar' %}الأول{% else %}First{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-left" aria-hidden="true"></span>
|
||||||
<span class="">{% trans 'First' %}</span>
|
{% if LANGUAGE_CODE == 'ar' %}الأول{% else %}First{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -75,14 +75,14 @@
|
|||||||
<li class="page-item rounded-md overflow-hidden">
|
<li class="page-item rounded-md overflow-hidden">
|
||||||
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.paginator.num_pages }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Last' %}">
|
<a class="page-link px-3 py-2 border border-gray-300 bg-white text-blue-600 hover:bg-gray-100 transition-colors duration-200" href="?page={{ page_obj.paginator.num_pages }}{% if q %}&q={{q}}{% endif %}" aria-label="{% trans 'Last' %}">
|
||||||
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
||||||
<span class="">{% trans 'Last' %}</span>
|
{% if LANGUAGE_CODE == 'ar' %}الأخير{% else %}Last{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="page-item disabled rounded-md overflow-hidden">
|
<li class="page-item disabled rounded-md overflow-hidden">
|
||||||
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
<span class="page-link px-3 py-2 border border-gray-200 bg-gray-50 text-gray-400 cursor-not-allowed">
|
||||||
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
<span class="fas fa-angle-double-right" aria-hidden="true"></span>
|
||||||
<span class="">{% trans 'Last' %}</span>
|
{% if LANGUAGE_CODE == 'ar' %}الأخير{% else %}Last{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -106,9 +106,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<<<<<<< HEAD
|
|
||||||
<button type="submit" class="btn btn-phoenix-primary">Add New Item To Inventory</button>
|
|
||||||
=======
|
|
||||||
<div class="row g-4 mt-4">
|
<div class="row g-4 mt-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<p class="fs-5 mb-2">{% trans 'Exterior Colors' %}</p>
|
<p class="fs-5 mb-2">{% trans 'Exterior Colors' %}</p>
|
||||||
@ -143,6 +140,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary mt-5">Add New Item To Inventory</button>
|
<button type="submit" class="btn btn-primary mt-5">Add New Item To Inventory</button>
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
@ -58,13 +58,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
<h4 class="h6 mb-1">{% trans 'Contract' %}</h4>
|
<h4 class="h6 mb-1">{% trans 'Contract' %}</h4>
|
||||||
<p class="mb-0">{{ po_model.ce_model.estimate_number }}</p>
|
<p class="mb-0">{{ po_model.ce_model.estimate_number }}</p>
|
||||||
</div>
|
</div>
|
||||||
<<<<<<< HEAD
|
|
||||||
<a href="{% url 'django_ledger:customer-estimate-detail' entity_slug=view.kwargs.entity_slug ce_pk=po_model.ce_model_id %}"
|
|
||||||
class="btn btn-sm btn-phoenix-info ms-auto">
|
|
||||||
=======
|
|
||||||
<a href="{% url 'estimate_detail' po_model.ce_model_id %}"
|
<a href="{% url 'estimate_detail' po_model.ce_model_id %}"
|
||||||
class="btn btn-sm btn-outline-info ms-auto">
|
class="btn btn-sm btn-outline-info ms-auto">
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
|
||||||
{% trans 'View Contract' %}
|
{% trans 'View Contract' %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -197,35 +195,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
onclick="showPOModal('Fulfill PO', '{% url 'po-action-mark-as-fulfilled' entity_slug po_model.pk %}', 'Mark As Fulfilled')">
|
onclick="showPOModal('Fulfill PO', '{% url 'po-action-mark-as-fulfilled' entity_slug po_model.pk %}', 'Mark As Fulfilled')">
|
||||||
<i class="fas fa-truck me-2"></i>{% trans 'Mark as Fulfilled' %}
|
<i class="fas fa-truck me-2"></i>{% trans 'Mark as Fulfilled' %}
|
||||||
</button>
|
</button>
|
||||||
<<<<<<< HEAD
|
|
||||||
<button class="btn btn-phoenix-danger"
|
|
||||||
onclick="showPOModal('Cancel PO', '{% url 'po-action-mark-as-canceled' entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
|
||||||
<i class="fas fa-ban me-2"></i>{% trans 'Cancel' %}
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Danger Action Buttons #}
|
|
||||||
{% if po_model.can_delete %}
|
|
||||||
<a class="btn btn-phoenix-danger" href="{% url 'po-delete' entity_slug po_model.pk %}">
|
|
||||||
<i class="fas fa-ban me-2"></i>{% trans 'Delete' %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if po_model.can_void %}
|
|
||||||
<button class="btn btn-phoenix-danger"
|
|
||||||
onclick="djLedger.toggleModal('{{ po_model.get_mark_as_void_html_id }}')">
|
|
||||||
<i class="fas fa-times-circle me-2"></i>{% trans 'Void' %}
|
|
||||||
</button>
|
|
||||||
{% modal_action_v2 bill po_model.get_mark_as_void_url po_model.get_mark_as_void_message po_model.get_mark_as_void_html_id %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if po_model.can_cancel %}
|
|
||||||
<button class="btn btn-phoenix-secondary"
|
|
||||||
onclick="djLedger.toggleModal('{{ po_model.get_mark_as_canceled_html_id }}')">
|
|
||||||
<i class="fas fa-window-close me-2"></i>{% trans 'Cancel' %}
|
|
||||||
</button>
|
|
||||||
{% modal_action_v2 bill po_model.get_mark_as_canceled_url po_model.get_mark_as_canceled_message po_model.get_mark_as_canceled_html_id %}
|
|
||||||
=======
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Danger Action Buttons #}
|
{# Danger Action Buttons #}
|
||||||
@ -248,7 +218,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
onclick="showPOModal('Cancel PO', '{% url 'po-action-mark-as-canceled' entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
onclick="showPOModal('Cancel PO', '{% url 'po-action-mark-as-canceled' entity_slug po_model.pk %}', 'Mark As Cancelled')">
|
||||||
<i class="fas fa-ban me-2"></i>{% trans 'Cancel' %}
|
<i class="fas fa-ban me-2"></i>{% trans 'Cancel' %}
|
||||||
</button>
|
</button>
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -41,22 +41,34 @@
|
|||||||
<tbody class="list">
|
<tbody class="list">
|
||||||
{% if purchase_orders %}
|
{% if purchase_orders %}
|
||||||
{% for po in purchase_orders %}
|
{% for po in purchase_orders %}
|
||||||
|
|
||||||
<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">{{ po.po_number }}</td>
|
<td class="align-middle product white-space-nowrap">{{ po.po_number }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ po.po_title }}</td>
|
<td class="align-middle product white-space-nowrap">{{ po.po_title }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle product white-space-nowrap">
|
||||||
<span class="">
|
<span class="">
|
||||||
|
{% if po.po_status == 'draft' %}
|
||||||
|
<span class="text-warning me-2" data-feather="file"></span>
|
||||||
|
{% elif po.po_status == 'in_review' %}
|
||||||
|
<span class="text-info me-2" data-feather="search"></span>
|
||||||
|
{% elif po.po_status == 'paid' %}
|
||||||
|
<span class="text-success me-2" data-feather="dollar-sign"></span>
|
||||||
|
{% elif po.po_status == 'canceled' %}
|
||||||
|
<span class="text-danger me-2" data-feather="x-circle"></span>
|
||||||
|
{% elif po.po_status == 'fulfilled' %}
|
||||||
|
<span class="text-success me-2" data-feather="check-circle"></span>
|
||||||
|
{% elif po.po_status == 'approved' %}
|
||||||
|
<span class="text-success me-2" data-feather="thumbs-up"></span>
|
||||||
|
{% endif %}
|
||||||
{{ po.po_status|capfirst }}
|
{{ po.po_status|capfirst }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle product white-space-nowrap">{{ po.created|date:"M d, Y" }}</td>
|
<td class="align-middle product white-space-nowrap">{{ po.created|date:"M d, Y" }}</td>
|
||||||
<td class="align-middle product white-space-nowrap">
|
<td class="align-middle white-space-nowrap">
|
||||||
<div class="btn-reveal-trigger position-static">
|
<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>
|
<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">
|
<div class="dropdown-menu dropdown-menu-end py-2">
|
||||||
<a href="{% url 'purchase_order_detail' po.pk %}" class="dropdown-item text-success-dark">{% trans 'View' %}</a>
|
<a href="{% url 'purchase_order_detail' po.pk %}" class="dropdown-item text-success-dark">{% trans 'Detail' %}</a>
|
||||||
<a href="{% url 'upload_cars' po.pk %}" class="dropdown-item text-success-dark">{% trans 'Upload Data' %}</a>
|
<a href="{% url 'view_items_inventory' entity_slug=entity_slug po_pk=po.pk %}" class="dropdown-item text-success-dark">{% trans 'View Inventory Items' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
36
templates/purchase_orders/po_upload_cars.html
Normal file
36
templates/purchase_orders/po_upload_cars.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>{{po.po_number}}</h1>
|
||||||
|
<h4>{{po.po_status|capfirst}}</h4>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-hover align-middle">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Name</th>
|
||||||
|
<th scope="col">Quatnity</th>
|
||||||
|
<th scope="col">Unit Cost</th>
|
||||||
|
<th scope="col">Is Data Uploaded ?</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for item in items %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{{ item.item_model }}</th>
|
||||||
|
<th scope="row">{{ item.po_quantity }}</th>
|
||||||
|
<th scope="row">{{ item.po_unit_cost }}</th>
|
||||||
|
<th scope="row">
|
||||||
|
{% if item.item_model.additional_info.uploaded %}
|
||||||
|
<i data-feather="check-circle" class="text-success"></i>
|
||||||
|
{% else %}
|
||||||
|
<a href="{% url 'upload_cars' item.pk %}" class="btn btn-sm btn-phoenix-primary">
|
||||||
|
<i data-feather="upload" class="me-2"></i>Upload Data
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
@ -10,10 +10,7 @@
|
|||||||
border-radius: 50rem;
|
border-radius: 50rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
|
||||||
background-color: #f8f9fa;
|
|
||||||
border-bottom: 1px solid rgba(0,0,0,.125);
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeline {
|
.timeline {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -79,24 +76,20 @@
|
|||||||
<header class="bg-primary py-3">
|
<header class="bg-primary py-3">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="d-flex justify-content-between align-items-center">
|
<div class="d-flex justify-content-between align-items-center">
|
||||||
<h1 class="h4 mb-0">
|
<h1 class="h4 mb-0 text-light">
|
||||||
<i class="fas fa-file-invoice me-2"></i>
|
<i class="fas fa-file-invoice me-2"></i>
|
||||||
{{ _("Sale Order")}} #{{ saleorder.formatted_order_id }}
|
{{ _("Sale Order")}} #{{ saleorder.formatted_order_id }}
|
||||||
</h1>
|
</h1>
|
||||||
<div>
|
<div>
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button class="btn btn-sm btn-phoenix-light me-2">
|
|
||||||
<i class="fas fa-print me-1"></i> Print
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-sm btn-phoenix-light">
|
|
||||||
<i class="fas fa-share-alt me-1"></i> Share
|
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
<button class="btn btn-sm btn-outline-light me-2">
|
<button class="btn btn-sm btn-outline-light me-2">
|
||||||
<i class="fas fa-print me-1"></i> {{ _("Print") }}
|
<i class="fas fa-print me-1"></i> {{ _("Print") }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-sm btn-outline-light">
|
<button class="btn btn-sm btn-outline-light">
|
||||||
<i class="fas fa-share-alt me-1"></i> {{ _("Share") }}
|
<i class="fas fa-share-alt me-1"></i> {{ _("Share") }}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -110,7 +103,7 @@
|
|||||||
<div class="col-lg-8 mb-4">
|
<div class="col-lg-8 mb-4">
|
||||||
<!-- Order Summary Card -->
|
<!-- Order Summary Card -->
|
||||||
<div class="card mb-4 shadow-sm">
|
<div class="card mb-4 shadow-sm">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center bg-light">
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
<h5 class="mb-0 text-primary">{{ _("Order Summary")}}</h5>
|
<h5 class="mb-0 text-primary">{{ _("Order Summary")}}</h5>
|
||||||
<span class="status-badge
|
<span class="status-badge
|
||||||
{% if saleorder.status == 'approved' %}bg-success text-white
|
{% if saleorder.status == 'approved' %}bg-success text-white
|
||||||
@ -283,14 +276,16 @@
|
|||||||
<div class="card mb-4 shadow-sm">
|
<div class="card mb-4 shadow-sm">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<h5 class="mb-0">Documents</h5>
|
|
||||||
<button class="btn btn-sm btn-phoenix-primary">
|
|
||||||
<i class="fas fa-plus me-1"></i> Add Document
|
|
||||||
=======
|
|
||||||
<h5 class="mb-0">{{ _("Documents") }}</h5>
|
<h5 class="mb-0">{{ _("Documents") }}</h5>
|
||||||
<button class="btn btn-sm btn-primary">
|
<button class="btn btn-sm btn-primary">
|
||||||
<i class="fas fa-plus me-1"></i> {{ _("Add Document")}}
|
<i class="fas fa-plus me-1"></i> {{ _("Add Document")}}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<h5 class="mb-0">{{ _("Documents") }}</h5>
|
||||||
|
<button class="btn btn-sm btn-primary">
|
||||||
|
<i class="fas fa-plus me-1"></i> {{ _("Add Document")}}
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@ -336,10 +331,12 @@
|
|||||||
<textarea class="form-control" name="comment" rows="3" placeholder="Add a comment or note..." required></textarea>
|
<textarea class="form-control" name="comment" rows="3" placeholder="Add a comment or note..." required></textarea>
|
||||||
<div class="d-flex justify-content-end mt-2">
|
<div class="d-flex justify-content-end mt-2">
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button type="submit" class="btn btn-phoenix-primary btn-sm">Post Comment</button>
|
|
||||||
=======
|
|
||||||
<button type="submit" class="btn btn-primary btn-sm">{{ _("Post Comment")}}</button>
|
<button type="submit" class="btn btn-primary btn-sm">{{ _("Post Comment")}}</button>
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-primary btn-sm">{{ _("Post Comment")}}</button>
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -376,52 +373,57 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-grid gap-2">
|
<div class="d-grid gap-2">
|
||||||
{% if saleorder.status == 'pending_approval' %}
|
{% if saleorder.status == 'pending_approval' %}
|
||||||
<button class="btn btn-phoenix-success" onclick="updateStatus('approved')">
|
<button class="btn btn-success" onclick="updateStatus('approved')">
|
||||||
<i class="fas fa-check-circle me-2"></i> Approve Order
|
<i class="fas fa-check-circle me-2"></i> Approve Order
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% comment %} <a href="{% url 'edit_sale_order' saleorder.pk %}" class="btn btn-primary"> {% endcomment %}
|
{% comment %} <a href="{% url 'edit_sale_order' saleorder.pk %}" class="btn btn-primary"> {% endcomment %}
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<a href="" class="btn btn-phoenix-primary">
|
|
||||||
<i class="fas fa-edit me-2"></i> Edit Order
|
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
<a href="" class="btn btn-primary">
|
<a href="" class="btn btn-primary">
|
||||||
<i class="fas fa-edit me-2"></i> {{ _("Edit Order")}}
|
<i class="fas fa-edit me-2"></i> {{ _("Edit Order")}}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if not saleorder.invoice %}
|
{% if not saleorder.invoice %}
|
||||||
{% comment %} <a href="{% url 'create_invoice_from_order' saleorder.pk %}" class="btn btn-info"> {% endcomment %}
|
{% comment %} <a href="{% url 'create_invoice_from_order' saleorder.pk %}" class="btn btn-info"> {% endcomment %}
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<a href="" class="btn btn-phoenix-info">
|
|
||||||
<i class="fas fa-file-invoice-dollar me-2"></i> Create Invoice
|
|
||||||
=======
|
|
||||||
<a href="" class="btn btn-info">
|
<a href="" class="btn btn-info">
|
||||||
<i class="fas fa-file-invoice-dollar me-2"></i> {{ _("Create Invoice")}}
|
<i class="fas fa-file-invoice-dollar me-2"></i> {{ _("Create Invoice")}}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<a href="" class="btn btn-info">
|
||||||
|
<i class="fas fa-file-invoice-dollar me-2"></i> {{ _("Create Invoice")}}
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if saleorder.status == 'approved' and not saleorder.actual_delivery_date %}
|
{% if saleorder.status == 'approved' and not saleorder.actual_delivery_date %}
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button class="btn btn-phoenix-warning" data-bs-toggle="modal" data-bs-target="#deliveryModal">
|
|
||||||
<i class="fas fa-truck me-2"></i> Schedule Delivery
|
|
||||||
=======
|
|
||||||
<button class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#deliveryModal">
|
<button class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#deliveryModal">
|
||||||
<i class="fas fa-truck me-2"></i> {{ _("Schedule Delivery")}}
|
<i class="fas fa-truck me-2"></i> {{ _("Schedule Delivery")}}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<button class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#deliveryModal">
|
||||||
|
<i class="fas fa-truck me-2"></i> {{ _("Schedule Delivery")}}
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if saleorder.status != 'cancelled' %}
|
{% if saleorder.status != 'cancelled' %}
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button class="btn btn-phoenix-danger" data-bs-toggle="modal" data-bs-target="#cancelModal">
|
|
||||||
<i class="fas fa-times-circle me-2"></i> Cancel Order
|
|
||||||
=======
|
|
||||||
<button class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#cancelModal">
|
<button class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#cancelModal">
|
||||||
<i class="fas fa-times-circle me-2"></i> {{ _("Cancel Order")}}
|
<i class="fas fa-times-circle me-2"></i> {{ _("Cancel Order")}}
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<button class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#cancelModal">
|
||||||
|
<i class="fas fa-times-circle me-2"></i> {{ _("Cancel Order")}}
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -574,12 +576,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button type="button" class="btn btn-phoenix-secondary" data-bs-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-phoenix-danger">Confirm Cancellation</button>
|
|
||||||
=======
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
||||||
<button type="submit" class="btn btn-danger">{{ _("Confirm Cancellation")}}</button>
|
<button type="submit" class="btn btn-danger">{{ _("Confirm Cancellation")}}</button>
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
||||||
|
<button type="submit" class="btn btn-danger">{{ _("Confirm Cancellation")}}</button>
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -609,12 +613,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<button type="button" class="btn btn-phoenix-secondary" data-bs-dismiss="modal">Close</button>
|
|
||||||
<button type="submit" class="btn btn-phoenix-primary">Schedule Delivery</button>
|
|
||||||
=======
|
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
||||||
<button type="submit" class="btn btn-primary">{{ _("Schedule Delivery")}}</button>
|
<button type="submit" class="btn btn-primary">{{ _("Schedule Delivery")}}</button>
|
||||||
>>>>>>> 90fea4d25623ba4dd0f6fd2390e23b40857b6dff
|
=======
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _("Close") }}</button>
|
||||||
|
<button type="submit" class="btn btn-primary">{{ _("Schedule Delivery")}}</button>
|
||||||
|
|
||||||
|
>>>>>>> e9e2fd3 (add bulk insert + po item insert)
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user