From 65a01ff98cf28faf114c899f431b1e21fa4b0223 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Thu, 21 Jan 2021 20:33:36 +1100
Subject: [PATCH] Rearranged stock item detail page

---
 lib/widget/stock_detail.dart | 54 ++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart
index 9e70a3c0..d08b89cc 100644
--- a/lib/widget/stock_detail.dart
+++ b/lib/widget/stock_detail.dart
@@ -366,6 +366,33 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
       )
     );
 
+    // Location information
+    if ((item.locationId > 0) && (item.locationName != null) && (item.locationName.isNotEmpty)) {
+      tiles.add(
+          ListTile(
+            title: Text("Stock Location"),
+            subtitle: Text("${item.locationPathString}"),
+            leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
+            onTap: () {
+              if (item.locationId > 0) {
+                InvenTreeStockLocation().get(context, item.locationId).then((var loc) {
+                  Navigator.push(context, MaterialPageRoute(
+                      builder: (context) => LocationDisplayWidget(loc)));
+                });
+              }
+            },
+          )
+      );
+    } else {
+      tiles.add(
+          ListTile(
+            title: Text("Stock Location"),
+            leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
+            subtitle: Text("No location set"),
+          )
+      );
+    }
+
     // Quantity information
     if (item.isSerialized()) {
       tiles.add(
@@ -399,33 +426,6 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
       )
     );
 
-    // Location information
-    if ((item.locationId > 0) && (item.locationName != null) && (item.locationName.isNotEmpty)) {
-      tiles.add(
-        ListTile(
-          title: Text("Stock Location"),
-          subtitle: Text("${item.locationPathString}"),
-          leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
-          onTap: () {
-            if (item.locationId > 0) {
-              InvenTreeStockLocation().get(context, item.locationId).then((var loc) {
-                Navigator.push(context, MaterialPageRoute(
-                  builder: (context) => LocationDisplayWidget(loc)));
-              });
-            }
-          },
-        )
-      );
-    } else {
-      tiles.add(
-        ListTile(
-          title: Text("Stock Location"),
-          leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
-          subtitle: Text("No location set"),
-        )
-      );
-    }
-
     // Supplier part?
     if (item.supplierPartId > 0) {
       tiles.add(