diveren nav mail
This commit is contained in:
@@ -59,7 +59,7 @@ class DashboardController extends MY_Controller {
|
|||||||
'costsToPay' => $this->reservations(),
|
'costsToPay' => $this->reservations(),
|
||||||
'invoiced' => $this->getInvoiced(),
|
'invoiced' => $this->getInvoiced(),
|
||||||
'totalChance' => $this->getChanceRevenues(),
|
'totalChance' => $this->getChanceRevenues(),
|
||||||
'totalPayment' => $this->getTotalpayment()
|
'totalPayment' => Payment::getPaymentInYear( date( 'Y' ))
|
||||||
] );
|
] );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,15 +140,4 @@ class DashboardController extends MY_Controller {
|
|||||||
return $totalChance;
|
return $totalChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getTotalPayment()
|
|
||||||
{
|
|
||||||
$totalPayment = 0;
|
|
||||||
foreach($this->invoiceOverviews as $invoiceOverview)
|
|
||||||
{
|
|
||||||
$totalPayment += str_replace( '.', '', $invoiceOverview['projectPayment']);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $totalPayment;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class MY_Controller extends CI_Controller {
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->version = '1.00.50';
|
$this->version = '1.00.52';
|
||||||
|
|
||||||
$this->load->library( 'beheer/session/RetrieveUserSession' );
|
$this->load->library( 'beheer/session/RetrieveUserSession' );
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,15 @@ class Payment extends BaseModel {
|
|||||||
return $projects->toArray();
|
return $projects->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getPaymentInYear( $year )
|
||||||
|
{
|
||||||
|
$payments = self::selectRAW('SUM(paymentamount) AS totalpayment')
|
||||||
|
->whereRaw("DATE_FORMAT(paymentdate, '%Y') = '{$year}'")
|
||||||
|
->first();
|
||||||
|
|
||||||
|
return $payments->totalpayment;
|
||||||
|
}
|
||||||
|
|
||||||
public static function savePayment( $paymentID, $payment )
|
public static function savePayment( $paymentID, $payment )
|
||||||
{
|
{
|
||||||
$payment = (array) $payment;
|
$payment = (array) $payment;
|
||||||
|
|||||||
@@ -55,9 +55,7 @@
|
|||||||
mouseout: disableDetails.bind($data, 'toolTip1') }">
|
mouseout: disableDetails.bind($data, 'toolTip1') }">
|
||||||
<label>?</label>
|
<label>?</label>
|
||||||
<div data-bind="if:toolTip1" class="my-tooltip">
|
<div data-bind="if:toolTip1" class="my-tooltip">
|
||||||
<h5>Dit is een voorbeeld header</h5>
|
<p>Omzet totaal gerealiseerd lopend jaar + Onderhanden werkpositie lopend jaar.</p>
|
||||||
<p>Mollis Egestas Fusce Parturient</p>
|
|
||||||
<p>Ultricies Ligula Risus</p>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span class="db-panel-data"><strong data-bind="text:minimumRevenues"></strong></span>
|
<span class="db-panel-data"><strong data-bind="text:minimumRevenues"></strong></span>
|
||||||
@@ -72,9 +70,7 @@
|
|||||||
mouseout: disableDetails.bind($data, 'toolTip3') }">
|
mouseout: disableDetails.bind($data, 'toolTip3') }">
|
||||||
<label>?</label>
|
<label>?</label>
|
||||||
<div data-bind="if:toolTip3" class="my-tooltip">
|
<div data-bind="if:toolTip3" class="my-tooltip">
|
||||||
<h5>Dit is een voorbeeld header</h5>
|
<p> Onderhanden werkpositie totaal/40%.</p>
|
||||||
<p>Mollis Egestas Fusce Parturient</p>
|
|
||||||
<p>Ultricies Ligula Risus</p>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span class="db-panel-data">
|
<span class="db-panel-data">
|
||||||
@@ -149,11 +145,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
<h4>
|
<h4>
|
||||||
<span class="db-panel-label">Nog te factureren totaal(incl btw):</span>
|
<span class="db-panel-label">Nog te factureren totaal (incl btw):</span>
|
||||||
<span class="db-panel-data"><strong data-bind="text:toInvoice"></strong></span>
|
<span class="db-panel-data"><strong data-bind="text:toInvoice"></strong></span>
|
||||||
</h4>
|
</h4>
|
||||||
<h4>
|
<h4>
|
||||||
<span class="db-panel-label">betaalde facturen lopende jaar (incl btw):</span>
|
<span class="db-panel-label">Betaalde facturen lopende jaar (incl btw):</span>
|
||||||
<span class="db-panel-data"><strong data-bind="text:payments"></strong></span>
|
<span class="db-panel-data"><strong data-bind="text:payments"></strong></span>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,7 +174,7 @@
|
|||||||
</h4>
|
</h4>
|
||||||
<h4>
|
<h4>
|
||||||
<span class="db-panel-label">
|
<span class="db-panel-label">
|
||||||
Saldo inkomsten totaal(excl btw):
|
Saldo inkomsten totaal (excl btw):
|
||||||
</span>
|
</span>
|
||||||
<span class="dashboard-info"
|
<span class="dashboard-info"
|
||||||
data-bind="event: {
|
data-bind="event: {
|
||||||
@@ -186,9 +182,7 @@
|
|||||||
mouseout: disableDetails.bind($data, 'toolTip2') }">
|
mouseout: disableDetails.bind($data, 'toolTip2') }">
|
||||||
<label>?</label>
|
<label>?</label>
|
||||||
<div data-bind="if:toolTip2" class="my-tooltip">
|
<div data-bind="if:toolTip2" class="my-tooltip">
|
||||||
<h5>Dit is een voorbeeld header</h5>
|
<p>Openstaande facturen + nog te factureren totaal + kosten derden + reserveringen derden.</p>
|
||||||
<p>Mollis Egestas Fusce Parturient</p>
|
|
||||||
<p>Ultricies Ligula Risus</p>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span class="db-panel-data"><strong data-bind="text:revenues"></strong></span>
|
<span class="db-panel-data"><strong data-bind="text:revenues"></strong></span>
|
||||||
|
|||||||
Reference in New Issue
Block a user