diveren nav mail
This commit is contained in:
@@ -59,7 +59,7 @@ class DashboardController extends MY_Controller {
|
||||
'costsToPay' => $this->reservations(),
|
||||
'invoiced' => $this->getInvoiced(),
|
||||
'totalChance' => $this->getChanceRevenues(),
|
||||
'totalPayment' => $this->getTotalpayment()
|
||||
'totalPayment' => Payment::getPaymentInYear( date( 'Y' ))
|
||||
] );
|
||||
}
|
||||
|
||||
@@ -140,15 +140,4 @@ class DashboardController extends MY_Controller {
|
||||
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();
|
||||
|
||||
$this->version = '1.00.50';
|
||||
$this->version = '1.00.52';
|
||||
|
||||
$this->load->library( 'beheer/session/RetrieveUserSession' );
|
||||
|
||||
|
||||
@@ -39,6 +39,15 @@ class Payment extends BaseModel {
|
||||
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 )
|
||||
{
|
||||
$payment = (array) $payment;
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
mouseout: disableDetails.bind($data, 'toolTip1') }">
|
||||
<label>?</label>
|
||||
<div data-bind="if:toolTip1" class="my-tooltip">
|
||||
<h5>Dit is een voorbeeld header</h5>
|
||||
<p>Mollis Egestas Fusce Parturient</p>
|
||||
<p>Ultricies Ligula Risus</p>
|
||||
<p>Omzet totaal gerealiseerd lopend jaar + Onderhanden werkpositie lopend jaar.</p>
|
||||
</div>
|
||||
</span>
|
||||
<span class="db-panel-data"><strong data-bind="text:minimumRevenues"></strong></span>
|
||||
@@ -72,9 +70,7 @@
|
||||
mouseout: disableDetails.bind($data, 'toolTip3') }">
|
||||
<label>?</label>
|
||||
<div data-bind="if:toolTip3" class="my-tooltip">
|
||||
<h5>Dit is een voorbeeld header</h5>
|
||||
<p>Mollis Egestas Fusce Parturient</p>
|
||||
<p>Ultricies Ligula Risus</p>
|
||||
<p> Onderhanden werkpositie totaal/40%.</p>
|
||||
</div>
|
||||
</span>
|
||||
<span class="db-panel-data">
|
||||
@@ -153,7 +149,7 @@
|
||||
<span class="db-panel-data"><strong data-bind="text:toInvoice"></strong></span>
|
||||
</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>
|
||||
</h4>
|
||||
</div>
|
||||
@@ -186,9 +182,7 @@
|
||||
mouseout: disableDetails.bind($data, 'toolTip2') }">
|
||||
<label>?</label>
|
||||
<div data-bind="if:toolTip2" class="my-tooltip">
|
||||
<h5>Dit is een voorbeeld header</h5>
|
||||
<p>Mollis Egestas Fusce Parturient</p>
|
||||
<p>Ultricies Ligula Risus</p>
|
||||
<p>Openstaande facturen + nog te factureren totaal + kosten derden + reserveringen derden.</p>
|
||||
</div>
|
||||
</span>
|
||||
<span class="db-panel-data"><strong data-bind="text:revenues"></strong></span>
|
||||
|
||||
Reference in New Issue
Block a user