Skip to content

Commit

Permalink
updated requisition page
Browse files Browse the repository at this point in the history
  • Loading branch information
nyashaChiza committed Aug 28, 2024
1 parent 94d177a commit 24d655f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 33 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ jobs:
DEFAULT_FROM_EMAIL: "am"
EMAIL_HOST_PASSWORD: "@l"
EMAIL_USE_TLS: True
DEFAULT_RECIPIENT: "n"
DEFAULT_RECIPIENT: "n"
FERNET_KEY: "kkgkugk"
2 changes: 1 addition & 1 deletion env-example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DJANGO_SECRET_KEY="django-insecure-c0y7^zo53cwo$0!4(7ife!=%$46wk=6*)g$rgivz41uncm%z@)"
DEBUG=True

FERNET_KEY = ""
MONGO_DB_PSW_SECRET_KEY=""

USE_MYSQL = False
Expand Down
2 changes: 1 addition & 1 deletion requisition/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class RequisitionDetailView(DetailView):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["remaining_stock"] = DashboardData(self.request.user).get_stock_data().get('current_available_Stock_quantity')
context["remaining_stock"] = DashboardData(self.request.user).site.stock.first().quantity
return context

class RequisitionCreateView(View):
Expand Down
2 changes: 1 addition & 1 deletion stock/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class RecieptDetailView(DetailView):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["remaining_stock"] = DashboardData(self.request.user).get_stock_data().get('current_available_Stock_quantity')
context["remaining_stock"] = DashboardData(self.request.user).site.stock.first().quantity
return context

class RecieptDeleteView(View):
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h6 class="title">Total Sales Today</h6>
<div class="card-inner pb-0">
<div class="card-title-group">
<div class="card-title">
<h6 class="title">Available Stock Stock</h6>
<h6 class="title">Available Stock</h6>
</div>
</div>
<div class="data">
Expand Down
34 changes: 6 additions & 28 deletions templates/reciept/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@
<div class="card h-100">
<div class="card-inner">
<div class="card-head">
<h5 class="card-title">Sale: {{ sale.order_number.upper }}</h5>
<h5 class="card-title">Reciept: {{ reciept }}</h5>
</div>
<ul class="nk-store-statistics">
<li class="item">
<div class="info">
<div class="title">Site</div>
<div class="count">{{ sale.site }}</div>
<div class="count">{{ reciept.site }}</div>
</div>
<em class="icon ni ni-map-pin"></em>
</li>
<li class="item">
<div class="info">
<div class="title">Product</div>
<div class="count">${{ sale.product }}</div>
<div class="count">{{ reciept.stock }}</div>
</div>
<em class="icon bg-primary-dim ni ni-bag"></em>
</li>
<li class="item">
<div class="info">
<div class="title">Quantity</div>
<div class="count">{{ reci.quantity }}kg</div>
<div class="count">{{ reciept.quantity }}kg</div>
</div>
<em class="icon bg-purple-dim ni ni-unarchive"></em>
</li>
Expand All @@ -41,7 +41,7 @@ <h5 class="card-title">Sale: {{ sale.order_number.upper }}</h5>
<li class="item">
<div class="info">
<div class="title">Created On</div>
<div class="count">{{ sale.created }}</div>
<div class="count">{{ reciept.created }}</div>
</div>
<em class="icon bg-purple-dim ni ni-clock"></em>
</li>
Expand Down Expand Up @@ -74,29 +74,7 @@ <h6 class="title">Remaining Stock</h6>
</div><!-- .card -->
</div>
</div>
<div class="row g-gs my-1">
<div class="col-xxl-12 ">
<div class="card">
<div class="nk-ecwg nk-ecwg3">
<div class="card-inner pb-0">
<div class="card-title-group">
<div class="card-title">
<h6 class="title">Total Sale Cost</h6>
</div>
</div>
<div class="data">
<div class="data-group">
<div class="amount">${{ sale.total_cost|format_amount }} </div>
</div>
</div>
</div><!-- .card-inner -->
<div class="nk-ecwg3-ck"><div class="chartjs-size-monitor"><div class="chartjs-size-monitor-expand"><div class=""></div></div><div class="chartjs-size-monitor-shrink"><div class=""></div></div></div>
<canvas class="ecommerce-line-chart-s1 chartjs-render-monitor" id="totalOrders" width="988" height="132" style="display: block; height: 66px; width: 494px;"></canvas>
</div>
</div><!-- .nk-ecwg -->
</div><!-- .card -->
</div>
</div>

</div>
</div>
</div>
Expand Down

0 comments on commit 24d655f

Please sign in to comment.