dashboard

This commit is contained in:
2020-01-17 13:19:00 +01:00
parent 20fc96a8fd
commit fa58fa5b71
3 changed files with 15 additions and 12 deletions
+1 -1
View File
@@ -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' );
+4 -4
View File
@@ -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);
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))
})
})
},