diff --git a/Views/Order/Join.cshtml b/Views/Order/Join.cshtml index 6888335..6cda1fa 100644 --- a/Views/Order/Join.cshtml +++ b/Views/Order/Join.cshtml @@ -51,7 +51,7 @@
- +
@@ -159,11 +159,12 @@ function updatePrice() { const select = document.getElementById('menuItemId'); const quantity = document.getElementById('quantity').value; const selectedOption = select.options[select.selectedIndex]; - const price = parseFloat(selectedOption.dataset.price) || 0; + const price = parseFloat(selectedOption.dataset.price.replace(",", ".")) || 0; const total = (price * quantity).toFixed(2); document.getElementById('totalPrice').textContent = total; } document.getElementById('quantity').addEventListener('change', updatePrice); +document.getElementById('quantity').addEventListener('input', updatePrice); document.getElementById('menuItemId').addEventListener('change', updatePrice); \ No newline at end of file