dashboard
This commit is contained in:
@@ -16,7 +16,7 @@ class MY_Controller extends CI_Controller {
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->version = '1.00.30';
|
||||
$this->version = '1.00.31';
|
||||
|
||||
$this->load->library( 'beheer/session/RetrieveUserSession' );
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@
|
||||
<span class="db-panel-label">Saldo inkomsten (excl btw):</span>
|
||||
<span class="db-panel-data"><strong data-bind="text:revenues"></strong></span>
|
||||
</h4>
|
||||
<h4>
|
||||
<span class="db-panel-label">Omzet lopend jaar (excl btw):</span>
|
||||
<span class="db-panel-data"><strong data-bind="text:revenueCurrentYear"></strong></span>
|
||||
</h4>
|
||||
<!-- <h4>-->
|
||||
<!-- <span class="db-panel-label">Omzet lopend jaar (excl btw):</span>-->
|
||||
<!-- <span class="db-panel-data"><strong data-bind="text:revenueCurrentYear"></strong></span>-->
|
||||
<!-- </h4>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,16 +44,19 @@ dbo.dashboardInit = function () {
|
||||
self.openInvoices(dbo.helpers.thousandSeparator(outstandings.openInvoices))
|
||||
self.toInvoice(dbo.helpers.thousandSeparator(outstandings.toInvoice))
|
||||
|
||||
self.revenues(dbo.helpers.thousandSeparator(outstandings.revenues))
|
||||
self.revenueCurrentYear(dbo.helpers.thousandSeparator(revCurYear))
|
||||
self.revenuesThisYear(dbo.helpers.thousandSeparator(data.revenuesThisYear))
|
||||
})
|
||||
dbo.reservationsDataservice.getReservations(function(data){
|
||||
var openCosts = 0
|
||||
$.each(data, function(i,p){
|
||||
openCosts += Number(p.other_revenue) - Number(p.payed);
|
||||
dbo.reservationsDataservice.getReservations(function (data) {
|
||||
var openCosts = 0
|
||||
$.each(data, function (i, p) {
|
||||
openCosts += Number(p.other_revenue) - Number(p.payed)
|
||||
})
|
||||
self.openCosts(dbo.helpers.thousandSeparator(openCosts))
|
||||
|
||||
var revenues = outstandings.openInvoices + outstandings.toInvoice - openCosts
|
||||
revenues = Math.round(revenues / 1.21)
|
||||
self.revenues(dbo.helpers.thousandSeparator(revenues))
|
||||
})
|
||||
self.openCosts(dbo.helpers.thousandSeparator(openCosts))
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user