Merge pull request #124 from Focuslinkstech/Development
Update dashboard.php
This commit is contained in:
commit
add28c2fca
@ -19,6 +19,7 @@ $month_n = date('n');
|
|||||||
$iday = ORM::for_table('tbl_transactions')
|
$iday = ORM::for_table('tbl_transactions')
|
||||||
->where('recharged_on', $mdate)
|
->where('recharged_on', $mdate)
|
||||||
->where_not_equal('method', 'Customer - Balance')
|
->where_not_equal('method', 'Customer - Balance')
|
||||||
|
->where_not_equal('method', 'Recharge Balance - Administrator')
|
||||||
->sum('price');
|
->sum('price');
|
||||||
|
|
||||||
if ($iday == '') {
|
if ($iday == '') {
|
||||||
@ -26,7 +27,7 @@ if ($iday == '') {
|
|||||||
}
|
}
|
||||||
$ui->assign('iday', $iday);
|
$ui->assign('iday', $iday);
|
||||||
|
|
||||||
$imonth = ORM::for_table('tbl_transactions')->where_not_equal('method', 'Customer - Balance')->where_gte('recharged_on', $first_day_month)->where_lte('recharged_on', $mdate)->sum('price');
|
$imonth = ORM::for_table('tbl_transactions')->where_not_equal('method', 'Customer - Balance')->where_not_equal('method', 'Recharge Balance - Administrator')->where_gte('recharged_on', $first_day_month)->where_lte('recharged_on', $mdate)->sum('price');
|
||||||
if ($imonth == '') {
|
if ($imonth == '') {
|
||||||
$imonth = '0.00';
|
$imonth = '0.00';
|
||||||
}
|
}
|
||||||
@ -149,6 +150,7 @@ if (file_exists($cacheMSfile) && time() - filemtime($cacheMSfile) < 43200) {
|
|||||||
->select_expr('SUM(price)', 'total')
|
->select_expr('SUM(price)', 'total')
|
||||||
->where_raw("YEAR(recharged_on) = YEAR(CURRENT_DATE())") // Filter by the current year
|
->where_raw("YEAR(recharged_on) = YEAR(CURRENT_DATE())") // Filter by the current year
|
||||||
->where_not_equal('method', 'Customer - Balance')
|
->where_not_equal('method', 'Customer - Balance')
|
||||||
|
->where_not_equal('method', 'Recharge Balance - Administrator')
|
||||||
->group_by_expr('MONTH(recharged_on)')
|
->group_by_expr('MONTH(recharged_on)')
|
||||||
->find_many();
|
->find_many();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user