Selaa lähdekoodia

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

Lee Morgan 6 vuotta sitten
vanhempi
sitoutus
ce2e8e064d
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  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"){