diff --git a/admin/collection/view.js b/admin/collection/view.js index 24d6d4c2..46dfdf03 100644 --- a/admin/collection/view.js +++ b/admin/collection/view.js @@ -77,7 +77,7 @@ document.cookie = "final=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; .then((response) => { if (response.status == 200) { response.json().then((data) => { - rId.textContent = data.request.id; + rId.textContent = "S/P/"+data.request.id; sName.textContent = data.request.name + " " + data.request.last_name; sPhone.textContent = data.request.phone; address.textContent = data.request.address; diff --git a/admin/employee/view-all.js b/admin/employee/view-all.js index b65e2f55..bf570306 100644 --- a/admin/employee/view-all.js +++ b/admin/employee/view-all.js @@ -46,7 +46,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; sin: { oTitle: "සේවකයින් බලන්න", oText: "සීමාසහිත ජයසිංහ ඔයිල් මිල්ස් (PVT) හි සියලුම සේවකයින් බලන්න", - btn: "සේවකයා එකතු කරන්න", + btn: "සේවකයින් එකතු කරන්න", }, en: { oTitle: "View Employees", diff --git a/admin/index.html b/admin/index.html index c4e7a221..46078d2f 100644 --- a/admin/index.html +++ b/admin/index.html @@ -85,7 +85,7 @@
- +

diff --git a/admin/nav/nav.html b/admin/nav/nav.html index e9d3c422..7cf9d667 100644 --- a/admin/nav/nav.html +++ b/admin/nav/nav.html @@ -39,7 +39,7 @@ @@ -48,7 +48,7 @@ diff --git a/admin/nav/script.js b/admin/nav/script.js index 10946759..893519fa 100644 --- a/admin/nav/script.js +++ b/admin/nav/script.js @@ -109,9 +109,9 @@ var data = { sin: { l0: "පරිශීලක ක්‍රියා", - l1: "සේවක කළමනාකරණය", - l2: "එකතු කිරීමේ කළමනාකරණය", - l3: "අලෙවිසැල කළමනාකරණය", + l1: "සේවකයින්", + l2: "සැපයුම්", + l3: "අලෙවිසැල්", l4: "ගබඩා සමාලෝචනය", l5: "නිෂ්පාදන", l6: "ප්‍රධාන ක්‍ර්‍රියා", diff --git a/admin/script.js b/admin/script.js index ed6091a5..12307ba5 100644 --- a/admin/script.js +++ b/admin/script.js @@ -93,7 +93,7 @@ t2: "සේවකයින් එක් කරන්න / සංස්කරණය කරන්න / ඉවත් කරන්න", t3: "සැපයුම් කළමනාකරණය", t4: "සැපයුම් වාර්තා සංස්කරණය කරන්න", - t5: "අලෙවිසැල කළමනාකරණය", + t5: "අලෙවිසැල් කළමනාකරණය", t6: "අලෙවිසැල් විස්තර සංස්කරණය කරන්න", text: "උපකරණ පුවරුව", }, diff --git a/collector/collection-history/script.js b/collector/collection-history/script.js index 17f6a198..956e7799 100644 --- a/collector/collection-history/script.js +++ b/collector/collection-history/script.js @@ -14,7 +14,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; var lang = getCookie("lang"); // current language datePicker.addEventListener("input", () => { - search(datePicker.value, pastTable); + if (!checkDate(datePicker.value)) { + if (lang == "sin") { + Command: toastr["error"]("දිනය අතීතයේ විය යුතුය"); + } else { + Command: toastr["error"]("Date must be in the past"); + } + } else search(datePicker.value, pastTable); }); var searchBa = document.querySelectorAll( @@ -67,7 +73,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; var data = { sin: { - cTitle: "අතීත එකතු කිරීම්", + cTitle: "පැරණි එකතු කිරීම්", cSubTitle: "ඔබගේ සම්පුර්ණ කරන ලද පොල් එකතුව සවිස්තරාත්මකව", }, en: { @@ -129,3 +135,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; Command: toastr["error"](error); }); })(); + +function checkDate(date) { + if (date.trim().length === 0) return true; + + var selectedDate = new Date(date); + var now = new Date(); + now.setDate(now.getDate() - 1); + if (selectedDate < now) return true; + else return false; +} diff --git a/collector/index.html b/collector/index.html index 8881737e..3f58ee5c 100644 --- a/collector/index.html +++ b/collector/index.html @@ -79,7 +79,7 @@
- +

@@ -88,7 +88,7 @@
- +

diff --git a/collector/nav/nav.html b/collector/nav/nav.html index a49f8913..ba771cd4 100644 --- a/collector/nav/nav.html +++ b/collector/nav/nav.html @@ -29,7 +29,7 @@ diff --git a/collector/nav/script.js b/collector/nav/script.js index 0b3c572e..21bba079 100644 --- a/collector/nav/script.js +++ b/collector/nav/script.js @@ -95,8 +95,8 @@ var data = { sin: { l0: "පරිශීලක ක්‍රියා", - l1: "ඉදිරියට එන එකතු කිරීම්", - l2: "එකතු කිරීමේ ඉතිහාසය", + l1: "ඉදිරි එකතු කිරීම්", + l2: "පැරණි එකතු කිරීම්", l6: "ප්‍රධාන ක්‍ර්‍රියා", l7: "ගිණුම බලන්න", l8: "ගිණුමෙන් ඉවත් වන්න", diff --git a/collector/script.js b/collector/script.js index bafdc9f9..78dcff89 100644 --- a/collector/script.js +++ b/collector/script.js @@ -83,7 +83,7 @@ document.cookie = "final=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; c4: "ඉදිරියට එන එකතු කිරීම්", c5: "ඉදිරි දින 2 සඳහා ඉදිරි එකතු කිරීම් බලන්න", c6: "මඟ හැරුණු එකතු කිරීම්", - c7: "ඔබගේ මග හැරුණු පොල් එකතුව බලන්න", + c7: "ඔබගේ මග හැරුණු පොල් එකතු කිරීම් බලන්න", greet1: "සුභ පැතුම්!", greet2: "ඔබ අද දින එකතු කිරීම් සියල්ල සම්පූර්ණ කර ඇත", text: "උපකරණ පුවරුව", diff --git a/collector/upcoming-collections/script.js b/collector/upcoming-collections/script.js index 048782c9..10dd6c40 100644 --- a/collector/upcoming-collections/script.js +++ b/collector/upcoming-collections/script.js @@ -14,7 +14,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; var lang = getCookie("lang"); // current language datePicker.addEventListener("input", () => { - search(datePicker.value, upcomingTable); + if (!checkDate(datePicker.value)) { + if (lang == "sin") { + Command: toastr["error"]("දිනය අනාගතයේ විය යුතුය"); + } else { + Command: toastr["error"]("Date must be in the future"); + } + } else search(datePicker.value, upcomingTable); }); var searchBa = document.querySelectorAll( @@ -131,3 +137,13 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; Command: toastr["error"](error); }); })(); + +function checkDate(date) { + if (date.trim().length === 0) return true; + + var selectedDate = new Date(date); + var now = new Date(); + now.setDate(now.getDate() - 1); + if (selectedDate > now) return true; + else return false; +} diff --git a/common/loader.js b/common/loader.js index 0d1f7795..66992d80 100644 --- a/common/loader.js +++ b/common/loader.js @@ -23,9 +23,9 @@ window.addEventListener("load", () => { }); // load manifest and append meta tags -const meta = document.querySelector("head"); -fetch("https://jom-dev.duckdns.org/common/meta.html") - .then((res) => res.text()) - .then((data) => { - meta.innerHTML += data; - }); +// const meta = document.querySelector("head"); +// fetch("https://jom-dev.duckdns.org/common/meta.html") +// .then((res) => res.text()) +// .then((data) => { +// meta.innerHTML += data; +// }); diff --git a/distributor/index.html b/distributor/index.html index 2edc04ba..777bb425 100644 --- a/distributor/index.html +++ b/distributor/index.html @@ -113,7 +113,7 @@
- +

@@ -122,7 +122,7 @@
- +

diff --git a/distributor/nav/nav.html b/distributor/nav/nav.html index 63e99c9e..6177ea25 100644 --- a/distributor/nav/nav.html +++ b/distributor/nav/nav.html @@ -29,7 +29,7 @@ diff --git a/distributor/script.js b/distributor/script.js index 78cd23cf..679ba843 100644 --- a/distributor/script.js +++ b/distributor/script.js @@ -86,8 +86,8 @@ sin: { w1: "ලබා ගත් කළ නිෂ්පාදන", w2: "අද සංචාරයන්", - c1: "අලෙවිසැල්", - c2: "අලෙවිසැල් තොරතුරු බලන්න සහ යාවත්කාලීන කරන්න", + c1: "නිෂ්පාදන දළ විශ්ලේෂණය", + c2: "නිෂ්පාදන තොරතුරු බලන්න", text: "උපකරණ පුවරුව", }, en: { diff --git a/index.html b/index.html index 789359ad..996640fb 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,45 @@ Jayasinghe Oil Mills + + + + + + + + + + + + + + + + diff --git a/production-manager/index.html b/production-manager/index.html index abb6438f..18a07e22 100644 --- a/production-manager/index.html +++ b/production-manager/index.html @@ -82,7 +82,7 @@
- +

diff --git a/production-manager/nav/nav.html b/production-manager/nav/nav.html index 10702851..1c0137e9 100644 --- a/production-manager/nav/nav.html +++ b/production-manager/nav/nav.html @@ -35,7 +35,7 @@ diff --git a/production-manager/user-flow.css b/production-manager/user-flow.css index f7e7534a..ae69c771 100644 --- a/production-manager/user-flow.css +++ b/production-manager/user-flow.css @@ -143,7 +143,6 @@ input:focus { .request-amount { margin-top: 0; padding-bottom: 2px; - margin-bottom: 40px; } .buttons { diff --git a/sales-manager/index.html b/sales-manager/index.html index 3e45ab0b..60c7370a 100644 --- a/sales-manager/index.html +++ b/sales-manager/index.html @@ -73,7 +73,7 @@
- +

@@ -82,7 +82,7 @@
- +

diff --git a/sales-manager/nav/nav.html b/sales-manager/nav/nav.html index 3c32ed9f..e58083aa 100644 --- a/sales-manager/nav/nav.html +++ b/sales-manager/nav/nav.html @@ -32,7 +32,7 @@ @@ -47,7 +47,7 @@ diff --git a/sales-manager/productions/view-all.js b/sales-manager/productions/view-all.js index 6b17f05e..2ac84280 100644 --- a/sales-manager/productions/view-all.js +++ b/sales-manager/productions/view-all.js @@ -102,11 +102,8 @@ } else if (item.status == 3) { stat = "rejected"; st = "Terminated"; - } else if (item.status == 4) { - stat = "pending"; - st = "Ongoing"; - } else if (item.status == 5) { - stat = "complete"; + } else { + stat = "completed"; st = "Completed"; } diff --git a/sales-manager/productions/view.js b/sales-manager/productions/view.js index 5b2d9644..8331eaf2 100644 --- a/sales-manager/productions/view.js +++ b/sales-manager/productions/view.js @@ -149,7 +149,7 @@ document.cookie = "product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; .then((response) => { if (response.status == 200) { response.json().then((data) => { - batchNo.textContent ="P/B/" + data.batch.id; + batchNo.textContent = "P/B/" + data.batch.id; if (data.batch.status == 1) { status.textContent = "Processing"; @@ -196,11 +196,14 @@ document.cookie = "product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; `
` + `
` + `` + - `` + + `` + ``; }); } else { - status.textContent = "Completed"; + if (data.batch.status == 2) + status.textContent = "Ready to Distribute"; + else status.textContent = "Completed"; + var p_count_arr = data.batch.products_count.split(","); var d_count_arr = data.batch.distribution.split(","); @@ -792,7 +795,8 @@ document.cookie = "product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; remainingError.textContent = `Remaining amount cannot be less than zero`; remainigStatus = false; } else if (ActualAmount - remainigAmount != addTotal) { - if (lang == "sin") remainingError.textContent = `යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න`; + if (lang == "sin") + remainingError.textContent = `යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න`; else remainingError.textContent = `Something went wrong. Try again`; remainigStatus = false; } else { @@ -846,8 +850,8 @@ document.cookie = "product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; response.json().then((data) => { console.log(data.message); }); - if (lang == "sin") var title = "සාර්ථකව අංගනයට එක් කරන ලදී"; - else var title = "Successfully added to yard"; + if (lang == "sin") var title = "සාර්ථකව පවරා ඇත"; + else var title = "Successfully allocated"; Swal.fire({ title: title, // text: "You clicked the button!", diff --git a/sales-manager/products/view-all.html b/sales-manager/products/view-all.html index b0882262..27ae42a3 100644 --- a/sales-manager/products/view-all.html +++ b/sales-manager/products/view-all.html @@ -196,7 +196,7 @@

Edit Product

-
+

Enter Unit Price for pending products

diff --git a/sales-manager/products/view-all.js b/sales-manager/products/view-all.js index c4248f27..0dc49706 100644 --- a/sales-manager/products/view-all.js +++ b/sales-manager/products/view-all.js @@ -5,6 +5,7 @@ pTitle = body.querySelector(".salesmg-title"), pText = body.querySelector(".salesmg-text"), productsTable = body.querySelector(".products-table"), + pendingProducts = body.querySelector(".pending-products"), tbody1 = body.querySelector(".tbody1"), tbody2 = body.querySelector(".tbody2"), searchBar = body.querySelector(".search"), @@ -203,6 +204,8 @@ tbody1.innerHTML = row1; tbody2.innerHTML = row2; + if (row1.length == 0) pendingProducts.style.display = "none"; + const cols = document.querySelectorAll(".col"), col1s = document.querySelectorAll(".col1"), edits = document.querySelectorAll(".fa-pen-to-square"), @@ -558,7 +561,8 @@ pPriceStatus = false; return false; } else if (!checkInt(pPrice.value)) { - if (lang == "sin") pPriceError.textContent = "ඒකක මිල 0 ට වඩා වැඩි විය යුතුය"; + if (lang == "sin") + pPriceError.textContent = "ඒකක මිල 0 ට වඩා වැඩි විය යුතුය"; else pPriceError.textContent = "Unit price must be greater than 0"; pPriceStatus = false; return false; diff --git a/stock-manager/collectors/view.html b/stock-manager/collectors/view.html index 42f5b424..75bcf33d 100644 --- a/stock-manager/collectors/view.html +++ b/stock-manager/collectors/view.html @@ -133,8 +133,8 @@

- - + + diff --git a/stock-manager/collectors/view.js b/stock-manager/collectors/view.js index 57e98472..6c998a94 100644 --- a/stock-manager/collectors/view.js +++ b/stock-manager/collectors/view.js @@ -238,7 +238,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; `` + - `` + `` + @@ -800,7 +800,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන හිස් විය නොහැක`; else - daysError.innerHTML = ` Days count cannot be empty`; + daysError.innerHTML = ` Number of days cannot be empty`; day.nextSibling.style.display = ""; return false; } else if (!checkInt(day.value)) { @@ -808,7 +808,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන 0 ට වඩා වැඩි විය යුතුය`; else - daysError.innerHTML = ` Days count must be greater than 0`; + daysError.innerHTML = ` Number of days must be greater than 0`; day.nextSibling.style.display = ""; return false; } else { diff --git a/stock-manager/index.html b/stock-manager/index.html index d3bc5d08..8e7ab10f 100644 --- a/stock-manager/index.html +++ b/stock-manager/index.html @@ -106,7 +106,7 @@
- +

diff --git a/stock-manager/nav/nav.html b/stock-manager/nav/nav.html index 4473da2b..24ba3502 100644 --- a/stock-manager/nav/nav.html +++ b/stock-manager/nav/nav.html @@ -57,7 +57,7 @@ diff --git a/stock-manager/stock/edit.html b/stock-manager/stock/edit.html index 341379c4..34e2fb8a 100644 --- a/stock-manager/stock/edit.html +++ b/stock-manager/stock/edit.html @@ -95,18 +95,17 @@

Block

- +
- +
-
- +
diff --git a/stock-manager/stock/edit.js b/stock-manager/stock/edit.js index 8ddc3f62..da023cb3 100644 --- a/stock-manager/stock/edit.js +++ b/stock-manager/stock/edit.js @@ -110,7 +110,8 @@ response.json().then((data) => { console.log(data.message); }); - if (lang == "sin") Command: toastr["info"]("යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න"); + if (lang == "sin") + Command: toastr["info"]("යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න"); else Command: toastr["info"]("Something went wrong. Try again"); } else if (response.status === 401) { response.json().then((data) => { @@ -128,59 +129,123 @@ Command: toastr["error"](error); }); + var amount_status = false, + period_status = false; + + amount.addEventListener("input", () => { + amount_status_func(); + }); + period.addEventListener("input", () => { + period_status_func(); + }); + save.addEventListener("click", () => { - var formData = { - id: getCookie("id").slice(1), - date: getCookie("id").charAt(0), - count: amount.value, - days: period.value, - }; - - fetch(backProxy + "/yard-data", { - method: "PUT", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(formData), - credentials: "include", - }) - .then((response) => { - if (response.status == 200) { - response.json().then((data) => { - console.log(data.message); - }); - if (lang == "sin") - var title = "ගබඩා කොටස සාර්ථකව යාවත්කාලීන කරන ලදී"; - else var title = "Yard block updated successfully"; - - Swal.fire({ - title: title, - // text: "You clicked the button!", - icon: "success", - confirmButtonColor: confirmButtonColor, - }).then((response) => { - window.location.href="./view-block.html" - }); - } else if (response.status === 202) { - response.json().then((data) => { - console.log(data.message); - }); - if (lang == "sin") Command: toastr["info"]("යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න"); - else Command: toastr["info"]("Something went wrong. Try again"); - } else if (response.status === 401) { - response.json().then((data) => { - console.log(data.message); - }); - if (lang == "sin") Command: toastr["error"]("වලංගු නොවන පරිශීලක"); - else Command: toastr["error"]("Invalid User"); - } else { - console.error("Error:", response.status); - Command: toastr["error"](response.status, "Error"); - } + if (!period_status_func()) { + period.focus(); + } + if (!amount_status_func()) { + amount.focus(); + } + + if (amount_status && period_status) { + var formData = { + id: getCookie("id").slice(1), + date: getCookie("id").charAt(0), + count: amount.value, + days: period.value, + }; + + fetch(backProxy + "/yard-data", { + method: "PUT", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(formData), + credentials: "include", }) - .catch((error) => { - console.error("An error occurred:", error); - Command: toastr["error"](error); - }); + .then((response) => { + if (response.status == 200) { + response.json().then((data) => { + console.log(data.message); + }); + if (lang == "sin") + var title = "ගබඩා කොටස සාර්ථකව යාවත්කාලීන කරන ලදී"; + else var title = "Yard block updated successfully"; + + Swal.fire({ + title: title, + // text: "You clicked the button!", + icon: "success", + confirmButtonColor: confirmButtonColor, + }).then((response) => { + window.location.href = "./view-block.html"; + }); + } else if (response.status === 202) { + response.json().then((data) => { + console.log(data.message); + }); + if (lang == "sin") + Command: toastr["info"]("යමක් වැරදී ඇත. නැවත උත්සාහ කරන්න"); + else Command: toastr["info"]("Something went wrong. Try again"); + } else if (response.status === 401) { + response.json().then((data) => { + console.log(data.message); + }); + if (lang == "sin") Command: toastr["error"]("වලංගු නොවන පරිශීලක"); + else Command: toastr["error"]("Invalid User"); + } else { + console.error("Error:", response.status); + Command: toastr["error"](response.status, "Error"); + } + }) + .catch((error) => { + console.error("An error occurred:", error); + Command: toastr["error"](error); + }); + } }); + + function amount_status_func() { + if (typeof amount.value === "string" && amount.value.trim().length === 0) { + if (lang == "sin") + amountError.textContent = "පොල් ප්‍රමාණය හිස් විය නොහැක"; + else amountError.textContent = "Coconut amount cannot be empty"; + amount_status = false; + return false; + } else if (!checkInt(amount.value)) { + if (lang == "sin") + amountError.textContent = "පොල් ප්‍රමාණය 0 ට වඩා අඩු විය නොහැක"; + else amountError.textContent = "Coconut amount cannot be less than zero"; + amount_status = false; + return false; + } else { + amount_status = true; + amountError.textContent = ""; + return true; + } + } + + function period_status_func() { + if (typeof period.value === "string" && period.value.trim().length === 0) { + if (lang == "sin") periodError.textContent = "දින ගණන හිස් විය නොහැක"; + else periodError.textContent = "Number of days cannot be empty"; + period_status = false; + return false; + } else if (!checkInt(period.value)) { + if (lang == "sin") + periodError.textContent = "දින ගණන 0 ට වඩා අඩු විය නොහැක"; + else periodError.textContent = "Number of days cannot be less than zero"; + period_status = false; + return false; + } else { + period_status = true; + periodError.textContent = ""; + return true; + } + } })(); + +function checkInt(num) { + if (Number.isInteger(+num) && +num >= 0) return true; + return false; +} diff --git a/stock-manager/supply-requests/view-request.js b/stock-manager/supply-requests/view-request.js index b808e4bf..08362964 100644 --- a/stock-manager/supply-requests/view-request.js +++ b/stock-manager/supply-requests/view-request.js @@ -797,14 +797,14 @@ document.cookie = "date=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන හිස් විය නොහැක`; else - daysError.innerHTML = ` Days count cannot be empty`; + daysError.innerHTML = ` Number of days cannot be empty`; elm.nextSibling.style.display = ""; } else if (!checkInt(elm.value)) { daysError.style.display = ""; if (lang == "sin") daysError.innerHTML = ` දින ගණන 0 ට වඩා වැඩි විය යුතුය`; else - daysError.innerHTML = ` Days count must be greater than 0`; + daysError.innerHTML = ` Number of days must be greater than 0`; elm.nextSibling.style.display = ""; } else { daysError.style.display = "none"; @@ -941,7 +941,7 @@ document.cookie = "date=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන හිස් විය නොහැක`; else - daysError.innerHTML = ` Days count cannot be empty`; + daysError.innerHTML = ` Number of days cannot be empty`; day.nextSibling.style.display = ""; return false; } else if (!checkInt(day.value)) { @@ -949,7 +949,7 @@ document.cookie = "date=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන 0 ට වඩා වැඩි විය යුතුය`; else - daysError.innerHTML = ` Days count must be greater than 0`; + daysError.innerHTML = ` Number of days must be greater than 0`; day.nextSibling.style.display = ""; return false; } else { diff --git a/supplier/index.html b/supplier/index.html index a638cada..bd166720 100644 --- a/supplier/index.html +++ b/supplier/index.html @@ -73,7 +73,7 @@
- +

@@ -82,7 +82,7 @@
- +

diff --git a/supplier/nav/nav.html b/supplier/nav/nav.html index 89cfc627..c56f642c 100644 --- a/supplier/nav/nav.html +++ b/supplier/nav/nav.html @@ -26,7 +26,7 @@ @@ -51,7 +51,7 @@ diff --git a/supplier/supply/script.js b/supplier/supply/script.js index b836747d..e215e7af 100644 --- a/supplier/supply/script.js +++ b/supplier/supply/script.js @@ -235,11 +235,11 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; return false; } else if (!checkInt(amount.value)) { if (lang == "sin") { - amountError.textContent = "පොල් ප්‍රමාණය ධන නිඛිල විය යුතුය"; - Command: toastr["warning"]("පොල් ප්‍රමාණය ධන නිඛිල විය යුතුය"); + amountError.textContent = "පොල් ප්‍රමාණය 0 ට වඩා වැඩි විය යුතුය"; + Command: toastr["warning"]("පොල් ප්‍රමාණය 0 ට වඩා වැඩි විය යුතුය"); } else { - amountError.textContent = "Coconut amount must be positive integer"; - Command: toastr["warning"]("Coconut amount must be positive integer"); + amountError.textContent = "Coconut amount must be greater than 0"; + Command: toastr["warning"]("Coconut amount must be greater than 0"); } amountStatus = false; return false;
Block IDperiodBlockPeriod Amount Add Total
` + + `S/P/` + item.id + `` + @@ -598,14 +598,14 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; if (lang == "sin") daysError.innerHTML = ` දින ගණන හිස් විය නොහැක`; else - daysError.innerHTML = ` Days count cannot be empty`; + daysError.innerHTML = ` Number of days cannot be empty`; elm.nextSibling.style.display = ""; } else if (!checkInt(elm.value)) { daysError.style.display = ""; if (lang == "sin") daysError.innerHTML = ` දින ගණන 0 ට වඩා වැඩි විය යුතුය`; else - daysError.innerHTML = ` Days count must be greater than 0`; + daysError.innerHTML = ` Number of days must be greater than 0`; elm.nextSibling.style.display = ""; } else { daysError.style.display = "none"; @@ -763,7 +763,7 @@ document.cookie = "id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; ` disable">` + `` + `` + - `