From 5c1b4a5ab112e2274d49f56824877232d4776936 Mon Sep 17 00:00:00 2001
From: Oliver <oliver.henry.walters@gmail.com>
Date: Fri, 30 Sep 2022 16:00:03 +1000
Subject: [PATCH] Bug fix for stock adjustment actions (#3735) (#3736)

* Check for empty strings as well as null values

* JS linting

(cherry picked from commit 1f2859d8c92869e4f2836048ff72cecdde95f45e)
---
 InvenTree/templates/js/translated/stock.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js
index cb065f68b7..8cb03c6e67 100644
--- a/InvenTree/templates/js/translated/stock.js
+++ b/InvenTree/templates/js/translated/stock.js
@@ -967,7 +967,7 @@ function adjustStock(action, items, options={}) {
 
         var item = items[idx];
 
-        if ((item.serial != null) && !allowSerializedStock) {
+        if ((item.serial != null) && (item.serial != '') && !allowSerializedStock) {
             continue;
         }