diff --git a/Apollo/api/application/models/DayBook_model.php b/Apollo/api/application/models/DayBook_model.php index 07ef0e6e..e2bcb06e 100755 --- a/Apollo/api/application/models/DayBook_model.php +++ b/Apollo/api/application/models/DayBook_model.php @@ -700,19 +700,20 @@ class DayBook_model extends CI_Model // join T_Income_Outcome_Master on T_Income_Outcome_Master.TypeID=T_DayBookMaster.Name and // T_Income_Outcome_Master.ID = T_DayBookMaster.Type where Name=? and date>=? and date<=?'; - $subQuery = 'select Name,T_DayBookMaster.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,Amount,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster left join T_Income_Outcome_Master on + $subQuery = 'select Name,T_DayBookMaster.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,SUM(Amount) as Tot_Amount,T_Income_Outcome_Master.ID as SID,T_Income_Outcome_Master.TypeName as Type,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_DayBookMaster.Type join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID - where Name in (?,?) and str_to_date(date,?)>=? and str_to_date(date,?)<=?'; + where Name in (?,?) and str_to_date(date,?)>=? and str_to_date(date,?)<=? group by ListName'; $query = $this->db->query($subQuery,array($incid,$expid,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod)); - // print_r( $this->db->last_query()); + // print_r( $this->db->last_query()); // die(); - $expense = $query->result(); + $expense = $query->result(); + // print_r($expense); if(count($query)>0) { $results['fullexpense_detail'] = $expense; diff --git a/Apollo/assets/js/controllers/income_reportCtrl.js b/Apollo/assets/js/controllers/income_reportCtrl.js index 4aa97460..1f2bc912 100644 --- a/Apollo/assets/js/controllers/income_reportCtrl.js +++ b/Apollo/assets/js/controllers/income_reportCtrl.js @@ -173,7 +173,7 @@ app.controller('income_reportCtrl', ["$scope","$rootScope","toaster", "$filter", { $scope.incomedetail = response.data; $scope.fullincomedetail = response.data.fullexpense_detail; - //console.log($scope.fullincomedetail); + console.log($scope.fullincomedetail); } diff --git a/Apollo/assets/views/income_expense_report.html b/Apollo/assets/views/income_expense_report.html index 9c2db54a..6af776f9 100644 --- a/Apollo/assets/views/income_expense_report.html +++ b/Apollo/assets/views/income_expense_report.html @@ -123,9 +123,9 @@
- +
- + @@ -140,79 +140,133 @@
- - -
-
- -
- -
- -
- {{li.ListName }} + + + + + +
+ +
+ +
+ +
+
+{{li.ListName }}
{{li.TypeName}}
-
{{li.Amount}}
+
{{li.Tot_Amount}}
+
-
- -
+
+ +
- -
-
+ + + + +
+ +
+ +
+ + +
+{{li.ListName }} +
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
+
+ + + +
+ + + + +
+
-
-
+
+
{{de.Total}} -
-
- -
+
+
+ - -
-
- -
- +
-
- -
- {{li.ListName }} +
+ +
+ +
+
+ {{li.ListName }}
{{li.TypeName}}
-
{{li.Amount}}
+
{{li.Tot_Amount}}
+
-
- -
- - -
-
- -
-
- {{de.Total}} -
-
- -
+
+ +
+ + + +
+ +
+ +
+ + +
+ {{li.ListName }} +
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
+
+ + + +
+ + + + +
+
+ +
+
+ {{de.Total}} +
+
+ + +
diff --git a/Apollo/assets/views/income_expense_report_pdf.html b/Apollo/assets/views/income_expense_report_pdf.html index 4e857229..c62b8e3b 100644 --- a/Apollo/assets/views/income_expense_report_pdf.html +++ b/Apollo/assets/views/income_expense_report_pdf.html @@ -36,6 +36,10 @@ word-spacing: 9cm; } +.b { + line-height: 1.6; +} + @@ -47,7 +51,7 @@
-
Apollo Distance Education
+

Apollo Distance Education

Profit and Loss Report

From: {{income_expensedetails.fdate}} to {{income_expensedetails.tdate}}


@@ -55,70 +59,126 @@
- -
-
- -
- -
- -
- {{li.ListName }} + + + + +
+ +
+ +
+ +
+
+{{li.ListName }}
-
{{li.TypeName}}
-
{{li.Amount}}
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
- -
+ +
- -
-
- -
-
- {{de.Total}} -
-
+ -
- +
- +
+ +
-
-
- -
- -
-
+ +
+{{li.ListName }} +
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
+
- {{li.ListName}} -
-
{{li.TypeName}}
-
{{li.Amount}}
- -
-
-
+ + +
- -
-
- -
-
- {{de.Total}} -
-
-
+ + + +
+
+ +
+
+ {{de.Total}} +
+
+ + + + + + +
+ +
+ +
+ +
+
+ {{li.ListName }} +
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
+
+ +
+ +
+ + + + + + + +
+ +
+ +
+ + +
+ {{li.ListName }} +
+
{{li.TypeName}}
+
{{li.Tot_Amount}}
+
+
+ + + +
+ + + + +
+
+ +
+
+ {{de.Total}} +
+
+