diff --git a/staticfiles/img/undraw_posting_photo.svg b/staticfiles/img/undraw_posting_photo.svg
deleted file mode 100644
index fc0d549..0000000
--- a/staticfiles/img/undraw_posting_photo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/staticfiles/img/undraw_profile.svg b/staticfiles/img/undraw_profile.svg
deleted file mode 100644
index 9802341..0000000
--- a/staticfiles/img/undraw_profile.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
diff --git a/staticfiles/img/undraw_profile_1.svg b/staticfiles/img/undraw_profile_1.svg
deleted file mode 100644
index fcc91c7..0000000
--- a/staticfiles/img/undraw_profile_1.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
diff --git a/staticfiles/img/undraw_profile_2.svg b/staticfiles/img/undraw_profile_2.svg
deleted file mode 100644
index 488d1bd..0000000
--- a/staticfiles/img/undraw_profile_2.svg
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
diff --git a/staticfiles/img/undraw_profile_3.svg b/staticfiles/img/undraw_profile_3.svg
deleted file mode 100644
index eecb335..0000000
--- a/staticfiles/img/undraw_profile_3.svg
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
diff --git a/staticfiles/img/undraw_rocket.svg b/staticfiles/img/undraw_rocket.svg
deleted file mode 100644
index 4542614..0000000
--- a/staticfiles/img/undraw_rocket.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
diff --git a/templates/nav.html b/templates/nav.html
index eb9468e..2917fe7 100644
--- a/templates/nav.html
+++ b/templates/nav.html
@@ -59,7 +59,7 @@ Manage
-
+
Supply
diff --git a/templates/transaction/supply.html b/templates/transaction/supply.html
new file mode 100644
index 0000000..e6518f9
--- /dev/null
+++ b/templates/transaction/supply.html
@@ -0,0 +1,128 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+
+
+
+
+ {% include "nav.html" %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ warehouse_name }}
+
Order Listing
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | ID |
+ Supplier |
+ Item |
+ Quantity |
+ Arrive Date |
+
+
+
+
+ | ID |
+ Supplier |
+ Item |
+ Quantity |
+ Arrive Date |
+
+
+
+ {% if filter.is_bound %}
+ {% for supply in filter.qs %}
+
+ {% comment %} | {{ inventory.stock_identifier }} | {% endcomment %}
+ {{ supply.id }} |
+ {{ supply.supplier }} |
+ {{ supply.item }} |
+ {{ supply.quantity }} |
+ {{ supply.arrive_date }} |
+
+ {% endfor %}
+ {% else %}
+ {% for supply in supply_list %}
+
+ {% comment %} | {{ inventory.stock_identifier }} | {% endcomment %}
+ {{ supply.id }} |
+ {{ supply.supplier }} |
+ {{ supply.item }} |
+ {{ supply.quantity }} |
+ {{ supply.arrive_date }} |
+
+ {% endfor %}
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% include "footer.html" %}
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/transaction/filters.py b/transaction/filters.py
index 74b2117..4d6d9ea 100644
--- a/transaction/filters.py
+++ b/transaction/filters.py
@@ -1,6 +1,6 @@
from django import forms
import django_filters
-from transaction.models import Order, Transfer
+from transaction.models import Order, Transfer, Supply
class OrderFilter(django_filters.FilterSet):
customer_name = django_filters.CharFilter(field_name='customer__name', lookup_expr='icontains', label='Customer Name')
@@ -19,4 +19,13 @@ class TransferFilter(django_filters.FilterSet):
class Meta:
model = Transfer
- fields = ['from_warehouse', 'to_warehouse', 'item_name']
\ No newline at end of file
+ fields = ['from_warehouse', 'to_warehouse', 'item_name']
+
+
+class SupplyFilter(django_filters.FilterSet):
+ supplier_name = django_filters.CharFilter(field_name='supplier__name', lookup_expr='icontains', label='Supplier Name')
+ item_name = django_filters.CharFilter(field_name='item__name', lookup_expr='icontains', label='Item Name')
+
+ class Meta:
+ model = Supply
+ fields = ['supplier_name', 'item_name']
\ No newline at end of file
diff --git a/transaction/urls.py b/transaction/urls.py
index f44029b..f3538a2 100644
--- a/transaction/urls.py
+++ b/transaction/urls.py
@@ -1,8 +1,9 @@
from django.urls import path
-from transaction.views import CustomerOrderView, TransferListView
+from transaction.views import CustomerOrderView, TransferListView, SupplyListView
urlpatterns = [
path('order/', CustomerOrderView.as_view(), name='customer-order'),
path('transfers/', TransferListView.as_view(), name='transfer-list'),
+ path('supply/', SupplyListView.as_view(), name='supply-list'),
]
diff --git a/transaction/views.py b/transaction/views.py
index 927ee5f..748f546 100644
--- a/transaction/views.py
+++ b/transaction/views.py
@@ -1,7 +1,7 @@
from django_filters.views import FilterView
from django.contrib.auth.mixins import LoginRequiredMixin
-from transaction.models import Order, Transfer
-from transaction.filters import OrderFilter, TransferFilter
+from transaction.models import Order, Transfer, Supply
+from transaction.filters import OrderFilter, TransferFilter, SupplyFilter
class CustomerOrderView(FilterView, LoginRequiredMixin):
template_name = 'transaction/order.html'
@@ -28,4 +28,17 @@ class TransferListView(FilterView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['transfer_list'] = Transfer.objects.all()
- return context
\ No newline at end of file
+ return context
+
+
+class SupplyListView(FilterView):
+ template_name = 'transaction/supply.html'
+ model = Supply
+ filterset_class = SupplyFilter
+ context_object_name = 'supply_list'
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context['supply_list'] = Supply.objects.all()
+ return context
+
\ No newline at end of file