diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index 17f24011..a87edc9b 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -2130,14 +2130,15 @@ if ($cname!= ''){ } //home--this year// function yearexpensereport($fa,$aa) - { + { $sql="select monthname(date) as month, sum(if(type='PAYMENT',total,0)) as exp, sum(if(type='RECEIPT',total,0)) as inc, sum(total) as total from t_income_expense where date >= '".$fa."-04-01' and date <= '".$aa."-03-31' - group by month "; + group by month + ORDER BY FIELD(month,'April','May','June','July','August','September','October','November','December','January', 'February', 'March')"; $query = $this->db->query($sql); return $query->result(); @@ -2154,7 +2155,8 @@ if ($cname!= ''){ function monthwise_data($value='') { - $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate())"; + $sql="SELECT type,Sum(total) as monthlydata FROM t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate()) AND YEAR(date) = YEAR(curdate())"; + //$sql="SELECT type,Sum(total) as monthlydata FROM resicoin_RIADev.t_income_expense WHERE type = ? AND MONTH(date) = MONTH(curdate()) And YEAR(date) = YEAR(curdate())" $query = $this->db->query($sql,array($value)); return $query->result(); diff --git a/application/views/cashbookmthlypaydep.php b/application/views/cashbookmthlypaydep.php index fa53ff24..d3b40383 100755 --- a/application/views/cashbookmthlypaydep.php +++ b/application/views/cashbookmthlypaydep.php @@ -16,7 +16,6 @@ if(!empty($departmentwise)) ?> - - - - - - - - - -
@@ -117,9 +105,11 @@ if(!empty($Indiancurrency)) Month Receipt (₹) Payment (₹) - Current Balances + Current Balances (₹) + + Previous Year Balance(opening balances) @@ -128,7 +118,6 @@ if(!empty($Indiancurrency)) - - - Total + + Current Year Closing Balances @@ -174,43 +163,43 @@ if(!empty($Indiancurrency))
- - - - - - - + + + + + + + @@ -103,6 +101,7 @@ $(document).ready(function() { "dom": "<'row'<'col-md-5'l><'col-md-7'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", +"bSort": false, buttons: [ { diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php index ee39cfea..50af2870 100755 --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -1,5 +1,4 @@ - monthlydata; + $month_in = $mi->monthlydata; }} if(!empty($monthlywiseexpense)) @@ -78,7 +77,6 @@ if(!empty($yearincome)) -