Commit 1f19523f by Azhan Hannan

SCREEN RESUBMIT (OVERHEAD) -> Isu: Total hours tak papar dalam 1 decimal. dah…

SCREEN RESUBMIT (OVERHEAD) -> Isu: Total hours tak papar dalam 1 decimal. dah implement dalam semua form
parent be9671a5
...@@ -368,18 +368,6 @@ input[type=number] { ...@@ -368,18 +368,6 @@ input[type=number] {
if (input.value < 0) input.value = 0; if (input.value < 0) input.value = 0;
if (input.value > 24) input.value = 24; if (input.value > 24) input.value = 24;
// if( (input.value%1) > 0 && (input.value%1) <= 0.2 ) {
// input.value = Math.floor(input.value);
// }
// if( (input.value%1) > 0.2 && (input.value%1) <= 0.7 ) {
// input.value = Math.floor(input.value) + 0.5;
// }
// if( (input.value%1) > 0.7) {
// input.value = Math.ceil(input.value);
// }
input.value = parseFloat(parseFloat(input.value).toFixed(1)); input.value = parseFloat(parseFloat(input.value).toFixed(1));
for(var i = 0; i < 32; i++){ for(var i = 0; i < 32; i++){
...@@ -402,22 +390,7 @@ input[type=number] { ...@@ -402,22 +390,7 @@ input[type=number] {
} }
} }
// console.log("currenttotal --> " + currenttotal); document.getElementById('total-'+pid).value = currenttotal.toFixed(1);
document.getElementById('total-'+pid).value = currenttotal;
// var y = 0;
// for(var j = 1; j < key+1; j++){
// var allid = document.getElementById('total-'+j);
// if (document.getElementById('total-'+j)) {
// y = document.getElementById('total-'+j).value;
// value = parseFloat(parseFloat(y).toFixed(1));
// // all += value;
// }
// }
// console.log(all);
// document.getElementById('all').value = all;
// document.getElementById('total-'+pid).value = currenttotal;
} }
</script> </script>
......
...@@ -455,7 +455,7 @@ input[type=number] { ...@@ -455,7 +455,7 @@ input[type=number] {
console.log("currenttotal --> " + currenttotal); console.log("currenttotal --> " + currenttotal);
document.getElementById('total-'+pid).value = currenttotal; document.getElementById('total-'+pid).value = currenttotal.toFixed(1);
} }
</script> </script>
......
...@@ -178,18 +178,6 @@ ...@@ -178,18 +178,6 @@
if (input.value < 0) input.value = 0; if (input.value < 0) input.value = 0;
if (input.value > 24) input.value = 24; if (input.value > 24) input.value = 24;
// if( (input.value%1) > 0 && (input.value%1) <= 0.2 ) {
// input.value = Math.floor(input.value);
// }
// if( (input.value%1) > 0.2 && (input.value%1) <= 0.7 ) {
// input.value = Math.floor(input.value) + 0.5;
// }
// if( (input.value%1) > 0.7) {
// input.value = Math.ceil(input.value);
// }
input.value = parseFloat(parseFloat(input.value).toFixed(1)); input.value = parseFloat(parseFloat(input.value).toFixed(1));
for(var i = 0; i < 32; i++){ for(var i = 0; i < 32; i++){
...@@ -211,23 +199,8 @@ ...@@ -211,23 +199,8 @@
} }
} }
} }
document.getElementById('total-'+pid).value = currenttotal.toFixed(1);
// console.log("currenttotal --> " + currenttotal);
document.getElementById('total-'+pid).value = currenttotal;
// var y = 0;
// for(var j = 1; j < key+1; j++){
// var allid = document.getElementById('total-'+j);
// if (document.getElementById('total-'+j)) {
// y = document.getElementById('total-'+j).value;
// value = parseFloat(parseFloat(y).toFixed(1));
// // all += value;
// }
// }
// console.log(all);
// document.getElementById('all').value = all;
// document.getElementById('total-'+pid).value = currenttotal;
} }
</script> </script>
......
...@@ -273,24 +273,18 @@ ...@@ -273,24 +273,18 @@
hourValue = hourValue.value; hourValue = hourValue.value;
value = parseFloat(parseFloat(hourValue).toFixed(1)); value = parseFloat(parseFloat(hourValue).toFixed(1));
console.log(isNaN(value)); // console.log(isNaN(value));
if(isNaN(value)){ if(isNaN(value)){
value = 0; value = 0;
} }
if(typeof value === 'number'){ if(typeof value === 'number'){
// console.log(value);
currenttotal += value; currenttotal += value;
} }
} }
} }
document.getElementById('total-'+pid).value = currenttotal.toFixed(1);
console.log("currenttotal --> " + currenttotal);
document.getElementById('total-'+pid).value = currenttotal;
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment