diff --git a/application/core/MY_Controller.php b/application/core/MY_Controller.php index 746efd9..cbfa855 100644 --- a/application/core/MY_Controller.php +++ b/application/core/MY_Controller.php @@ -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' ); diff --git a/application/views/pages/dashboard_view.php b/application/views/pages/dashboard_view.php index 073f838..287e546 100644 --- a/application/views/pages/dashboard_view.php +++ b/application/views/pages/dashboard_view.php @@ -123,10 +123,10 @@ Saldo inkomsten (excl btw): -

- Omzet lopend jaar (excl btw): - -

+ + + + diff --git a/public/js/lib/modules/dashboard/dashboardModule.js b/public/js/lib/modules/dashboard/dashboardModule.js index 0c34ab7..b655dbd 100644 --- a/public/js/lib/modules/dashboard/dashboardModule.js +++ b/public/js/lib/modules/dashboard/dashboardModule.js @@ -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)) }) },