Просмотр исходного кода

Change non-pos merchants to store price data in cents, like clover

Lee Morgan 6 лет назад
Родитель
Сommit
209237d27f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      views/merchantSetupPage/createRecipes.js

+ 1 - 1
views/merchantSetupPage/createRecipes.js

@@ -103,7 +103,7 @@ let createRecipesObj = {
         let tbody = document.querySelector("#createRecipesStrand tbody");
         let tbody = document.querySelector("#createRecipesStrand tbody");
         controller.data.recipes[this.recipeIndex].ingredients = [];
         controller.data.recipes[this.recipeIndex].ingredients = [];
         if(!recipes){
         if(!recipes){
-            controller.data.recipes[this.recipeIndex].price = document.querySelector("#price").value;
+            controller.data.recipes[this.recipeIndex].price = Math.floor(document.querySelector("#price").value * 100);
         }
         }
         let isValid = true;
         let isValid = true;