diff --git a/application/views/reports/employeehours/employeemonthhours_view.php b/application/views/reports/employeehours/employeemonthhours_view.php
index 1ab79dc..d3d6a49 100644
--- a/application/views/reports/employeehours/employeemonthhours_view.php
+++ b/application/views/reports/employeehours/employeemonthhours_view.php
@@ -10,7 +10,7 @@
totaal bestede uren |
uren jaartarget |
aandeel uren besteed tov target |
-
bezettingsgraad totaal aantal gewerkte uren |
+
percentage declarable tov totaal |
bezettingsgraad t.o.v. target factureerbare uren |
omzet |
gemiddeld tarief |
diff --git a/application/views/reports/monthlyemployeehours/euro_view.php b/application/views/reports/monthlyemployeehours/euro_view.php
index 76b459c..e8e6d9f 100644
--- a/application/views/reports/monthlyemployeehours/euro_view.php
+++ b/application/views/reports/monthlyemployeehours/euro_view.php
@@ -67,6 +67,9 @@
|
+
+
+ |
@@ -100,6 +103,9 @@
|
+
+
+ |
diff --git a/public/js/lib/modals/employeeTargetModal.js b/public/js/lib/modals/employeeTargetModal.js
index 21f26c9..b84972e 100644
--- a/public/js/lib/modals/employeeTargetModal.js
+++ b/public/js/lib/modals/employeeTargetModal.js
@@ -92,6 +92,7 @@ $( function () {
dbo.employeeTargetDataService.getEmployeeTargets( vm.employeeID, function ( data ) {
vm.employeeTargets.removeAll();
+ vm.newTarget( true );
vm.targetLength = data.length
var i = 0;
_.each( data, function ( p ) {
@@ -132,8 +133,8 @@ $( function () {
return false;
} );
- if ( ! self.endmonth() ) vm.newTarget( false );
- if ( ! self.endyear() ) vm.newTarget( false );
+ if ( !self.endmonth() ) vm.newTarget( false );
+ if ( !self.endyear() ) vm.newTarget( false );
}
};
diff --git a/public/js/lib/modals/projectModal.js b/public/js/lib/modals/projectModal.js
index f4471cf..0005736 100644
--- a/public/js/lib/modals/projectModal.js
+++ b/public/js/lib/modals/projectModal.js
@@ -42,16 +42,16 @@ $( function () {
years : ko.observableArray( dbo.years ),
months : ko.observableArray( dbo.monthArray ),
outstanding : ko.observable(),
- toForecast : ko.observable(),
- totalForecast : ko.observable(),
documents : ko.observableArray( [] ),
comments : ko.observableArray( [] ),
activeTab : ko.observable(),
totalRevenues : ko.observable(),
totalInvoiced : ko.observable(),
+ totalRevenuesIncl : ko.observable(),
outstanding : ko.observable(),
outstandingInvoices: ko.observable(),
payed : ko.observable(),
+ totalForecast : ko.observable(),
toForecast : ko.observable(),
toInvoice : 0,
@@ -186,6 +186,7 @@ $( function () {
p.inEdit( false );
}
} );
+ vm.toForecasting();
},
editReservation: function () {
@@ -724,6 +725,8 @@ $( function () {
vm.busy = true;
dbo.projectDataService.getProject( vm.projectID, function ( data ) {
+ var totalRevenuesIncl = Math.round( (data.invoiceDetails.totalrevenue * (data.vatrate + 100)) / 100 );
+
vm.id = data.id
vm.projectleaderID( data.projectleader_id );
vm.customerID( data.customer_id );
@@ -732,11 +735,12 @@ $( function () {
vm.projectnumber( data.projectnumber );
vm.projectname( data.projectname );
vm.totalRevenues( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.totalrevenue ) ) ) );
+ vm.totalRevenuesIncl( dbo.helpers.numberWithPoints( totalRevenuesIncl ));
vm.totalInvoiced( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.totalinvoiced ) ) ) );
- vm.outstanding( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.totalrevenue ) ) - Math.round( Number( data.invoiceDetails.totalinvoiced ) ) ) );
+ vm.outstanding( dbo.helpers.numberWithPoints( Math.round( Number( totalRevenuesIncl ) ) - Math.round( Number( data.invoiceDetails.totalinvoiced ) ) ) );
vm.outstandingInvoices( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.totalinvoiced ) ) - Math.round( Number( data.invoiceDetails.payed ) ) ) );
vm.payed( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.payed ) ) ) );
- vm.toInvoice = Math.round( Number( data.invoiceDetails.totalrevenue ) ) - Math.round( Number( data.invoiceDetails.totalinvoiced ) );
+ vm.toInvoice = Math.round( totalRevenuesIncl - Number( data.invoiceDetails.totalinvoiced ) );
vm.projectEmployees.removeAll();
vm.projecthours.removeAll();
@@ -793,13 +797,15 @@ $( function () {
toForecasting: function () {
var vm = dbo.editProjectModal;
- console.log( vm.toInvoice );
+
+ vm.totalForecast(0);
vm.toForecast( vm.toInvoice );
_.each( vm.forecasts(), function ( p ) {
- console.log( p.forecastamount );
+ vm.totalForecast( vm.totalForecast() + Number( p.forecastamount() ));
vm.toForecast( vm.toForecast() - Number( p.forecastamount() ) );
} );
vm.toForecast( dbo.helpers.numberWithPoints( Number( vm.toForecast() ) ) );
+ vm.totalForecast( dbo.helpers.numberWithPoints( Number( vm.totalForecast() ) ) );
},
Projectemployee: function ( data ) {
diff --git a/public/js/lib/modules/reports/employeeHours.js b/public/js/lib/modules/reports/employeeHours.js
index 029fe7f..ef0dd8f 100644
--- a/public/js/lib/modules/reports/employeeHours.js
+++ b/public/js/lib/modules/reports/employeeHours.js
@@ -123,9 +123,9 @@ dbo.employeehoursreportInit = function () {
chartData.averageRate.push( Math.round( (p.revenues / p.profitablehours) * 8 ) )
chartData.hours.push( p.totalhours );
} );
- vm.occupancyRateTotalTotaal( Math.round( (vm.totalhoursTotaal() / vm.targetTotaal()) * 100 ) );
- vm.occupancyRateHoursTotaal( Math.round( (vm.profitablehoursTotaal() / vm.totalhoursTotaal()) * 100 ) );
- vm.occupancyRateInvoiceTotaal( Math.round( (vm.profitablehoursTotaal() / vm.targetTotaal()) * 100 ) );
+ vm.occupancyRateTotalTotaal( Math.round( (vm.totalhoursTotaal() / vm.targetTotaal()) * 1000 ) / 10 );
+ vm.occupancyRateHoursTotaal( Math.round( (vm.profitablehoursTotaal() / vm.totalhoursTotaal()) * 1000 ) / 10 );
+ vm.occupancyRateInvoiceTotaal( Math.round( (vm.profitablehoursTotaal() / vm.targetTotaal()) * 1000 ) / 10 );
vm.averageDayRateTotaal( Math.round( Number( vm.revenuesTotaal() ) / Number( vm.profitablehoursTotaal() ) ) * 8 );
vm.revenuesTotaal( dbo.helpers.thousandSeparator( vm.revenuesTotaal() ) );
@@ -151,9 +151,9 @@ dbo.employeehoursreportInit = function () {
this.nonprojecthours = data.nonprojecthours;
this.totalhours = Math.round( data.totalhours );
this.target = dbo.helpers.numberWithPoints( Math.round( data.targethours ) );
- this.occupancyRateTotal = Math.round( (data.totalhours / data.targethours) * 100 );
- this.occupancyRateHours = Math.round( (data.profitablehours / data.totalhours) * 100 );
- this.occupancyRateInvoice = Math.round( (data.profitablehours / data.targethours) * 100 );
+ this.occupancyRateTotal = Math.round( (data.totalhours / data.targethours) * 1000 ) / 10;
+ this.occupancyRateHours = Math.round( (data.profitablehours / data.totalhours) * 1000 ) / 10;
+ this.occupancyRateInvoice = Math.round( (data.profitablehours / data.targethours) * 1000 ) / 10;
this.revenues = dbo.helpers.thousandSeparator( data.revenues );
this.averageDayRate = Math.round( (data.revenues / data.profitablehours) * 8 );
}
diff --git a/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js b/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
index 01928d5..f7d9a22 100644
--- a/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
+++ b/public/js/lib/modules/reports/monthlyEmployeeHoursModule.js
@@ -33,9 +33,10 @@ dbo.monthlyemployeehoursInit = function () {
totalCosts : ko.observable(),
totalAvailableBudget : ko.observable(),
totalSaldo : ko.observable(),
+ totalOwp : ko.observable(),
totalWorkInProgress : ko.observable(),
totalInvoicedYear : ko.observableArray( [] ),
- validYear : ko.observable(true),
+ validYear : ko.observable( true ),
init: function () {
var vm = dbo.monthlyEmployeeHoursModel;
@@ -60,6 +61,7 @@ dbo.monthlyemployeehoursInit = function () {
vm.totalAvailableRevenues( 0 )
vm.totalEmployeeHours( 0 );
vm.totalEmployeeAvailableHours( 0 );
+ vm.totalOwp( 0 );
vm.totalPerEmployee.removeAll();
vm.totalInvoicedYear.removeAll();
dbo.userDataService.getUniqueProjectEmployees( function ( data ) {
@@ -86,7 +88,8 @@ dbo.monthlyemployeehoursInit = function () {
vm.totalSaldo( dbo.helpers.thousandSeparator( vm.totalSaldo() ) );
vm.totalWorkInProgress( dbo.helpers.thousandSeparator( vm.totalWorkInProgress() ) );
vm.totalEmployeeRevenues( dbo.helpers.thousandSeparator( vm.totalEmployeeRevenues() ) );
- vm.totalAvailableRevenues( dbo.helpers.thousandSeparator( vm.totalEmployeeRevenues() < 0 ? 0 :vm.totalEmployeeRevenues() ) );
+ vm.totalAvailableRevenues( dbo.helpers.thousandSeparator( vm.totalAvailableRevenues() ));
+ vm.totalOwp( dbo.helpers.thousandSeparator( vm.totalOwp() ) );
vm.totalEmployeeHours( dbo.helpers.thousandSeparator( vm.totalEmployeeHours() ) );
_.each( vm.totalPerEmployee(), function ( p ) {
p.totalRevenue( dbo.helpers.thousandSeparator( p.totalRevenue() ) );
@@ -306,6 +309,7 @@ dbo.monthlyemployeehoursInit = function () {
self.hours = data.hours;
self.totalEmpoloyeeRevenues = 0;
self.availableRevenue = data.own_revenue - data.projectEuros;
+ self.owp = self.availableRevenue < 0 ? 0 : self.availableRevenue;
self.externCosts = dbo.helpers.thousandSeparator( data.projectcosts );
self.budget = dbo.helpers.thousandSeparator( data.budget );
self.ownRevenue = dbo.helpers.thousandSeparator( data.own_revenue );
@@ -321,13 +325,15 @@ dbo.monthlyemployeehoursInit = function () {
self.totalEmployeeRevenues = data.projectEuros;
self.totalEmployeeHours = data.projectHours;
self.hoursAvailable = data.hoursAvailable;
- vm.totalAvailableRevenues( vm.totalAvailableRevenues() + self.availableRevenue );
vm.totalEmployeeRevenues( vm.totalEmployeeRevenues() + Number( self.totalEmployeeRevenues ) );
vm.totalEmployeeHours( vm.totalEmployeeHours() + Number( self.totalEmployeeHours ) );
vm.totalEmployeeAvailableHours( vm.totalEmployeeAvailableHours() + Number( self.hoursAvailable ) );
+ vm.totalAvailableRevenues( Number( vm.totalAvailableRevenues() ) + Number( self.availableRevenue ) );
+ vm.totalOwp( Number( vm.totalOwp() ) + Number( self.owp ) );
self.totalEmployeeRevenues = dbo.helpers.thousandSeparator( self.totalEmployeeRevenues );
self.availableRevenue = dbo.helpers.thousandSeparator( self.availableRevenue );
self.workInProgress = dbo.helpers.thousandSeparator( data.workInProgress );
+ self.owp = dbo.helpers.thousandSeparator( self.owp );
self.hoursAvailable = data.hoursAvailable;
self.invoiced = ko.observableArray( [] );