FIX_VALIDATION_FOR_RISK_SPLITUP
This commit is contained in:
parent
fb349a8f02
commit
9fd830f21d
@ -425,10 +425,10 @@
|
|||||||
}
|
}
|
||||||
// console.log("form from : ", formDataSplitUp);
|
// console.log("form from : ", formDataSplitUp);
|
||||||
|
|
||||||
if (productSelectionData.multipleProduct == 'on') {
|
// if (productSelectionData.multipleProduct == 'on') {
|
||||||
let selectionType = productSelectionData.multilocation_type;
|
// let selectionType = productSelectionData.multilocation_type;
|
||||||
|
|
||||||
if (selectionType == 'multiFloater') {
|
// if (selectionType == 'multiFloater') {
|
||||||
let InProcess = [...document.querySelectorAll('[id^="stockInProcess_"]')].map(el => Number(el.value) || 0);
|
let InProcess = [...document.querySelectorAll('[id^="stockInProcess_"]')].map(el => Number(el.value) || 0);
|
||||||
let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0);
|
let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0);
|
||||||
let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0);
|
let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0);
|
||||||
@ -456,16 +456,16 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// console.log("Total SI: ", totalSI);
|
// console.log("Total SI: ", totalSI);
|
||||||
} else {
|
// } else {
|
||||||
let InProcess = [...document.querySelectorAll('[id^="stockInProcess_"]')].map(el => Number(el.value) || 0);
|
// let InProcess = [...document.querySelectorAll('[id^="stockInProcess_"]')].map(el => Number(el.value) || 0);
|
||||||
let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0);
|
// let rawMaterial = [...document.querySelectorAll('[id^="rawMaterial_"]')].map(el => Number(el.value) || 0);
|
||||||
let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0);
|
// let findMaterial = [...document.querySelectorAll('[id^="finishedStock_"]')].map(el => Number(el.value) || 0);
|
||||||
|
|
||||||
totalSI = InProcess.reduce((acc, val) => acc + val, 0) +
|
// totalSI = InProcess.reduce((acc, val) => acc + val, 0) +
|
||||||
rawMaterial.reduce((acc, val) => acc + val, 0) +
|
// rawMaterial.reduce((acc, val) => acc + val, 0) +
|
||||||
findMaterial.reduce((acc, val) => acc + val, 0);
|
// findMaterial.reduce((acc, val) => acc + val, 0);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// console.log("Form is trying to submit : ", formDataSplitUp);
|
// console.log("Form is trying to submit : ", formDataSplitUp);
|
||||||
|
|
||||||
@ -657,16 +657,31 @@
|
|||||||
// alert("you got ir");
|
// alert("you got ir");
|
||||||
console.log("increment2",increment2);
|
console.log("increment2",increment2);
|
||||||
console.log("policyRiskAddress.length",policyRiskAddress.length);
|
console.log("policyRiskAddress.length",policyRiskAddress.length);
|
||||||
if (increment2 <= policyRiskAddress.length) {
|
|
||||||
policyRiskAddress.forEach(function() {
|
policyRiskAddress.forEach(function() {
|
||||||
|
if (increment2 <= policyRiskAddress.length) {
|
||||||
// console.log("increment count is ", increment2)
|
// console.log("increment count is ", increment2)
|
||||||
addHTMLInputForRiskSplitUP();
|
addHTMLInputForRiskSplitUP();
|
||||||
validatePolicyBasedOnProductSelection();
|
validatePolicyBasedOnProductSelection();
|
||||||
hideAndShowBurglary();
|
hideAndShowBurglary();
|
||||||
})
|
|
||||||
}else {
|
|
||||||
alert("fdg");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
// else {
|
||||||
|
// const container = document.getElementById("addRiskSplitUp");
|
||||||
|
// container.innerHTML = "";
|
||||||
|
// increment2 = 1;
|
||||||
|
// if (increment2 <= policyRiskAddress.length) {
|
||||||
|
// policyRiskAddress.forEach(function() {
|
||||||
|
// // console.log("increment count is ", increment2)
|
||||||
|
// addHTMLInputForRiskSplitUP();
|
||||||
|
// validatePolicyBasedOnProductSelection();
|
||||||
|
// hideAndShowBurglary();
|
||||||
|
// // increment2++;
|
||||||
|
// })
|
||||||
|
// // alert("fdg");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (contianertoCheck.innerHTML == "") {
|
if (contianertoCheck.innerHTML == "") {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user