Commit 4f417583 authored by Alina Habibulina's avatar Alina Habibulina

+ week score

parent a3425dc2
......@@ -158,13 +158,7 @@ var portal = {
};
function countingScore(){
////Расчет итогового количества часов
////in the "table" variable - array with the all data
//// 10 columns in row, 1st row - table headers
//// if we have only 1 full row - we have 20 values in array, every extra row - +10 value in array
/////first 3 columns - project and ect;
///// last 7 colums is what we need - the value of hours in day
////Расчет итогового количества часов происходит при нажатии кнопки сохранения
var table = portal.player.model.getModelWithId("ts_timesheet_table").getAsfData().findElement().data;
var score = 0, monday = 0, tuesday = 0, wednesday = 0, thursday = 0, friday = 0, saturday = 0, sunday = 0;
for (var i = 10; i < table.length; i++){
......@@ -180,13 +174,9 @@ function countingScore(){
else if (table[i].id == ("saturday-b"+row)) { saturday = table[i].value; score = Number.parseFloat(score) + Number.parseFloat(saturday);}
else if (table[i].id == ("sunday-b"+row)) { sunday = table[i].value; score = Number.parseFloat(score) + Number.parseFloat(sunday);}
}
portal.player.model.getModelWithId("ts_total_hours").setValue(score.toString());
ShowMessage(score);
};
function timeComputing(serverDateTime){
function zeroCheck(num){
if (num < 10) {num = "0"+ num;}
......
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