Spaces:
Running
Running
en el panel de resultadosdonde dice total por unidad, debe decir total por X unidades, donde X es el valor de cantidad de unidades - Follow Up Deployment
Browse files- index.html +2 -1
index.html
CHANGED
@@ -123,7 +123,7 @@
|
|
123 |
</div>
|
124 |
<div class="border-t border-gray-200 my-2"></div>
|
125 |
<div class="flex justify-between">
|
126 |
-
<span class="text-gray-800 font-semibold">Total por unidad:</span>
|
127 |
<span id="totalCostSingle" class="text-indigo-600 font-bold">$0.00</span>
|
128 |
</div>
|
129 |
<div class="flex justify-between">
|
@@ -240,6 +240,7 @@
|
|
240 |
const totalCostPerUnit = fabricCostPerUnit + sublimationCostPerUnit;
|
241 |
|
242 |
const quantity = parseInt(document.getElementById('quantity').value) || 1;
|
|
|
243 |
const fabricCostForQuantity = fabricCostPerUnit * quantity;
|
244 |
const sublimationCostForQuantity = sublimationCostPerUnit * quantity;
|
245 |
const totalCostForQuantity = totalCostPerUnit * quantity;
|
|
|
123 |
</div>
|
124 |
<div class="border-t border-gray-200 my-2"></div>
|
125 |
<div class="flex justify-between">
|
126 |
+
<span class="text-gray-800 font-semibold">Total por <span id="quantityDisplay">1</span> unidad(es):</span>
|
127 |
<span id="totalCostSingle" class="text-indigo-600 font-bold">$0.00</span>
|
128 |
</div>
|
129 |
<div class="flex justify-between">
|
|
|
240 |
const totalCostPerUnit = fabricCostPerUnit + sublimationCostPerUnit;
|
241 |
|
242 |
const quantity = parseInt(document.getElementById('quantity').value) || 1;
|
243 |
+
document.getElementById('quantityDisplay').textContent = quantity;
|
244 |
const fabricCostForQuantity = fabricCostPerUnit * quantity;
|
245 |
const sublimationCostForQuantity = sublimationCostPerUnit * quantity;
|
246 |
const totalCostForQuantity = totalCostPerUnit * quantity;
|