瀏覽代碼

Prevent submiting of transaction data for non-pos merchants if there is an invalid number

Lee Morgan 6 年之前
父節點
當前提交
ce2e8e064d
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      views/inventoryPage/enterTransactions.js

+ 2 - 3
views/inventoryPage/enterTransactions.js

@@ -49,14 +49,13 @@ window.enterTransactionsObj = {
                     id: row._id,
                     quantity: quantity
                 }
-                console.log(recipe.id);
                 recipes.push(recipe);
             }else if(quantity < 0){
                 banner.createError("Cannot have negative quantities");
-                break;
+                return;
             }
         }
-        console.log(recipes);
+
         axios.post("/transactions/create", recipes)
             .then((response)=>{
                 if(typeof(response.data) === "string"){