From fefbcf2ed9513fa7f8383bcfdb6ad1483423a845 Mon Sep 17 00:00:00 2001
From: Oliver Walters
Date: Wed, 19 Jun 2019 18:49:05 +1000
Subject: [PATCH] Clean up buttons for stock location
---
.../templates/company/company_base.html | 2 +-
InvenTree/part/templates/part/part_base.html | 2 +-
InvenTree/static/css/inventree.css | 12 +++++-
InvenTree/stock/templates/stock/item.html | 9 +++--
InvenTree/stock/templates/stock/location.html | 37 ++++++++++++-------
5 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/InvenTree/company/templates/company/company_base.html b/InvenTree/company/templates/company/company_base.html
index 2c1efbb7e5..61751fe0f4 100644
--- a/InvenTree/company/templates/company/company_base.html
+++ b/InvenTree/company/templates/company/company_base.html
@@ -34,7 +34,7 @@ InvenTree | Company - {{ company.name }}
diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html
index 3377c730a5..e3f318fe10 100644
--- a/InvenTree/part/templates/part/part_base.html
+++ b/InvenTree/part/templates/part/part_base.html
@@ -65,7 +65,7 @@
{% if not part.active %}
{% endif %}
diff --git a/InvenTree/static/css/inventree.css b/InvenTree/static/css/inventree.css
index 1b9caaa891..b12540467f 100644
--- a/InvenTree/static/css/inventree.css
+++ b/InvenTree/static/css/inventree.css
@@ -23,11 +23,19 @@
}
.glyphicon-ok {
- color: #5f5;
+ color: #5C5;
}
.glyphicon-remove {
- color: #f55;
+ color: #C55;
+}
+
+.glyphicon-trash {
+ color: #C55;
+}
+
+.glyphicon-plus {
+ color: #5C5;
}
/* CSS overrides for treeview */
diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html
index 02287d8669..35b4fcd9f1 100644
--- a/InvenTree/stock/templates/stock/item.html
+++ b/InvenTree/stock/templates/stock/item.html
@@ -16,6 +16,9 @@
+
@@ -27,7 +30,7 @@
@@ -124,7 +127,7 @@
{% if item.has_tracking_info %}
-
+
Stock Tracking Information
@@ -181,7 +184,7 @@
itemAdjust("move");
});
- $("#stock-stocktake").click(function() {
+ $("#stock-count").click(function() {
itemAdjust('count');
});
diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html
index 987d433104..b7275395c7 100644
--- a/InvenTree/stock/templates/stock/location.html
+++ b/InvenTree/stock/templates/stock/location.html
@@ -9,7 +9,19 @@
{{ location.description }}
+
{% include "qr_button.html" %}
+
+
+
{% else %}
@@ -18,19 +30,6 @@
{% endif %}
-
-
-
- {% if location %}
-
-
-
-
- {% endif %}
@@ -91,6 +90,18 @@
return false;
});
+ {% if location %}
+ $("#location-count").click(function() {
+ launchModalForm("/stock/adjust/", {
+ data: {
+ action: "count",
+ location: {{ location.id }},
+ reload: true,
+ }
+ });
+ });
+ {% endif %}
+
$('#show-qr-code').click(function() {
launchModalForm("{% url 'stock-location-qr' location.id %}",
{