Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
nyashaChiza committed Aug 6, 2024
1 parent 02528b5 commit fdab406
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions requisition/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@admin.register(Requisition)
class RequisitionAdmin(admin.ModelAdmin):
list_display = ('requisition_type', 'status', 'created')
list_filter = ('requisition_type', 'status', 'created')
search_fields = ('requisition_type', 'status', 'created')
list_display = ('site','requisition_type', 'status', 'created')
list_filter = ('site','requisition_type', 'status', 'created')
search_fields = ('site','requisition_type', 'status', 'created')

14 changes: 7 additions & 7 deletions stock/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

@admin.register(Gas)
class GasAdmin(admin.ModelAdmin):
list_display = ('name', 'quantity', 'price', 'supplier', 'created', 'updated')
list_filter = ('supplier', 'created', 'updated')
search_fields = ('name', 'supplier')
list_display = ('site','name', 'quantity', 'price', 'supplier', 'created', 'updated')
list_filter = ('site','supplier', 'created', 'updated')
search_fields = ('site','name', 'supplier')
date_hierarchy = 'created'
ordering = ('-created',)
fields = ('name', 'quantity', 'price', 'supplier')
fields = ('site','name', 'quantity', 'price', 'supplier')
readonly_fields = ('created', 'updated')


@admin.register(Reciept)
class RecieptAdmin(admin.ModelAdmin):
list_display = ('quantity', 'stock', 'created')
list_filter = ('quantity', 'created')
search_fields = ('quantity', 'created')
list_display = ('site','quantity', 'stock', 'created')
list_filter = ('site','quantity', 'created')
search_fields = ('site','quantity', 'created')

2 changes: 1 addition & 1 deletion templates/reciept/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="row g-gs">
<div class="col-lg-6">
<div class="card h-100">
Expand Down
2 changes: 1 addition & 1 deletion templates/reciept/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/requisition/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="row g-gs">
<div class="col-lg-6">
<div class="card h-100">
Expand Down
2 changes: 1 addition & 1 deletion templates/requisition/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/requisition/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/stock/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/transactions/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="row g-gs">
<div class="col-lg-6">
<div class="card h-100">
Expand Down
2 changes: 1 addition & 1 deletion templates/transactions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/transactions/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="container-fluid">
<div class="nk-content-inner">
<div class="nk-content-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/transactions/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% load static %}

{% block body %}
<div class="nk-content ">
<div class="nk-content my-5">
<div class="row g-gs">
<div class="col-lg-6">
<div class="card h-100">
Expand Down
6 changes: 3 additions & 3 deletions transactions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

@admin.register(Transaction)
class TransactionAdmin(admin.ModelAdmin):
list_display = ('customer', 'quantity', 'product', 'created', 'status', 'get_total_cost')
list_filter = ('product', 'created', 'updated')
search_fields = ('customer', 'product__name')
list_display = ('site','customer', 'quantity', 'product', 'created', 'status', 'get_total_cost')
list_filter = ('site','product', 'created', 'updated')
search_fields = ('site','customer', 'product__name')
readonly_fields = ('total_cost',)

def get_total_cost(self, obj):
Expand Down

0 comments on commit fdab406

Please sign in to comment.