Explorar o código

Revenue numbers now rounding in data

Lee Morgan %!s(int64=6) %!d(string=hai) anos
pai
achega
eacfaab74a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      views/dataPage/home.js

+ 1 - 1
views/dataPage/home.js

@@ -112,7 +112,7 @@ window.homeObj = {
             row.appendChild(quantity);
 
             let revenue = document.createElement("td");
-            revenue.innerText = `$${recipe.quantity * recipe.price}`;
+            revenue.innerText = `$${(recipe.quantity * recipe.price).toFixed(2)}`;
             row.appendChild(revenue);
         }