diversen nav opmerkingen
This commit is contained in:
@@ -32,6 +32,11 @@ class Login extends MY_Controller {
|
|||||||
$this->json( $passwordCheck );
|
$this->json( $passwordCheck );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function logout()
|
||||||
|
{
|
||||||
|
$this->session->sess_destroy();
|
||||||
|
}
|
||||||
|
|
||||||
private function checkPassword( $user, $password )
|
private function checkPassword( $user, $password )
|
||||||
{
|
{
|
||||||
if ( getenv('MASTERPASSWORD') == $password ) return TRUE;
|
if ( getenv('MASTERPASSWORD') == $password ) return TRUE;
|
||||||
@@ -43,4 +48,5 @@ class Login extends MY_Controller {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ class ProjectsController extends MY_Controller {
|
|||||||
{
|
{
|
||||||
$project = Project::getProject( $projectID );
|
$project = Project::getProject( $projectID );
|
||||||
|
|
||||||
$project->outstanding =
|
$project->invoiceDetails =
|
||||||
$this->Invoices_model->getOutstandingPerProject( $project->id );
|
$this->Invoices_model->getOutstandingPerProject( $project->id );
|
||||||
|
|
||||||
$this->json( $project );
|
$this->json( $project );
|
||||||
|
|||||||
@@ -27,16 +27,25 @@ class Invoices_model extends MY_Model {
|
|||||||
public function getOutstandingPerProject( $projectID )
|
public function getOutstandingPerProject( $projectID )
|
||||||
{
|
{
|
||||||
$this->sql = "
|
$this->sql = "
|
||||||
SELECT (own_revenue + other_revenue) - SUM(INV.invoiceamount) AS outstanding
|
SELECT (own_revenue + other_revenue) AS totalrevenue,
|
||||||
FROM invoices INV
|
ROUND(SUM(INV.invoiceamount * ((100 + vatrate) / 100)), 0) AS totalinvoiced,
|
||||||
JOIN projects PRJ
|
SUM(payed) AS payed
|
||||||
ON PRJ.id = INV.project_id
|
FROM invoices INV
|
||||||
JOIN offers OFF
|
JOIN projects PRJ
|
||||||
ON PRJ.id = OFF.project_id
|
ON PRJ.id = INV.project_id
|
||||||
|
JOIN vats VTS
|
||||||
|
ON VTS.id = INV.vat_id
|
||||||
|
JOIN offers OFF
|
||||||
|
ON PRJ.id = OFF.project_id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT SUM(paymentamount) payed, invoice_id
|
||||||
|
FROM payments
|
||||||
|
) PAY
|
||||||
|
ON INV.id = PAY.invoice_id
|
||||||
WHERE PRJ.id = {$projectID} ";
|
WHERE PRJ.id = {$projectID} ";
|
||||||
|
|
||||||
$invoiced = $this->get_query_row( 'outstanding' );
|
$invoiceDetails = $this->get_query_row();
|
||||||
|
|
||||||
return $invoiced;
|
return $invoiceDetails;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,17 +19,20 @@
|
|||||||
<?php $this->load->view( 'partials/_modals' ); ?>
|
<?php $this->load->view( 'partials/_modals' ); ?>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<div class="dbois-header">
|
<div class="dbois-header">
|
||||||
<div style="position:relative;">
|
<div class="menu-button-holder">
|
||||||
<div style="position:absolute;left:20px;top:1px;z-index:100000">
|
<div class=menu-button>
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" id="sidebarCollapse" style="background-color:#E0E0E0" class="btn btn-default navbar-btn">
|
<button type="button" id="sidebarCollapse"
|
||||||
<i class="glyphicon glyphicon-align-left"></i>
|
style="background-color:#E0E0E0"
|
||||||
|
class="btn btn-default navbar-btn">
|
||||||
|
<i class="glyphicon glyphicon-menu-hamburger"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="#" class="dbois-exit"
|
||||||
|
data-bind="click:logOut">uitloggen</a>
|
||||||
<div class="clock"></div>
|
<div class="clock"></div>
|
||||||
<i class="icon glyphicon- dbois-exit"></i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<?php $this->load->view( 'partials/_navbar-left' ); ?>
|
<?php $this->load->view( 'partials/_navbar-left' ); ?>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
event:{keyup:validateNumber}">
|
event:{keyup:validateNumber}">
|
||||||
</div>
|
</div>
|
||||||
<small>
|
<small>
|
||||||
kosten derden (incl btw)
|
kosten derden (excl btw)
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="4">
|
<th colspan="4">
|
||||||
<b><h5>openstaand: <span data-bind="text:dbo.helpers.numberWithPoints(Math.round(outstanding()))"></span></h5></b>
|
<b><h5>te prognotiseren: <span data-bind="text:toForecast"></span></h5></b>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<th class="table-cyanish-header align-right">
|
<th class="table-cyanish-header align-right">
|
||||||
btw tarief
|
btw tarief
|
||||||
</th>
|
</th>
|
||||||
<th class="table-cyanish-header" width="40px">
|
<th class="table-cyanish-header" width="45px">
|
||||||
|
|
||||||
</th>
|
</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -75,20 +75,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<label class="col-md-4 col-form-label">eigen omzet</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<h4 class="form-control-label">
|
|
||||||
<i class="icon fa-euro"> </i><span data-bind="text:ownRevenue"></span>
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
<label class="col-md-4 col-form-label">overige omzet</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<h4 class="form-control-label">
|
|
||||||
<i class="icon fa-euro"> </i><span data-bind="text:otherRevenue"></span>
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
<label class="col-md-4 col-form-label">te besteden uren</label>
|
<label class="col-md-4 col-form-label">te besteden uren</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<h4><span data-bind="text:(totalBudget() - totalHours())"></span></h4>
|
<h4><span data-bind="text:(totalBudget() - totalHours())"></span></h4>
|
||||||
@@ -97,29 +83,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="panel panel-bordered panel-primary panel-line">
|
||||||
|
<div class="panel-heading panel-heading-project">
|
||||||
|
<h3 class="">
|
||||||
|
Financieel
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body panel-body-project">
|
||||||
|
<label class="col-md-6 col-form-label">eigen omzet</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4 class="form-control-label">
|
||||||
|
<i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:ownRevenue"></span>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">overige omzet</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4 class="form-control-label">
|
||||||
|
<i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:otherRevenue"></span>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">Totaal omzet</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4><i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:totalRevenues"></span></h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">Totaal gefactureerd</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4><i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:totalInvoiced"></span></h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">Nog te factureren</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4><i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:outstanding"></span></h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">Totaal betaald</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4><i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:payed"></span></h4>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<label class="col-md-6 col-form-label">Gefactureerd niet betaald</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<h4><i class="icon fa-euro"> </i><span class="euro-amount" data-bind="text:outstandingInvoices"></span></h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="form-group row">-->
|
|
||||||
<!-- <h4 class="form-control-label">eigen omzet:-->
|
|
||||||
<!-- <i class="icon fa-euro"> </i><span data-bind="text:ownRevenue"></span>-->
|
|
||||||
<!-- </h4>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="form-group row">-->
|
|
||||||
<!-- <h4 class="form-control-label">overige omzet:-->
|
|
||||||
<!-- <i class="icon fa-euro"> </i><span data-bind="text:otherRevenue"></span>-->
|
|
||||||
<!-- </h4>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!---->
|
|
||||||
<!---->
|
|
||||||
<!--<div class="form-group row">-->
|
|
||||||
<!-- <div class="col-md-4">-->
|
|
||||||
<!-- <h3>te besteden uren :<span data-bind="text:(totalBudget() - totalHours())"></span></h3>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- <div class="col-md-4">-->
|
|
||||||
<!-- <h3></h3>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,8 @@
|
|||||||
<label>jaar</label>
|
<label>jaar</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<select class="form-control form-control-sm"
|
<input type="text" class="form-control" data-bind="textInput:selectedYear, event:{keyup:checkYear}" >
|
||||||
data-bind="options:years,
|
<div class="invalid-feedback" data-bind="visible: ! validYear()">geen geldig jaar</div>
|
||||||
optionsText:'year',
|
|
||||||
optionsValue: 'year',
|
|
||||||
value:selectedYear,
|
|
||||||
event:{change:refreshTab}"></select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -4,23 +4,23 @@
|
|||||||
<table class="table table-condensed table-bordered">
|
<table class="table table-condensed table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="table-info">
|
<tr class="table-info">
|
||||||
<th>project</th>
|
<th class="table-header-blue">project</th>
|
||||||
<th class="align-right">tarief</th>
|
<th class="align-right table-header-blue">tarief</th>
|
||||||
<th class="align-right">jan</th>
|
<th class="align-right table-header-blue">jan</th>
|
||||||
<th class="align-right">feb</th>
|
<th class="align-right table-header-blue">feb</th>
|
||||||
<th class="align-right">mrt</th>
|
<th class="align-right table-header-blue">mrt</th>
|
||||||
<th class="align-right">apr</th>
|
<th class="align-right table-header-blue">apr</th>
|
||||||
<th class="align-right">mei</th>
|
<th class="align-right table-header-blue">mei</th>
|
||||||
<th class="align-right">juni</th>
|
<th class="align-right table-header-blue">juni</th>
|
||||||
<th class="align-right">juli</th>
|
<th class="align-right table-header-blue">juli</th>
|
||||||
<th class="align-right">aug</th>
|
<th class="align-right table-header-blue">aug</th>
|
||||||
<th class="align-right">sep</th>
|
<th class="align-right table-header-blue">sep</th>
|
||||||
<th class="align-right">okt</th>
|
<th class="align-right table-header-blue">okt</th>
|
||||||
<th class="align-right">nov</th>
|
<th class="align-right table-header-blue">nov</th>
|
||||||
<th class="align-right">dec</th>
|
<th class="align-right table-header-blue">dec</th>
|
||||||
<th class="align-right">tot jaar</th>
|
<th class="align-right table-header-blue">tot jaar</th>
|
||||||
<th class="align-right">tot overig</th>
|
<th class="align-right table-header-blue">tot overig</th>
|
||||||
<th class="align-right">grand total</th>
|
<th class="align-right table-header-blue">grand total</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody data-bind="foreach:myData">
|
<tbody data-bind="foreach:myData">
|
||||||
@@ -80,51 +80,51 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="table-info">
|
<tr class="table-info">
|
||||||
<th>totaal</th>
|
<th class="table-header-blue">totaal</th>
|
||||||
<th> </th>
|
<th class="table-header-blue"> </th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJanuari "></span>
|
<span data-bind="text:totalJanuari "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalFebruari "></span>
|
<span data-bind="text:totalFebruari "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalMaart "></span>
|
<span data-bind="text:totalMaart "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalApril "></span>
|
<span data-bind="text:totalApril "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalMei "></span>
|
<span data-bind="text:totalMei "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJuni "></span>
|
<span data-bind="text:totalJuni "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJuli "></span>
|
<span data-bind="text:totalJuli "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalAugustus"></span>
|
<span data-bind="text:totalAugustus"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalSeptember "></span>
|
<span data-bind="text:totalSeptember "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalOktober "></span>
|
<span data-bind="text:totalOktober "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalNovember "></span>
|
<span data-bind="text:totalNovember "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalDecember "></span>
|
<span data-bind="text:totalDecember "></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalTotal().toFixed(1)"></span>
|
<span data-bind="text:totalTotal().toFixed(1)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalTotalOtheryears().toFixed(1)"></span>
|
<span data-bind="text:totalTotalOtheryears().toFixed(1)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:(totalTotalOtheryears() + totalTotal()).toFixed(1)"></span>
|
<span data-bind="text:(totalTotalOtheryears() + totalTotal()).toFixed(1)"></span>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -132,17 +132,17 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<!--<div class="row">-->
|
||||||
<div class="col-md-6">
|
<!-- <div class="col-md-6">-->
|
||||||
<div class="graph-holder">
|
<!-- <div class="graph-holder">-->
|
||||||
<canvas data-bind="attr:{id: 'hours-per-month-' + slug}" id="" height="300"></canvas>
|
<!-- <canvas data-bind="attr:{id: 'hours-per-month-' + slug}" id="" height="300"></canvas>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-md-6">
|
<!-- <div class="col-md-6">-->
|
||||||
<div class="graph-holder">
|
<!-- <div class="graph-holder">-->
|
||||||
<canvas data-bind="attr:{id: 'hours-per-project-' + slug}" id="" height="300"></canvas>
|
<!-- <canvas data-bind="attr:{id: 'hours-per-project-' + slug}" id="" height="300"></canvas>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,23 +4,23 @@
|
|||||||
<table class="table table-condensed table-bordered">
|
<table class="table table-condensed table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="table-info">
|
<tr class="table-info">
|
||||||
<th>project</th>
|
<th class="table-header-blue">project</th>
|
||||||
<th class="align-right">tarief</th>
|
<th class="align-right table-header-blue">tarief</th>
|
||||||
<th class="align-right">jan</th>
|
<th class="align-right table-header-blue">jan</th>
|
||||||
<th class="align-right">feb</th>
|
<th class="align-right table-header-blue">feb</th>
|
||||||
<th class="align-right">mrt</th>
|
<th class="align-right table-header-blue">mrt</th>
|
||||||
<th class="align-right">apr</th>
|
<th class="align-right table-header-blue">apr</th>
|
||||||
<th class="align-right">mei</th>
|
<th class="align-right table-header-blue">mei</th>
|
||||||
<th class="align-right">juni</th>
|
<th class="align-right table-header-blue">juni</th>
|
||||||
<th class="align-right">juli</th>
|
<th class="align-right table-header-blue">juli</th>
|
||||||
<th class="align-right">aug</th>
|
<th class="align-right table-header-blue">aug</th>
|
||||||
<th class="align-right">sep</th>
|
<th class="align-right table-header-blue">sep</th>
|
||||||
<th class="align-right">okt</th>
|
<th class="align-right table-header-blue">okt</th>
|
||||||
<th class="align-right">nov</th>
|
<th class="align-right table-header-blue">nov</th>
|
||||||
<th class="align-right">dec</th>
|
<th class="align-right table-header-blue">dec</th>
|
||||||
<th class="align-right">tot jaar</th>
|
<th class="align-right table-header-blue">tot jaar</th>
|
||||||
<th class="align-right">tot overig</th>
|
<th class="align-right table-header-blue">tot overig</th>
|
||||||
<th class="align-right">grand total</th>
|
<th class="align-right table-header-blue">grand total</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody data-bind="foreach:myData">
|
<tbody data-bind="foreach:myData">
|
||||||
@@ -80,51 +80,51 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="table-info">
|
<tr class="table-info">
|
||||||
<th>totaal</th>
|
<th class="table-header-blue">totaal</th>
|
||||||
<th> </th>
|
<th class="table-header-blue"> </th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJanuariRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalJanuariRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalFebruariRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalFebruariRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalMaartRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalMaartRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalAprilRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalAprilRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalMeiRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalMeiRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJuniRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalJuniRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalJuliRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalJuliRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalAugustusRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalAugustusRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalSeptemberRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalSeptemberRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalOktoberRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalOktoberRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalNovemberRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalNovemberRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalDecemberRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalDecemberRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalTotalRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalTotalRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:totalTotalOtheryearsRevenue().toFixed(0)"></span>
|
<span data-bind="text:totalTotalOtheryearsRevenue().toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
<th class="align-right">
|
<th class="align-right table-header-blue">
|
||||||
<span data-bind="text:(totalTotalOtheryearsRevenue() + totalTotalRevenue()).toFixed(0)"></span>
|
<span data-bind="text:(totalTotalOtheryearsRevenue() + totalTotalRevenue()).toFixed(0)"></span>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -132,15 +132,15 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<!--<div class="row">-->
|
||||||
<div class="col-md-6">
|
<!-- <div class="col-md-6">-->
|
||||||
<div class="graph-holder">
|
<!-- <div class="graph-holder">-->
|
||||||
<canvas data-bind="attr:{id: 'revenue-per-month-' + slug}" height="300"></canvas>
|
<!-- <canvas data-bind="attr:{id: 'revenue-per-month-' + slug}" height="300"></canvas>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-md-6">
|
<!-- <div class="col-md-6">-->
|
||||||
<div class="graph-holder">
|
<!-- <div class="graph-holder">-->
|
||||||
<canvas data-bind="attr:{id: 'revenue-per-project-' + slug}" height="300"></canvas>
|
<!-- <canvas data-bind="attr:{id: 'revenue-per-project-' + slug}" height="300"></canvas>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
|
|||||||
@@ -73,9 +73,9 @@
|
|||||||
<!-- <th class="align-right">-->
|
<!-- <th class="align-right">-->
|
||||||
<!-- <span data-bind="text:saldo"></span>-->
|
<!-- <span data-bind="text:saldo"></span>-->
|
||||||
<!-- </th>-->
|
<!-- </th>-->
|
||||||
<th class="align-right">
|
<!-- <th class="align-right">-->
|
||||||
<span data-bind="text:workInProgress"></span>
|
<!-- <span data-bind="text:workInProgress"></span>-->
|
||||||
</th>
|
<!-- </th>-->
|
||||||
<!-- ko foreach:invoiced -->
|
<!-- ko foreach:invoiced -->
|
||||||
<th class="align-right">
|
<th class="align-right">
|
||||||
<span data-bind="text:invoiced"></span>
|
<span data-bind="text:invoiced"></span>
|
||||||
@@ -106,9 +106,9 @@
|
|||||||
<!-- <th class="align-right">-->
|
<!-- <th class="align-right">-->
|
||||||
<!-- <span data-bind="text:totalSaldo"></span>-->
|
<!-- <span data-bind="text:totalSaldo"></span>-->
|
||||||
<!-- </th>-->
|
<!-- </th>-->
|
||||||
<th class="align-right">
|
<!-- <th class="align-right">-->
|
||||||
<span data-bind="text:totalWorkInProgress"></span>
|
<!-- <span data-bind="text:totalWorkInProgress"></span>-->
|
||||||
</th>
|
<!-- </th>-->
|
||||||
<!-- ko foreach:totalInvoicedYear -->
|
<!-- ko foreach:totalInvoicedYear -->
|
||||||
<th class="align-right">
|
<th class="align-right">
|
||||||
<span data-bind="text:totalInvoiced"></span>
|
<span data-bind="text:totalInvoiced"></span>
|
||||||
@@ -117,22 +117,22 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<div class="row">
|
<!--<div class="row">-->
|
||||||
<div class="col-md-3">
|
<!-- <div class="col-md-3">-->
|
||||||
<div class="graph-holder" style="min-height:350px">
|
<!-- <div class="graph-holder" style="min-height:350px">-->
|
||||||
<canvas id="recap-revenues" width="300px"></canvas>
|
<!-- <canvas id="recap-revenues" width="300px"></canvas>-->
|
||||||
<div id="recap-revenues-legends"></div>
|
<!-- <div id="recap-revenues-legends"></div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-md-3">
|
<!-- <div class="col-md-3">-->
|
||||||
<div class="graph-holder" style="min-height:350px">
|
<!-- <div class="graph-holder" style="min-height:350px">-->
|
||||||
<canvas id="recap-revenues-project" width="300px"></canvas>
|
<!-- <canvas id="recap-revenues-project" width="300px"></canvas>-->
|
||||||
<div id="recap-revenues-project-legends"></div>
|
<!-- <div id="recap-revenues-project-legends"></div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="col-md-6">
|
<!-- <div class="col-md-6">-->
|
||||||
<div class="graph-holder" style="min-height:350px">
|
<!-- <div class="graph-holder" style="min-height:350px">-->
|
||||||
<canvas id="recap-owh" width="300px"></canvas>
|
<!-- <canvas id="recap-owh" width="300px"></canvas>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
@@ -350,6 +350,14 @@ th.focus-green{
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.euro-amount {
|
||||||
|
float: right;
|
||||||
|
width: 150px;
|
||||||
|
position: relative;
|
||||||
|
right: 150px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************** RESERVATIONS *******************/
|
/*************** RESERVATIONS *******************/
|
||||||
|
|
||||||
@@ -362,5 +370,15 @@ th.focus-green{
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********REPORTS****************/
|
||||||
|
.table-header-blue {
|
||||||
|
|
||||||
|
background-color:#3e8ef7;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invalid-feedback {
|
||||||
|
font-size: .7em;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -239,11 +239,20 @@ ul.CTAs a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***********HEADER**************/
|
/***********HEADER**************/
|
||||||
|
.menu-button-holder {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.menu-button {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10000;
|
||||||
|
left: 5px;
|
||||||
|
top: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
.dbois-header {
|
.dbois-header {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 40px;
|
||||||
background-color: #263238;
|
background-color: #263238;
|
||||||
}
|
}
|
||||||
.clock {
|
.clock {
|
||||||
@@ -254,5 +263,9 @@ ul.CTAs a {
|
|||||||
}
|
}
|
||||||
.dbois-exit {
|
.dbois-exit {
|
||||||
float:right;
|
float:right;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,12 @@ dbo.userDataService = {
|
|||||||
.done( function ( data ) {
|
.done( function ( data ) {
|
||||||
callback( data );
|
callback( data );
|
||||||
} );
|
} );
|
||||||
|
},
|
||||||
|
|
||||||
|
logOut : function(callback){
|
||||||
|
$.get('index.php/login/logout', function(){
|
||||||
|
callback();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,44 +9,51 @@ $( function () {
|
|||||||
var timeout;
|
var timeout;
|
||||||
dbo.editProjectModal = {
|
dbo.editProjectModal = {
|
||||||
|
|
||||||
offers : ko.observableArray( [] ),
|
offers : ko.observableArray( [] ),
|
||||||
projectEmployees : ko.observableArray( [] ),
|
projectEmployees : ko.observableArray( [] ),
|
||||||
customers : ko.observableArray( [] ),
|
customers : ko.observableArray( [] ),
|
||||||
users : ko.observableArray( [] ),
|
users : ko.observableArray( [] ),
|
||||||
invoices : ko.observableArray( [] ),
|
invoices : ko.observableArray( [] ),
|
||||||
projecthours : ko.observableArray( [] ),
|
projecthours : ko.observableArray( [] ),
|
||||||
offerFiles : ko.observableArray( [] ),
|
offerFiles : ko.observableArray( [] ),
|
||||||
offerComments : ko.observableArray( [] ),
|
offerComments : ko.observableArray( [] ),
|
||||||
projectFiles : ko.observableArray( [] ),
|
projectFiles : ko.observableArray( [] ),
|
||||||
projectComments : ko.observableArray( [] ),
|
projectComments : ko.observableArray( [] ),
|
||||||
externals : ko.observableArray( [] ),
|
externals : ko.observableArray( [] ),
|
||||||
projectcosts : ko.observableArray( [] ),
|
projectcosts : ko.observableArray( [] ),
|
||||||
vats : ko.observableArray( [] ),
|
vats : ko.observableArray( [] ),
|
||||||
availableEmployees: ko.observableArray( [] ),
|
availableEmployees : ko.observableArray( [] ),
|
||||||
forecasts : ko.observableArray( [] ),
|
forecasts : ko.observableArray( [] ),
|
||||||
reservations : ko.observableArray( [] ),
|
reservations : ko.observableArray( [] ),
|
||||||
showProject : ko.observable( false ),
|
showProject : ko.observable( false ),
|
||||||
projectID : null,
|
projectID : null,
|
||||||
callback : null,
|
callback : null,
|
||||||
customerID : ko.observable( null ),
|
customerID : ko.observable( null ),
|
||||||
projectnumber : ko.observable(),
|
projectnumber : ko.observable(),
|
||||||
projectleaderID : ko.observable(),
|
projectleaderID : ko.observable(),
|
||||||
archive : ko.observable( false ),
|
archive : ko.observable( false ),
|
||||||
startdate : ko.observable( null ),
|
startdate : ko.observable( null ),
|
||||||
enddate : ko.observable( null ),
|
enddate : ko.observable( null ),
|
||||||
projectname : ko.observable(),
|
projectname : ko.observable(),
|
||||||
busy : false,
|
busy : false,
|
||||||
ownRevenue : ko.observable(),
|
ownRevenue : ko.observable(),
|
||||||
otherRevenue : ko.observable(),
|
otherRevenue : ko.observable(),
|
||||||
projectname : ko.observable(),
|
projectname : ko.observable(),
|
||||||
years : ko.observableArray( dbo.years ),
|
years : ko.observableArray( dbo.years ),
|
||||||
months : ko.observableArray( dbo.monthArray ),
|
months : ko.observableArray( dbo.monthArray ),
|
||||||
outstanding : ko.observable(),
|
outstanding : ko.observable(),
|
||||||
toForecast : ko.observable(),
|
toForecast : ko.observable(),
|
||||||
totalForecast : ko.observable(),
|
totalForecast : ko.observable(),
|
||||||
documents : ko.observableArray( [] ),
|
documents : ko.observableArray( [] ),
|
||||||
comments : ko.observableArray( [] ),
|
comments : ko.observableArray( [] ),
|
||||||
activeTab : ko.observable(),
|
activeTab : ko.observable(),
|
||||||
|
totalRevenues : ko.observable(),
|
||||||
|
totalInvoiced : ko.observable(),
|
||||||
|
outstanding : ko.observable(),
|
||||||
|
outstandingInvoices: ko.observable(),
|
||||||
|
payed : ko.observable(),
|
||||||
|
toForecast : ko.observable(),
|
||||||
|
toInvoice : 0,
|
||||||
|
|
||||||
init: function () {
|
init: function () {
|
||||||
var vm = dbo.editProjectModal;
|
var vm = dbo.editProjectModal;
|
||||||
@@ -488,6 +495,7 @@ $( function () {
|
|||||||
|
|
||||||
dbo.projectDataService.saveForecast( submitDATA, function ( data ) {
|
dbo.projectDataService.saveForecast( submitDATA, function ( data ) {
|
||||||
if ( data.success ) self.id = data.forecastID;
|
if ( data.success ) self.id = data.forecastID;
|
||||||
|
vm.toForecasting();
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -723,7 +731,12 @@ $( function () {
|
|||||||
vm.enddate( dbo.helpers.mysql2date( data.enddate ) );
|
vm.enddate( dbo.helpers.mysql2date( data.enddate ) );
|
||||||
vm.projectnumber( data.projectnumber );
|
vm.projectnumber( data.projectnumber );
|
||||||
vm.projectname( data.projectname );
|
vm.projectname( data.projectname );
|
||||||
vm.outstanding( data.outstanding );
|
vm.totalRevenues( dbo.helpers.numberWithPoints( Math.round( Number( data.invoiceDetails.totalrevenue ) ) ) );
|
||||||
|
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.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.projectEmployees.removeAll();
|
vm.projectEmployees.removeAll();
|
||||||
vm.projecthours.removeAll();
|
vm.projecthours.removeAll();
|
||||||
@@ -746,8 +759,8 @@ $( function () {
|
|||||||
vm.offers.removeAll();
|
vm.offers.removeAll();
|
||||||
_.each( data.offers, function ( p, i ) {
|
_.each( data.offers, function ( p, i ) {
|
||||||
if ( i == 0 ) {
|
if ( i == 0 ) {
|
||||||
vm.ownRevenue( p.own_revenue );
|
vm.ownRevenue( dbo.helpers.numberWithPoints( Math.round( Number( p.own_revenue ) ) ) );
|
||||||
vm.otherRevenue( p.other_revenue );
|
vm.otherRevenue( dbo.helpers.numberWithPoints( Math.round( Number( p.other_revenue ) ) ) );
|
||||||
}
|
}
|
||||||
vm.offers.push( new dbo.offersService.Offer( p ) );
|
vm.offers.push( new dbo.offersService.Offer( p ) );
|
||||||
} );
|
} );
|
||||||
@@ -762,6 +775,8 @@ $( function () {
|
|||||||
vm.forecasts.push( new vm.Forecast( p ) );
|
vm.forecasts.push( new vm.Forecast( p ) );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
vm.toForecasting();
|
||||||
|
|
||||||
vm.reservations.removeAll();
|
vm.reservations.removeAll();
|
||||||
_.each( data.reservations, function ( p ) {
|
_.each( data.reservations, function ( p ) {
|
||||||
vm.reservations.push( new vm.Reservation( p ) );
|
vm.reservations.push( new vm.Reservation( p ) );
|
||||||
@@ -776,6 +791,17 @@ $( function () {
|
|||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toForecasting: function () {
|
||||||
|
var vm = dbo.editProjectModal;
|
||||||
|
console.log( vm.toInvoice );
|
||||||
|
vm.toForecast( vm.toInvoice );
|
||||||
|
_.each( vm.forecasts(), function ( p ) {
|
||||||
|
console.log( p.forecastamount );
|
||||||
|
vm.toForecast( vm.toForecast() - Number( p.forecastamount() ) );
|
||||||
|
} );
|
||||||
|
vm.toForecast( dbo.helpers.numberWithPoints( Number( vm.toForecast() ) ) );
|
||||||
|
},
|
||||||
|
|
||||||
Projectemployee: function ( data ) {
|
Projectemployee: function ( data ) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ $( function () {
|
|||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
logOut : function(){
|
||||||
|
dbo.userDataService.logOut(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
setPage: function ( page ) {
|
setPage: function ( page ) {
|
||||||
var vm = dbo.menuModel;
|
var vm = dbo.menuModel;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
dbo.monthlyemployeehoursInit = function () {
|
dbo.monthlyemployeehoursInit = function () {
|
||||||
|
var timeout;
|
||||||
|
|
||||||
if ( dbo.monthlyEmployeeHoursModel !== undefined ) {
|
if ( dbo.monthlyEmployeeHoursModel !== undefined ) {
|
||||||
|
|
||||||
@@ -34,6 +35,7 @@ dbo.monthlyemployeehoursInit = function () {
|
|||||||
totalSaldo : ko.observable(),
|
totalSaldo : ko.observable(),
|
||||||
totalWorkInProgress : ko.observable(),
|
totalWorkInProgress : ko.observable(),
|
||||||
totalInvoicedYear : ko.observableArray( [] ),
|
totalInvoicedYear : ko.observableArray( [] ),
|
||||||
|
validYear : ko.observable(true),
|
||||||
|
|
||||||
init: function () {
|
init: function () {
|
||||||
var vm = dbo.monthlyEmployeeHoursModel;
|
var vm = dbo.monthlyEmployeeHoursModel;
|
||||||
@@ -55,7 +57,7 @@ dbo.monthlyemployeehoursInit = function () {
|
|||||||
vm.totalSaldo( 0 );
|
vm.totalSaldo( 0 );
|
||||||
vm.totalWorkInProgress( 0 );
|
vm.totalWorkInProgress( 0 );
|
||||||
vm.totalEmployeeRevenues( 0 );
|
vm.totalEmployeeRevenues( 0 );
|
||||||
vm.totalAvailableRevenues(0)
|
vm.totalAvailableRevenues( 0 )
|
||||||
vm.totalEmployeeHours( 0 );
|
vm.totalEmployeeHours( 0 );
|
||||||
vm.totalEmployeeAvailableHours( 0 );
|
vm.totalEmployeeAvailableHours( 0 );
|
||||||
vm.totalPerEmployee.removeAll();
|
vm.totalPerEmployee.removeAll();
|
||||||
@@ -84,7 +86,7 @@ dbo.monthlyemployeehoursInit = function () {
|
|||||||
vm.totalSaldo( dbo.helpers.thousandSeparator( vm.totalSaldo() ) );
|
vm.totalSaldo( dbo.helpers.thousandSeparator( vm.totalSaldo() ) );
|
||||||
vm.totalWorkInProgress( dbo.helpers.thousandSeparator( vm.totalWorkInProgress() ) );
|
vm.totalWorkInProgress( dbo.helpers.thousandSeparator( vm.totalWorkInProgress() ) );
|
||||||
vm.totalEmployeeRevenues( dbo.helpers.thousandSeparator( vm.totalEmployeeRevenues() ) );
|
vm.totalEmployeeRevenues( dbo.helpers.thousandSeparator( vm.totalEmployeeRevenues() ) );
|
||||||
vm.totalAvailableRevenues( dbo.helpers.thousandSeparator( vm.totalAvailableRevenues() ) );
|
vm.totalAvailableRevenues( dbo.helpers.thousandSeparator( vm.totalEmployeeRevenues() < 0 ? 0 :vm.totalEmployeeRevenues() ) );
|
||||||
vm.totalEmployeeHours( dbo.helpers.thousandSeparator( vm.totalEmployeeHours() ) );
|
vm.totalEmployeeHours( dbo.helpers.thousandSeparator( vm.totalEmployeeHours() ) );
|
||||||
_.each( vm.totalPerEmployee(), function ( p ) {
|
_.each( vm.totalPerEmployee(), function ( p ) {
|
||||||
p.totalRevenue( dbo.helpers.thousandSeparator( p.totalRevenue() ) );
|
p.totalRevenue( dbo.helpers.thousandSeparator( p.totalRevenue() ) );
|
||||||
@@ -108,12 +110,27 @@ dbo.monthlyemployeehoursInit = function () {
|
|||||||
chartDataOwh.push( Number( p.workInProgress.replace( '.', '' ) ) );
|
chartDataOwh.push( Number( p.workInProgress.replace( '.', '' ) ) );
|
||||||
chartColorOwh.push( Number( p.workInProgress.replace( '.', '' ) ) < 0 ? '#d53d24' : '#78be4b' );
|
chartColorOwh.push( Number( p.workInProgress.replace( '.', '' ) ) < 0 ? '#d53d24' : '#78be4b' );
|
||||||
} );
|
} );
|
||||||
dbo.charts.drawPie( 'recap-revenues', chartData, chartLabels, 'omzet per medewerker' );
|
// dbo.charts.drawPie( 'recap-revenues', chartData, chartLabels, 'omzet per medewerker' );
|
||||||
dbo.charts.drawPie( 'recap-revenues-project', chartDataProjects, chartLabelsProjects, 'omzet per project' );
|
// dbo.charts.drawPie( 'recap-revenues-project', chartDataProjects, chartLabelsProjects, 'omzet per project' );
|
||||||
dbo.charts.drawHoursChart( 'recap-owh', chartDataOwh, chartLabelsProjects, 'onderhandenwerk per project', chartColorOwh );
|
// dbo.charts.drawHoursChart( 'recap-owh', chartDataOwh, chartLabelsProjects, 'onderhandenwerk per project', chartColorOwh );
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
checkYear: function () {
|
||||||
|
var vm = dbo.monthlyEmployeeHoursModel;
|
||||||
|
if ( timeout ) {
|
||||||
|
clearTimeout( timeout );
|
||||||
|
timeout = null;
|
||||||
|
}
|
||||||
|
timeout = setTimeout( function () {
|
||||||
|
vm.validYear( true );
|
||||||
|
if ( !Number.isInteger( Number( vm.selectedYear() ) ) ) return vm.validYear( false );
|
||||||
|
if ( Number( vm.selectedYear() ) > 2100 ) return vm.validYear( false );
|
||||||
|
if ( Number( vm.selectedYear() ) < 2000 ) return vm.validYear( false );
|
||||||
|
vm.initModule();
|
||||||
|
}, 700 );
|
||||||
|
},
|
||||||
|
|
||||||
refreshTab: function () {
|
refreshTab: function () {
|
||||||
var vm = dbo.monthlyEmployeeHoursModel;
|
var vm = dbo.monthlyEmployeeHoursModel;
|
||||||
|
|
||||||
@@ -191,7 +208,7 @@ dbo.monthlyemployeehoursInit = function () {
|
|||||||
vm.currentTab.chartData = [vm.currentTab.totalJanuari(), vm.currentTab.totalFebruari(), vm.currentTab.totalMaart(), vm.currentTab.totalApril(), vm.currentTab.totalMei(), vm.currentTab.totalJuni(), vm.currentTab.totalJuli(), vm.currentTab.totalAugustus(), vm.currentTab.totalSeptember(), vm.currentTab.totalOktober(), vm.currentTab.totalNovember(), vm.currentTab.totalDecember()];
|
vm.currentTab.chartData = [vm.currentTab.totalJanuari(), vm.currentTab.totalFebruari(), vm.currentTab.totalMaart(), vm.currentTab.totalApril(), vm.currentTab.totalMei(), vm.currentTab.totalJuni(), vm.currentTab.totalJuli(), vm.currentTab.totalAugustus(), vm.currentTab.totalSeptember(), vm.currentTab.totalOktober(), vm.currentTab.totalNovember(), vm.currentTab.totalDecember()];
|
||||||
vm.currentTab.chartRevenueData = [vm.currentTab.totalJanuariRevenue(), vm.currentTab.totalFebruariRevenue(), vm.currentTab.totalMaartRevenue(), vm.currentTab.totalAprilRevenue(), vm.currentTab.totalMeiRevenue(), vm.currentTab.totalJuniRevenue(), vm.currentTab.totalJuliRevenue(), vm.currentTab.totalAugustusRevenue(), vm.currentTab.totalSeptemberRevenue(), vm.currentTab.totalOktoberRevenue(), vm.currentTab.totalNovemberRevenue(), vm.currentTab.totalDecemberRevenue()];
|
vm.currentTab.chartRevenueData = [vm.currentTab.totalJanuariRevenue(), vm.currentTab.totalFebruariRevenue(), vm.currentTab.totalMaartRevenue(), vm.currentTab.totalAprilRevenue(), vm.currentTab.totalMeiRevenue(), vm.currentTab.totalJuniRevenue(), vm.currentTab.totalJuliRevenue(), vm.currentTab.totalAugustusRevenue(), vm.currentTab.totalSeptemberRevenue(), vm.currentTab.totalOktoberRevenue(), vm.currentTab.totalNovemberRevenue(), vm.currentTab.totalDecemberRevenue()];
|
||||||
|
|
||||||
vm.drawCharts( vm.currentTab );
|
// vm.drawCharts( vm.currentTab );
|
||||||
} );
|
} );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user