invoice report
This commit is contained in:
@@ -14,6 +14,7 @@ dbo.employeehoursreportInit = function () {
|
||||
dbo.employeeHoursreportModel = {
|
||||
|
||||
months : ko.observableArray( [
|
||||
{monthID: 0, monthName : 'totaal'},
|
||||
{monthID: 1, monthName: 'jan'},
|
||||
{monthID: 2, monthName: 'febr'},
|
||||
{monthID: 3, monthName: 'mrt'},
|
||||
@@ -55,7 +56,7 @@ dbo.employeehoursreportInit = function () {
|
||||
} );
|
||||
|
||||
vm.selectedYear( (new Date()).getFullYear() );
|
||||
vm.selectedMonthID( 1 );
|
||||
vm.selectedMonthID( 0 );
|
||||
|
||||
vm.initialize = false;
|
||||
|
||||
@@ -103,10 +104,10 @@ dbo.employeehoursreportInit = function () {
|
||||
_.each( data, function ( p ) {
|
||||
vm.employees.push( new vm.Employee( p ) );
|
||||
|
||||
vm.profitablehoursTotaal( vm.profitablehoursTotaal() + Number( p.profitablehours ) );
|
||||
vm.nonprofitablehoursTotaal( vm.nonprofitablehoursTotaal() + Number( p.nonprofitablehours ) );
|
||||
vm.nonprojecthoursTotaal( vm.nonprojecthoursTotaal() + Number( p.nonprojecthours ) );
|
||||
vm.totalhoursTotaal( vm.totalhoursTotaal() + Number( p.totalhours ) );
|
||||
vm.profitablehoursTotaal( Math.round(vm.profitablehoursTotaal() + Number( p.profitablehours )) );
|
||||
vm.nonprofitablehoursTotaal( Math.round(vm.nonprofitablehoursTotaal() + Number( p.nonprofitablehours ) ));
|
||||
vm.nonprojecthoursTotaal( Math.round(vm.nonprojecthoursTotaal() + Number( p.nonprojecthours ) ));
|
||||
vm.totalhoursTotaal( Math.round(vm.totalhoursTotaal() + Number( p.totalhours )) );
|
||||
vm.targetTotaal( Math.round( vm.targetTotaal() + Number( p.targethours / 12 ) ) );
|
||||
vm.revenuesTotaal( Number( vm.revenuesTotaal() ) + Number( p.revenues ) );
|
||||
|
||||
@@ -141,7 +142,7 @@ dbo.employeehoursreportInit = function () {
|
||||
this.profitablehours = data.profitablehours;
|
||||
this.nonprofitablehours = data.nonprofitablehours;
|
||||
this.nonprojecthours = data.nonprojecthours;
|
||||
this.totalhours = data.totalhours;
|
||||
this.totalhours = Math.round(data.totalhours);
|
||||
this.target = Math.round( data.targethours / 12 );
|
||||
this.occupancyRateTotal = Math.round( (data.totalhours / (data.targethours / 12)) * 100 );
|
||||
this.occupancyRateHours = Math.round( (data.profitablehours / data.totalhours ) * 100 );
|
||||
|
||||
Reference in New Issue
Block a user