diff --git a/HardwareShop/HardwareShopWorkerApp/Views/Home/CreatePurchase.cshtml b/HardwareShop/HardwareShopWorkerApp/Views/Home/CreatePurchase.cshtml
index 10270c2..09a6680 100644
--- a/HardwareShop/HardwareShopWorkerApp/Views/Home/CreatePurchase.cshtml
+++ b/HardwareShop/HardwareShopWorkerApp/Views/Home/CreatePurchase.cshtml
@@ -21,8 +21,9 @@
Товар |
- Количество |
Цена |
+ Количество |
+ Сумма |
Действие |
@@ -70,6 +71,7 @@
console.log('try to add good')
var count = $('#count').val();
var good = $('#good').val();
+ if (count > 0 && good > 0){
$.ajax({
method: "GET",
url: `/Home/GetGood`,
@@ -89,6 +91,7 @@
countElem.value = '1'
}
});
+ }
})
saveBtn.addEventListener("click", () => {
@@ -126,7 +129,8 @@
let price = 0;
let count = 0;
list.forEach((elem) => {
- resultTable.innerHTML += `
${elem.good.goodName} | ${elem.count} | ${Math.round(elem.good.price * elem.count * 100) / 100} | \
+ console.log(elem);
+ resultTable.innerHTML += ` |
${elem.good.goodName} | ${elem.good.price} | ${elem.count} | ${Math.round(elem.good.price * elem.count * 100) / 100} | \
\
|