income expense
This commit is contained in:
parent
451a3656de
commit
8188e464f6
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -123,9 +123,9 @@
|
||||
<!-- <pre>{{statusr | json}}</pre> -->
|
||||
<div class="row" style="text-align: right;">
|
||||
<div class="col-md-4">
|
||||
<input class="form-control" type="text" ng-model="search" id="searchIn" autofocus tabindex="2" placeholder="Search" />
|
||||
<!-- <input class="form-control" type="text" ng-model="search" id="searchIn" autofocus tabindex="2" placeholder="Search" /> -->
|
||||
</div>
|
||||
<button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button>
|
||||
<!-- <button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button> -->
|
||||
|
||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-success btn-o" data-style="zoom-in" ng-click="changeSem(myModel.universityName,myModel.courseName);">Generate PDF</button>
|
||||
|
||||
@ -140,79 +140,133 @@
|
||||
|
||||
|
||||
<div ng-if="expense_data.length>0">
|
||||
|
||||
<!-- Income Part -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 20px">Income</label></b>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-repeat="list in Subtypes">
|
||||
<!-- {{list}} -->
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002' && list.ListCode == li.OrgType">
|
||||
{{li.ListName }}
|
||||
|
||||
<!-- hearde start -- >
|
||||
|
||||
|
||||
<!-- header end -->
|
||||
|
||||
<!-- Operating Income Part -->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 15px">Operating Income</label></b>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I002'">
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002' && li.OrgType == 'I002'">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Amount}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<!--- operating Income end -->
|
||||
|
||||
|
||||
<!--NON operating Income -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 15px">Non Operating Income</label></b>
|
||||
</div>
|
||||
|
||||
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType=='I003'"> -->
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I002' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' )">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- NON operating income end-->
|
||||
<!--Total -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 17px">Total Income</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I002'" >
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I002'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
|
||||
<!--- income part completed-->
|
||||
|
||||
|
||||
|
||||
<!--Expense Part -->
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 20px">Expense</label></b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div ng-repeat="list in Subtypes">
|
||||
<!-- {{list}} -->
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001' && list.ListCode == li.OrgType">
|
||||
{{li.ListName }}
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 15px">Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I001'">
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001' && li.OrgType == 'I001'">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Amount}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 17px">Total Expense</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I001'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Expense Completed-->
|
||||
|
||||
|
||||
|
||||
<!-- non operating expense -->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 15px">Non Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType =='I003'"> -->
|
||||
<div class="col-md-12" ng-repeat="li in fullincomedetail " ng-if="li.Name=='I001' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003' )">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Non operating expense end -->
|
||||
|
||||
<!--Total -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 17px">Total Expense</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in expense_data" ng-if="de.TID=='I001'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
|
||||
|
||||
<!--Net Profit start -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
|
||||
@ -36,6 +36,10 @@
|
||||
word-spacing: 9cm;
|
||||
}
|
||||
|
||||
.b {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@ -47,7 +51,7 @@
|
||||
<div class="col-md-offset-10 col-md-1">
|
||||
<button class="btn btn-success" id="print"ng-click="generatePDF();">Print</button></div>
|
||||
<div id="income_expensepdf">
|
||||
<h5 align="center" style="color:black;"><strong>Apollo Distance Education</strong></h5>
|
||||
<h4 align="center" style="color:black;"><strong>Apollo Distance Education</strong></h4>
|
||||
<p align="center" style="color: black">Profit and Loss Report</p>
|
||||
<p align="center" style="color: black">From: {{income_expensedetails.fdate}} to {{income_expensedetails.tdate}}</p>
|
||||
<br/>
|
||||
@ -55,70 +59,126 @@
|
||||
<!-- <p class="a" style="background-color: #D3D3D3;font-size: 15px;"><b>Account Amount</b></p> -->
|
||||
|
||||
</div>
|
||||
<!-- Income part -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 12px">Income</label></b>
|
||||
</div>
|
||||
<!-- {{}} -->
|
||||
|
||||
<div ng-repeat="list in listdetails">
|
||||
<!-- {{list}} -->
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002' && list.ListCode == li.OrgType">
|
||||
{{li.ListName }}
|
||||
|
||||
|
||||
<!-- Operating Income Part -->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 12px">Operating Income</label></b>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="f in income_expensedetails" ng-if="f.OrgType =='I002'">
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002' && li.OrgType == 'I002'">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" style="color: black; font-size: 8px" class="fif">{{li.TypeName}}</div>
|
||||
<div id="a" style="color: black; font-size: 8px" class="right">{{li.Amount}}</div>
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 12px">Total Income</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 12px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I002'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
<!--- operating Income end -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- {{listdetails}} -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<!---Expense Part -->
|
||||
<div class="col-md-12"><b>
|
||||
<label style="color: black; font-size: 12px">Non Operating Income</label></b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3"><b>
|
||||
<label style="color: black; font-size: 12px">Expense</label></b>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="list in listdetails">
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails" ng-if="li.Name=='I001' && list.ListCode == li.OrgType">
|
||||
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType=='I003'"> -->
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I002' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' )">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{li.ListName}}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" style="color: black; font-size: 8px" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" style="color: black; font-size: 8px" class="right">{{li.Amount}}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 12px">Total Expense</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 12px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I001'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--Total -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 15px">Total Income</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I002'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!--Expense Part -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-12"><b>
|
||||
<label style="color: black; font-size: 12px">Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<div ng-repeat="f in income_expensedetails" ng-if="f.OrgType =='I001'">
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001' && li.OrgType == 'I001'">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Expense Completed-->
|
||||
|
||||
|
||||
|
||||
<!-- non operating expense -->
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-12"><b>
|
||||
<label style="color: black; font-size: 12px">Non Operating Expense</label></b>
|
||||
</div>
|
||||
|
||||
<!-- <div ng-repeat="f in fullincomedetail" ng-if="f.OrgType =='I004' || f.OrgType=='I005' ||f.OrgType=='I006' || f.OrgType =='I003'"> -->
|
||||
<div class="col-md-12" ng-repeat="li in income_expensedetails " ng-if="li.Name=='I001' && (li.OrgType == 'I004' || li.OrgType=='I005' ||li.OrgType=='I006' || li.OrgType=='I003' )">
|
||||
{{li.ListName }}
|
||||
<div id="test" class="pad">
|
||||
<div id="a" class="fif">{{li.TypeName}}</div>
|
||||
<div id="b" class="right">{{li.Tot_Amount}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Non operating expense end -->
|
||||
|
||||
<!--Total -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6"><b>
|
||||
<label style="color: black; font-size: 15px">Total Expense</label></b>
|
||||
</div>
|
||||
<div class="col-md-offset-10" style="color: black; font-size: 17px" ng-repeat="de in income_expendelist" ng-if="de.TID=='I001'" >
|
||||
{{de.Total}}
|
||||
</div>
|
||||
</div>
|
||||
<!--Total End -->
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user