diff --git a/application/controllers/report.php b/application/controllers/report.php
index 9df249d7..9db8e21e 100755
--- a/application/controllers/report.php
+++ b/application/controllers/report.php
@@ -404,7 +404,22 @@ class report extends BaseController
$this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL);
}
-
+ public function cashbookdepartment()
+ {
+ $sid=$_GET['sid'];
+ $this->global['pageTitle'] = 'Cashbook - department - ';
+ $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid);
+ //print_r($data['departmentwise']);
+ $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
+ }
+ public function yearmonthwise()
+ {
+ $sid=$_GET['sid'];
+ $this->global['pageTitle'] = 'Cashbook - yearmonthwise - ';
+ $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid);
+ //print_r($data['departmentwise']);
+ $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL);
+ }
}
diff --git a/application/logs/log-2017-12-04.php b/application/logs/log-2017-12-04.php
new file mode 100644
index 00000000..c66833cf
--- /dev/null
+++ b/application/logs/log-2017-12-04.php
@@ -0,0 +1,12 @@
+
+
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:47:08 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearlyexpenses.php 57
+ERROR - 2017-12-04 08:53:16 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearmonthwise.php 59
+ERROR - 2017-12-04 08:53:16 --> Severity: Notice --> Undefined property: stdClass::$month C:\xampp\htdocs\siddharth_application\application\views\cashbookyearmonthwise.php 59
diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php
index ce5e55fc..d49bccad 100755
--- a/application/models/dahsboard_model.php
+++ b/application/models/dahsboard_model.php
@@ -937,12 +937,11 @@ group by supplier_name,material_name";
// }
function yearexpensereport()
{
- $sql="SELECT date,type,sum(total)as total,towhom,description,account_code FROM kasiram9_SIADEV.t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by account_code order by total desc limit 10 ";
+ $sql="SELECT date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM kasiram9_SIADEV.t_income_expense where type='EXPENSE' and year(date)= year(current_date()) group by month order by total desc limit 10 ";
$query = $this->db->query($sql);
return $query->result();
}
-
function today_data($value='')
{
$sql="SELECT type,Sum(total) as todaydata FROM kasiram9_SIADEV.t_income_expense WHERE type = ? AND DATE(date) = CURRENT_DATE";
@@ -968,6 +967,23 @@ group by supplier_name,material_name";
return $query->result();
}
+ function departmentwise($sid='')
+ {
+ $sql="SELECT date,type,total,towhom,description,account_code FROM kasiram9_SIADEV.t_income_expense WHERE account_code = ?";
+ $query = $this->db->query($sql,array($sid));
+ //print_r($this->db->last_query());
+ return $query->result();
+
+ }
+ function yearmonthwise($sid='')
+ {
+ $sql="SELECT date,type,total,description,towhom,account_code FROM kasiram9_SIADEV.t_income_expense WHERE monthname(date) = ? group by account_code";
+ $query = $this->db->query($sql,array($sid));
+ //print_r($this->db->last_query());
+ return $query->result();
+
+ }
+
}
?>
\ No newline at end of file
diff --git a/application/views/cashbookmonthlydep.php b/application/views/cashbookmonthlydep.php
new file mode 100644
index 00000000..af6e906a
--- /dev/null
+++ b/application/views/cashbookmonthlydep.php
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Department Monthly Expenses
+
+
+
+
+
+
+
+
+ | Date |
+ Paid To |
+ Paid Type |
+ Amount |
+ Account Code |
+ Description |
+
+
+
+
+
+
+
+
+ | date?> |
+ towhom?> |
+ type?> |
+ total?> |
+ account_code?> |
+ description?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/cashbookyearlyexpenses.php b/application/views/cashbookyearlyexpenses.php
index 4b5794a9..e474ae6a 100644
--- a/application/views/cashbookyearlyexpenses.php
+++ b/application/views/cashbookyearlyexpenses.php
@@ -23,58 +23,7 @@
-
-
-
+
@@ -82,17 +31,16 @@
Yearly Expenses
-
-
- | Date |
- Paid To |
+
+ month |
+
Paid Type |
Amount |
- Account Code |
+
Description |
@@ -105,11 +53,12 @@
?>
- | date?> |
- towhom?> |
+
+ month?> |
+
type?> |
total?> |
- account_code?> |
+
description?> |
@@ -122,11 +71,10 @@
?>
-
+
-
-
+
diff --git a/application/views/cashbookyearmonthwise.php b/application/views/cashbookyearmonthwise.php
new file mode 100644
index 00000000..ce8280ff
--- /dev/null
+++ b/application/views/cashbookyearmonthwise.php
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
Yearly Expenses
+
+
+
+
+
+
+
+
+ | Date |
+
+ Paid To |
+ Paid Type |
+ Amount |
+ Account Code |
+ Description |
+
+
+
+
+
+
+
+
+ | date?> |
+
+ towhom?> |
+ type?> |
+ total?> |
+ account_code?> |
+ description?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file