diversen nav opmerkingen
This commit is contained in:
@@ -104,6 +104,9 @@ th.focus-green{
|
||||
border:0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.red-line{
|
||||
border-bottom: 1px solid red !important;
|
||||
}
|
||||
|
||||
/*********SWITCH************/
|
||||
.onoffswitch {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
dbo.employeehoursDataService = {
|
||||
|
||||
getEmployeehours: function ( $month, $year, callback ) {
|
||||
$.getJSON( 'index.php/projects/employeeHoursController/getEmployeehours/' + $month + '/' + $year )
|
||||
getEmployeehours: function ( $month, $year, employeeID, callback ) {
|
||||
$.getJSON( 'index.php/projects/employeeHoursController/getEmployeehours/' + $month + '/' + $year + '/' + employeeID )
|
||||
.done( function ( data ) {
|
||||
callback( data );
|
||||
} );
|
||||
|
||||
@@ -21,11 +21,25 @@ dbo.userDataService = {
|
||||
} );
|
||||
},
|
||||
|
||||
getUniqueProjectEmployees:function(callback){
|
||||
$.post('index.php/beheer/usersController/getUniqueprojectEmployees', 'json')
|
||||
.done(function(data){
|
||||
callback(data);
|
||||
});
|
||||
getCurrentUser: function ( callback ) {
|
||||
$.getJSON( 'index.php/beheer/usersController/getCurrentUser' )
|
||||
.done( function ( data ) {
|
||||
callback( data );
|
||||
} );
|
||||
},
|
||||
|
||||
getUserWithprojects: function ( callback ) {
|
||||
$.getJSON( 'index.php/beheer/usersController/getUserWithprojects' )
|
||||
.done( function ( data ) {
|
||||
callback( data );
|
||||
} );
|
||||
},
|
||||
|
||||
getUniqueProjectEmployees: function ( callback ) {
|
||||
$.post( 'index.php/beheer/usersController/getUniqueprojectEmployees', 'json' )
|
||||
.done( function ( data ) {
|
||||
callback( data );
|
||||
} );
|
||||
},
|
||||
|
||||
checkUsername: function ( username, callback ) {
|
||||
@@ -44,11 +58,11 @@ dbo.userDataService = {
|
||||
} );
|
||||
},
|
||||
|
||||
archiveUser: function(userID, status, callback){
|
||||
$.get('index.php/beheer/usersController/archiveUser/' + userID + '/' + status)
|
||||
.done(function(){
|
||||
archiveUser: function ( userID, status, callback ) {
|
||||
$.get( 'index.php/beheer/usersController/archiveUser/' + userID + '/' + status )
|
||||
.done( function () {
|
||||
callback();
|
||||
});
|
||||
} );
|
||||
},
|
||||
|
||||
removeUser: function ( userID, callback ) {
|
||||
@@ -57,6 +71,8 @@ dbo.userDataService = {
|
||||
callback( data );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
dbo.userDataService.getCurrentUser(function(data){
|
||||
dbo.currentUser = data;
|
||||
});
|
||||
@@ -56,7 +56,7 @@ dbo.helpers = {
|
||||
},
|
||||
|
||||
findArrayElement: function ( toFind, element, value, array ) {
|
||||
// console.log( toFind );
|
||||
// console.log( toFind ); // het element in de array
|
||||
// console.log( element );
|
||||
// console.log( value );
|
||||
// console.log( array );
|
||||
|
||||
@@ -21,6 +21,7 @@ $( function () {
|
||||
offerleader_id : ko.observable(),
|
||||
own_revenue : ko.observable(),
|
||||
other_revenue : ko.observable(),
|
||||
costs : ko.observable(),
|
||||
hasProject : ko.observable(),
|
||||
|
||||
init: function () {
|
||||
@@ -54,6 +55,7 @@ $( function () {
|
||||
offernumber : vm.offernumber(),
|
||||
own_revenue : vm.own_revenue(),
|
||||
other_revenue : vm.other_revenue(),
|
||||
costs : vm.costs(),
|
||||
startdate : vm.startdate(),
|
||||
acceptance_chance: vm.acceptance_chance(),
|
||||
accepteddate : vm.accepteddate(),
|
||||
@@ -64,7 +66,7 @@ $( function () {
|
||||
if ( data.createProject ) {
|
||||
tellMe( {
|
||||
title : 'project aanmaken',
|
||||
message : 'De offerte is goedgekeurt maar nog niet gekoppeld aan een project, wilt u een project aanmaken?',
|
||||
message : 'De offerte is goedgekeurd maar nog niet gekoppeld aan een project, wilt u een project aanmaken?',
|
||||
notify : true,
|
||||
noText : 'Nee, maak geen project aan',
|
||||
yesText : 'Ja, maak een project aan',
|
||||
@@ -77,7 +79,7 @@ $( function () {
|
||||
title : 'project aangemaakt',
|
||||
message : 'er is een project aangemaakt met nummer: ' + data.projectnumber,
|
||||
modalClass: 'modal-success'
|
||||
}, function(){
|
||||
}, function () {
|
||||
vm.hideOfferModal();
|
||||
vm.callback();
|
||||
} );
|
||||
@@ -104,7 +106,7 @@ $( function () {
|
||||
message : errorMessage,
|
||||
modalClass: 'modal-danger'
|
||||
} );
|
||||
}else{
|
||||
} else {
|
||||
vm.hideOfferModal();
|
||||
vm.callback();
|
||||
}
|
||||
@@ -132,7 +134,8 @@ $( function () {
|
||||
vm.accepteddate( offer.accepteddate || null );
|
||||
vm.rejectdate( offer.rejectdate || null );
|
||||
vm.own_revenue( offer.own_revenue || 0 );
|
||||
vm.other_revenue( offer.other_revenue || 0 )
|
||||
vm.other_revenue( offer.other_revenue || 0 );
|
||||
vm.costs( offer.costs || 0 );
|
||||
},
|
||||
|
||||
showOfferModal: function () {
|
||||
|
||||
@@ -41,6 +41,9 @@ $( function () {
|
||||
projectname : ko.observable(),
|
||||
years : ko.observableArray( dbo.years ),
|
||||
months : ko.observableArray( dbo.monthArray ),
|
||||
outstanding : ko.observable(),
|
||||
toForecast : ko.observable(),
|
||||
totalForecast : ko.observable(),
|
||||
|
||||
init: function () {
|
||||
var vm = dbo.editProjectModal;
|
||||
@@ -700,14 +703,15 @@ $( function () {
|
||||
vm.enddate( dbo.helpers.mysql2date( data.enddate ) );
|
||||
vm.projectnumber( data.projectnumber );
|
||||
vm.projectname( data.projectname );
|
||||
vm.outstanding( data.outstanding );
|
||||
|
||||
vm.projectEmployees.removeAll();
|
||||
vm.projecthours.removeAll();
|
||||
$.each( data.projectemployees, function ( i, p ) {
|
||||
_.each( data.projectemployees, function ( p ) {
|
||||
vm.projectEmployees.push( new vm.Projectemployee( p ) );
|
||||
} );
|
||||
|
||||
$.each( data.projectemployees, function ( i, p ) {
|
||||
_.each( data.projectemployees, function ( p ) {
|
||||
var fullname = p.user ? p.user.fullname : '#NB';
|
||||
$.each( p.projecthours, function ( b, q ) {
|
||||
vm.projecthours.push( new vm.Projecthour( q, fullname ) );
|
||||
@@ -715,12 +719,12 @@ $( function () {
|
||||
} );
|
||||
|
||||
vm.projectcosts.removeAll();
|
||||
$.each( data.projectcosts, function ( i, p ) {
|
||||
_.each( data.projectcosts, function ( p ) {
|
||||
vm.projectcosts.push( new vm.Projectcost( p ) );
|
||||
} );
|
||||
|
||||
vm.offers.removeAll();
|
||||
$.each( data.offers, function ( i, p ) {
|
||||
_.each( data.offers, function ( p, i ) {
|
||||
if ( i == 0 ) {
|
||||
vm.ownRevenue( p.own_revenue );
|
||||
vm.otherRevenue( p.other_revenue );
|
||||
@@ -729,17 +733,17 @@ $( function () {
|
||||
} );
|
||||
|
||||
vm.invoices.removeAll();
|
||||
$.each( data.invoices, function ( i, p ) {
|
||||
_.each( data.invoices, function ( p ) {
|
||||
vm.invoices.push( new vm.Invoice( p ) );
|
||||
} );
|
||||
|
||||
vm.forecasts.removeAll();
|
||||
$.each( data.forecasts, function ( i, p ) {
|
||||
_.each( data.forecasts, function ( p ) {
|
||||
vm.forecasts.push( new vm.Forecast( p ) );
|
||||
} );
|
||||
|
||||
vm.reservations.removeAll();
|
||||
$.each( data.reservations, function ( i, p ) {
|
||||
_.each( data.reservations, function ( p ) {
|
||||
vm.reservations.push( new vm.Reservation( p ) );
|
||||
} );
|
||||
|
||||
|
||||
@@ -13,30 +13,34 @@ dbo.employeehoursInit = function () {
|
||||
} else {
|
||||
dbo.employeehoursModel = {
|
||||
|
||||
employeehours: ko.observableArray( [] ),
|
||||
archive : ko.observable( false ),
|
||||
months : ko.observableArray( [] ),
|
||||
years : ko.observableArray( [] ),
|
||||
hourtypes : ko.observableArray( [] ),
|
||||
employees : ko.observableArray( [] ),
|
||||
selectedYear : ko.observable(),
|
||||
selectedMonth: ko.observable(),
|
||||
busy : false,
|
||||
employeehours : ko.observableArray( [] ),
|
||||
archive : ko.observable( false ),
|
||||
months : ko.observableArray( [] ),
|
||||
years : ko.observableArray( [] ),
|
||||
hourtypes : ko.observableArray( [] ),
|
||||
employees : ko.observableArray( [] ),
|
||||
selectedYear : ko.observable(),
|
||||
selectedMonth : ko.observable(),
|
||||
busy : false,
|
||||
selectedEmployeeID: ko.observable(),
|
||||
|
||||
init: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
|
||||
vm.createMonths();
|
||||
vm.createYears();
|
||||
vm.months( dbo.monthArray );
|
||||
vm.years( dbo.years );
|
||||
|
||||
var d = new Date();
|
||||
vm.selectedMonth( d.getMonth() + 1 );
|
||||
vm.selectedYear( d.getFullYear() );
|
||||
vm.selectedMonth( dbo.currentMonth );
|
||||
vm.selectedYear( dbo.currentYear );
|
||||
|
||||
dbo.employeehoursDataService.getHourtypes( function ( data ) {
|
||||
vm.hourtypes( data );
|
||||
dbo.userDataService.getAllUsers( 'F', function ( data ) {
|
||||
vm.employees( data );
|
||||
dbo.userDataService.getUserWithprojects( function ( data ) {
|
||||
vm.employees.removeAll();
|
||||
_.each( data, function ( p ) {
|
||||
vm.employees.push( new vm.Employee( p ) );
|
||||
} );
|
||||
vm.selectedEmployeeID( dbo.currentUser.id )
|
||||
|
||||
vm.refreshEmployeehours();
|
||||
} );
|
||||
@@ -46,12 +50,22 @@ dbo.employeehoursInit = function () {
|
||||
newEmployeehour: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
|
||||
var employeeHour = vm.employeehours()[vm.employeehours().length - 1];
|
||||
|
||||
var employeeID = null;
|
||||
if ( !vm.selectedEmployeeID ) {
|
||||
employeeID = employeeHour ? employeeHour.employee_id() : null;
|
||||
} else {
|
||||
employeeID = vm.selectedEmployeeID();
|
||||
}
|
||||
|
||||
var employeehour = {
|
||||
id : 0,
|
||||
employee_id: null,
|
||||
hourdate : null,
|
||||
hourtype_id: null,
|
||||
hours : 0,
|
||||
employee_id: employeeID,
|
||||
hourdate : employeeHour ? employeeHour.hourdate() : null,
|
||||
hourtype_id: employeeHour ? employeeHour.hourtype_id() : 9,
|
||||
project_id : employeeHour ? employeeHour.projectID() : null,
|
||||
hours : employeeHour ? employeeHour.hours() : 0,
|
||||
inEdit : true
|
||||
};
|
||||
|
||||
@@ -66,30 +80,43 @@ dbo.employeehoursInit = function () {
|
||||
vm.refreshHours();
|
||||
},
|
||||
|
||||
saveEmployeehours: function () {
|
||||
var self = this;
|
||||
saveEmployeehours: function ( self = false ) {
|
||||
if ( !self ) self = this;
|
||||
|
||||
if ( !self.employee_id() ) return;
|
||||
if ( !self.hourtype_id() ) return;
|
||||
if ( !self.hourdate() ) return;
|
||||
if ( self.hourType() == 'PROJECTS' && !self.projectID() ) return;
|
||||
|
||||
var submitDATA = {
|
||||
id : self.id,
|
||||
id : self.id(),
|
||||
employee_id: self.employee_id(),
|
||||
hourdate : self.hourdate(),
|
||||
hourtype_id: self.hourtype_id(),
|
||||
hours : self.hours()
|
||||
hours : self.hours(),
|
||||
hourType : self.hourType(),
|
||||
project_id : self.projectID()
|
||||
};
|
||||
|
||||
dbo.employeehoursDataService.saveEmployeehour( submitDATA, function ( data ) {
|
||||
self.id = data.employeehourID;
|
||||
self.id( data.employeehourID );
|
||||
} );
|
||||
},
|
||||
|
||||
editEmployeehour: function () {
|
||||
dbo.employeehoursModel.saveEmployeehours( this );
|
||||
this.inEdit( !this.inEdit() );
|
||||
},
|
||||
|
||||
changeEmployee: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
this.projects( vm.setEmployeeProjects( this ) );
|
||||
|
||||
this.projectID( null );
|
||||
|
||||
vm.saveEmployeehours( this );
|
||||
},
|
||||
|
||||
removeEmployeehour: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
var self = this;
|
||||
@@ -103,7 +130,7 @@ dbo.employeehoursInit = function () {
|
||||
modalClass: 'modal-warning'
|
||||
}, function ( response ) {
|
||||
if ( response ) {
|
||||
dbo.employeehoursDataService.removeEmployeehour( self.id, function ( data ) {
|
||||
dbo.employeehoursDataService.removeEmployeehour( self.id(), function ( data ) {
|
||||
if ( data.result ) {
|
||||
vm.refreshEmployeehours();
|
||||
} else {
|
||||
@@ -118,58 +145,73 @@ dbo.employeehoursInit = function () {
|
||||
} );
|
||||
},
|
||||
|
||||
createMonths: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
|
||||
var months = [
|
||||
{id: 1, monthName: 'januari'},
|
||||
{id: 2, monthName: 'februari'},
|
||||
{id: 3, monthName: 'maart'},
|
||||
{id: 4, monthName: 'april'},
|
||||
{id: 5, monthName: 'mei'},
|
||||
{id: 6, monthName: 'juni'},
|
||||
{id: 7, monthName: 'juli'},
|
||||
{id: 8, monthName: 'augustus'},
|
||||
{id: 9, monthName: 'september'},
|
||||
{id: 10, monthName: 'oktober'},
|
||||
{id: 11, monthName: 'november'},
|
||||
{id: 12, monthName: 'december'},
|
||||
]
|
||||
|
||||
vm.months( months );
|
||||
},
|
||||
|
||||
createYears: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
var years = [{id: 2015}, {id: 2016}, {id: 2017}, {id: 2018}];
|
||||
|
||||
vm.years( years );
|
||||
},
|
||||
|
||||
refreshEmployeehours: function () {
|
||||
var vm = dbo.employeehoursModel;
|
||||
|
||||
var employeeID = vm.selectedEmployeeID() || 0;
|
||||
|
||||
vm.employeehours.removeAll();
|
||||
dbo.employeehoursDataService.getEmployeehours( vm.selectedMonth(), vm.selectedYear(), function ( data ) {
|
||||
$.each( data, function ( i, p ) {
|
||||
vm.employeehours.push( new vm.Employeehour( p ) );
|
||||
dbo.employeehoursDataService.getEmployeehours(
|
||||
vm.selectedMonth(), vm.selectedYear(), employeeID, function ( data ) {
|
||||
$.each( data, function ( i, p ) {
|
||||
vm.employeehours.push( new vm.Employeehour( p ) );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
},
|
||||
|
||||
validateNumber: function ( field ) {
|
||||
this[field]( dbo.helpers.validateNumber( this[field](), true ) );
|
||||
},
|
||||
|
||||
Employee: function ( data ) {
|
||||
var vm = dbo.employeehoursModel;
|
||||
var self = this;
|
||||
|
||||
self.id = data.id;
|
||||
self.fullname = data.fullname;
|
||||
|
||||
self.projecten = ko.observableArray( [] );
|
||||
_.each( data.projectemployees, function ( p ) {
|
||||
self.projecten.push( new vm.Project( p ) );
|
||||
} );
|
||||
},
|
||||
|
||||
Project: function ( data ) {
|
||||
this.projectEmployeeID = data.id;
|
||||
this.projectID = data.project.id;
|
||||
this.project = data.project.projectnumber + ' - ' + data.project.projectname;
|
||||
},
|
||||
|
||||
Employeehour: function ( data ) {
|
||||
var vm = dbo.employeehoursModel;
|
||||
var self = this;
|
||||
|
||||
this.id = data.id;
|
||||
this.employee_id = ko.observable( data.employee_id );
|
||||
this.hourtype_id = ko.observable( data.hourtype_id );
|
||||
this.hourdate = ko.observable( data.hourdate );
|
||||
this.hours = ko.observable( data.hours );
|
||||
this.inEdit = ko.observable( data.inEdit || false );
|
||||
self.id = ko.observable( data.id );
|
||||
self.employee_id = ko.observable( data.employee_id );
|
||||
self.hourtype_id = ko.observable( data.hourtype_id );
|
||||
self.hourdate = ko.observable( data.hourdate );
|
||||
self.hours = ko.observable( data.hours );
|
||||
self.inEdit = ko.observable( data.inEdit || false );
|
||||
self.projectID = ko.observable( data.project_id );
|
||||
self.hourType = ko.pureComputed( function () {
|
||||
return dbo.helpers.findArrayElement( 'id', 'key', this.hourtype_id(), vm.hourtypes() );
|
||||
}, this );
|
||||
|
||||
vm.setEmployeeProjects( self );
|
||||
},
|
||||
|
||||
setEmployeeProjects: function ( self ) {
|
||||
var vm = dbo.employeehoursModel;
|
||||
|
||||
var employeeProjects =
|
||||
dbo.helpers.findArrayElement( 'id', 'projecten', self.employee_id(), vm.employees() )();
|
||||
self.projects = ko.observableArray( [] );
|
||||
_.each( employeeProjects, function ( p ) {
|
||||
self.projects.push( {
|
||||
projectID : p.projectID,
|
||||
projectname: p.project
|
||||
} );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,9 +24,11 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
recap : ko.observableArray( [] ),
|
||||
totalPerEmployee : ko.observableArray( [] ),
|
||||
totalEmployeeRevenues : ko.observable(),
|
||||
totalAvailableRevenues : ko.observable(),
|
||||
totalEmployeeHours : ko.observable(),
|
||||
totalEmployeeAvailableHours: ko.observable(),
|
||||
totalBudget : ko.observable(),
|
||||
totalOwnRevenue : ko.observable(),
|
||||
totalCosts : ko.observable(),
|
||||
totalAvailableBudget : ko.observable(),
|
||||
totalSaldo : ko.observable(),
|
||||
@@ -37,12 +39,8 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
var vm = dbo.monthlyEmployeeHoursModel;
|
||||
|
||||
dbo.reportsDataService.getUsedYears( function ( data ) {
|
||||
vm.years.removeAll();
|
||||
$.each( data, function ( i, p ) {
|
||||
vm.years.push( {id: p.year, year: p.year} );
|
||||
} );
|
||||
|
||||
vm.selectedYear( (new Date()).getFullYear() );
|
||||
vm.years( dbo.years )
|
||||
vm.selectedYear( dbo.currentYear );
|
||||
} );
|
||||
|
||||
vm.initModule();
|
||||
@@ -51,11 +49,13 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
initModule: function () {
|
||||
var vm = dbo.monthlyEmployeeHoursModel;
|
||||
vm.totalBudget( 0 );
|
||||
vm.totalOwnRevenue( 0 );
|
||||
vm.totalCosts( 0 );
|
||||
vm.totalAvailableBudget( 0 );
|
||||
vm.totalSaldo( 0 );
|
||||
vm.totalWorkInProgress( 0 );
|
||||
vm.totalEmployeeRevenues( 0 );
|
||||
vm.totalAvailableRevenues(0)
|
||||
vm.totalEmployeeHours( 0 );
|
||||
vm.totalEmployeeAvailableHours( 0 );
|
||||
vm.totalPerEmployee.removeAll();
|
||||
@@ -78,11 +78,13 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
vm.recap.push( new vm.Project( p ) )
|
||||
} );
|
||||
vm.totalBudget( dbo.helpers.thousandSeparator( vm.totalBudget() ) );
|
||||
vm.totalOwnRevenue( dbo.helpers.thousandSeparator( vm.totalOwnRevenue() ) );
|
||||
vm.totalCosts( dbo.helpers.thousandSeparator( vm.totalCosts() ) );
|
||||
vm.totalAvailableBudget( dbo.helpers.thousandSeparator( vm.totalAvailableBudget() ) );
|
||||
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.totalAvailableRevenues() ) );
|
||||
vm.totalEmployeeHours( dbo.helpers.thousandSeparator( vm.totalEmployeeHours() ) );
|
||||
_.each( vm.totalPerEmployee(), function ( p ) {
|
||||
p.totalRevenue( dbo.helpers.thousandSeparator( p.totalRevenue() ) );
|
||||
@@ -286,8 +288,10 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
self.revenues = dbo.helpers.thousandSeparator( data.budget );
|
||||
self.hours = data.hours;
|
||||
self.totalEmpoloyeeRevenues = 0;
|
||||
self.availableRevenue = data.own_revenue - data.projectEuros;
|
||||
self.externCosts = dbo.helpers.thousandSeparator( data.projectcosts );
|
||||
self.budget = dbo.helpers.thousandSeparator( data.budget );
|
||||
self.ownRevenue = dbo.helpers.thousandSeparator( data.own_revenue );
|
||||
self.budgetAvailable = dbo.helpers.thousandSeparator( data.budgetAvailable );
|
||||
self.saldo = dbo.helpers.thousandSeparator( data.saldo );
|
||||
|
||||
@@ -300,10 +304,12 @@ 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 ) );
|
||||
self.totalEmployeeRevenues = dbo.helpers.thousandSeparator( self.totalEmployeeRevenues );
|
||||
self.availableRevenue = dbo.helpers.thousandSeparator( self.availableRevenue );
|
||||
self.workInProgress = dbo.helpers.thousandSeparator( data.workInProgress );
|
||||
self.hoursAvailable = data.hoursAvailable;
|
||||
|
||||
@@ -319,8 +325,9 @@ dbo.monthlyemployeehoursInit = function () {
|
||||
var vm = dbo.monthlyEmployeeHoursModel;
|
||||
|
||||
vm.totalBudget( vm.totalBudget() + Number( data.budget ) );
|
||||
vm.totalOwnRevenue( vm.totalOwnRevenue() + Number( data.own_revenue ) );
|
||||
vm.totalCosts( vm.totalCosts() + Number( data.projectcosts ) );
|
||||
vm.totalAvailableBudget( vm.totalAvailableBudget() + Number( data.budgetAvailable ) );
|
||||
vm.totalAvailableBudget( vm.totalAvailableBudget() + Number( data.ownRevenueAvailable ) );
|
||||
vm.totalSaldo( vm.totalSaldo() + Number( data.saldo ) );
|
||||
vm.totalWorkInProgress( vm.totalWorkInProgress() + Number( data.workInProgress ) );
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ dbo.offersService = {
|
||||
this.acceptance_chance = data.acceptance_chance ? data.acceptance_chance : 0;
|
||||
this.own_revenue = data.own_revenue;
|
||||
this.other_revenue = data.other_revenue;
|
||||
this.costs = data.costs;
|
||||
this.archive = data.archive;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user