fee collected report
This commit is contained in:
parent
77ddc147e3
commit
5a99ac36c7
@ -916,46 +916,42 @@ $query = $this->db->query($subQuery,array(NEWREGISTRATION_CONST,'%d-%m-%Y',$from
|
||||
|
||||
//echo $det['university'];die() ;
|
||||
|
||||
$this->db->select('T_Student_CourseDetails.UniversityID,UniversityName,
|
||||
SUM(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash,
|
||||
SUM(IF(ModeOfPayment ="CHEQUE",BillAmount, 0)) AS Cheque,
|
||||
SUM(IF(ModeOfPayment ="REFERRAL", BillAmount, 0)) AS Referal,
|
||||
SUM(IF(ModeOfPayment ="ONLINE TRANSACTION",BillAmount, 0)) AS Onlinec,
|
||||
SUM(IF(ModeOfPayment ="WAIVER",BillAmount, 0)) AS WAIVER,
|
||||
SUM(IF(ModeOfPayment ="Credit/Debit Card",BillAmount, 0)) AS Card,
|
||||
SUM(T_Students_Fees_PaidDetails.BillAmount) AS Total');
|
||||
$this->db->from('T_Students_Fees_PaidDetails');
|
||||
$this->db->join('T_Student_CourseDetails','T_Student_CourseDetails.StudentID=T_Students_Fees_PaidDetails.StudentID');
|
||||
$this->db->join('T_UniversityMaster','T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID');
|
||||
$this->db->select('d.UniversityID,UniversityName,
|
||||
sum(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash,
|
||||
sum(IF(ModeOfPayment ="CHEQUE", BillAmount, 0)) AS Cheque,
|
||||
sum(IF(ModeOfPayment ="REFERRAL", BillAmount, 0)) AS Referal,
|
||||
sum(IF(ModeOfPayment ="ONLINE TRANSACTION", BillAmount, 0)) AS Onlinec,
|
||||
sum(IF(ModeOfPayment ="WAIVER",BillAmount, 0)) AS WAIVER,
|
||||
sum(IF(ModeOfPayment ="Credit/Debit Card",BillAmount, 0)) AS Card,
|
||||
sum(a.BillAmount) AS Total,a.CreatedOn');
|
||||
$this->db->from('T_Students_Fees_PaidDetails a');
|
||||
$this->db->join('T_Students_Fees_Status b','b.FeesId = a.FeesID','left');
|
||||
$this->db->join('T_CourseMaster c','c.CourseID = b.CourseID','left');
|
||||
$this->db->join('T_UniversityMaster d','d.UniversityID=c.UniversityID','left');
|
||||
|
||||
// $this->db->where('T_Students_Fees_PaidDetails.CreatedOn BETWEEN "'.date('Y-m-d', strtotime($start_date)). '" and "'. date('Y-m-d', strtotime($end_date)).'"');
|
||||
|
||||
|
||||
$this->db->where("date_format(T_Students_Fees_PaidDetails.CreatedOn,'%Y-%m-%d')>=",date('Y-m-d', strtotime($start_date)));
|
||||
$this->db->where("date_format(a.CreatedOn,'%Y-%m-%d')>=",date('Y-m-d', strtotime($start_date)));
|
||||
|
||||
|
||||
|
||||
$this->db->where("date_format(T_Students_Fees_PaidDetails.CreatedOn,'%Y-%m-%d')<=",date('Y-m-d', strtotime($end_date)));
|
||||
$this->db->where("date_format(a.CreatedOn,'%Y-%m-%d')<=",date('Y-m-d', strtotime($end_date)));
|
||||
|
||||
|
||||
// $this->db->where(' BillDate <= str_to_date("'.$end_date.'",%d-%m-%Y)');
|
||||
|
||||
|
||||
|
||||
|
||||
$this->db->where('T_Students_Fees_PaidDetails.IsActive','1');
|
||||
$this->db->where('a.IsActive','1');
|
||||
|
||||
if($det['university']!='')
|
||||
{
|
||||
$this->db->where('T_Student_CourseDetails.UniversityID',$det['university']);
|
||||
$this->db->where('d.UniversityID',$det['university']);
|
||||
}
|
||||
|
||||
$this->db->group_by('UniversityID');
|
||||
|
||||
$feeDetails = $this->db->get()->result();
|
||||
|
||||
// print_r( $this->db->last_query());
|
||||
// die();
|
||||
|
||||
// print_r($feeDetails);
|
||||
|
||||
if($feeDetails)
|
||||
{
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@
|
||||
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="university" ng-model="myModel.myUnivSearch"
|
||||
ng-click="getEmployeeList()">
|
||||
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option value="" selected>Select University</option>
|
||||
<option ng-repeat="item in universitySearchData" value="{{item.UniversityID}}">{{item.UniversityName}}</option>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user