Report Changes : ps

This commit is contained in:
Sanjeev 2020-11-27 10:50:31 +05:30
parent 973653024b
commit c5a71bc4f7
12 changed files with 467 additions and 138 deletions

View File

@ -414,11 +414,14 @@ $route['promoteBatchInfomation'] = 'Reregister_Controller/promoteBatchInfomation
$route['report_status'] = 'Report/status'; $route['report_status'] = 'Report/status';
$route['report_filters'] = 'Report/filters'; $route['report_filters'] = 'Report/filters';
$route['report_filter'] = 'Report/filter'; $route['report_filter'] = 'Report/filter';
$route['report_markcard_filter'] = 'Report/markcard_filter';
$route['report_markcard'] = 'Report/markcard'; $route['report_markcard'] = 'Report/markcard';
$route['report_certificate_filter'] = 'Report/certificate_filter';
$route['report_certificate'] = 'Report/certificate'; $route['report_certificate'] = 'Report/certificate';
$route['report_markcard_certificate'] = 'Report/mark_cert'; $route['report_markcard_certificate'] = 'Report/mark_cert';
$route['report_expense'] = 'Report/expense'; $route['report_expense'] = 'Report/expense';
$route['report_answer_booklet'] = 'Report/answer_booklet'; $route['report_answer_booklet'] = 'Report/answer_booklet';
$route['report_app_pending_filter'] = 'Report/app_pending_filter';
$route['report_app_pending'] = 'Report/app_pending'; $route['report_app_pending'] = 'Report/app_pending';
$route['report_app_pending_old'] = 'Report/app_pending_old'; $route['report_app_pending_old'] = 'Report/app_pending_old';
$route['report_doc_pending'] = 'Report/doc_pending'; $route['report_doc_pending'] = 'Report/doc_pending';

View File

@ -624,10 +624,7 @@ public function updateNonOperationalDetails_post() {
// echo $from.'from'; // echo $from.'from';
// echo $to.'to'; // echo $to.'to';
//echo $br;die();
$getStatus = $this->daybook_model->Income_expense($from,$to,$br); $getStatus = $this->daybook_model->Income_expense($from,$to,$br);
//print_r($getStatus);
if ($getStatus) if ($getStatus)
{ {
$getStatus['status'] = REST_Controller::HTTP_OK; $getStatus['status'] = REST_Controller::HTTP_OK;
@ -682,8 +679,7 @@ public function updateNonOperationalDetails_post() {
$branch = $this->post('branch'); $branch = $this->post('branch');
$getexceldet = $this->daybook_model->GetPLexcelDetails($from,$to,$branch); $getexceldet = $this->daybook_model->GetPLexcelDetails($from,$to,$branch);
if(!empty($getexceldet))
if($getexceldet)
{ {
$getexceldet['status'] = REST_Controller::HTTP_OK; $getexceldet['status'] = REST_Controller::HTTP_OK;

View File

@ -61,13 +61,43 @@ class Report extends REST_Controller {
} }
}
public function markcard_filter_post()
{
$br = $this->post('branch');
// $userID = $this->post('userID');
$getStatus = $this->report_model->getUniversity2($br);
if ($getStatus)
{
$result = $this->report_model->getDefaultActivity('C001',$br);
if(!empty($result)){$getStatus['markcardstatus'] = $result;}
else{ $getStatus['markcardstatus'] = array();}
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
} }
public function markcard_post() public function markcard_post()
{ {
$bat = $this->post('batch'); $bat = $this->post('batch');
$br = $this->post('branch'); $br = $this->post('branch');
$u = $this->post('university'); $u = $this->post('university');
$getStatus = $this->report_model->markcard($bat,$br,$u); $sts = $this->post('status');
$fd = $this->post('from_date');
$td = $this->post('to_date');
$getStatus = $this->report_model->markcard($bat,$br,$u,$sts,$fd,$td);
//print_r($getStatus); //print_r($getStatus);
if ($getStatus) if ($getStatus)
{ {
@ -85,15 +115,42 @@ class Report extends REST_Controller {
} }
}
public function certificate_filter_post()
{
$br = $this->post('branch');
$getStatus = $this->report_model->getUniversity($br);
if ($getStatus)
{
$result = $this->report_model->getDefaultActivity('A001',$br);
if(!empty($result)){$getStatus['certificatestatus'] = $result;}
else{ $getStatus['certificatestatus'] = array();}
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
} }
public function certificate_post() public function certificate_post()
{ {
$bat = $this->post('batch'); $bat = $this->post('batch');
$br = $this->post('branch'); $br = $this->post('branch');
$u = $this->post('university'); $u = $this->post('university');
$st = $this->post('status');
$from = $this->post('from'); $from = $this->post('from');
$to = $this->post('to'); $to = $this->post('to');
$getStatus = $this->report_model->certificate_status($bat,$br,$u,$from,$to); $getStatus = $this->report_model->certificate_status($bat,$br,$u,$from,$to,$st);
//print_r($getStatus); //print_r($getStatus);
if ($getStatus) if ($getStatus)
{ {
@ -187,20 +244,55 @@ class Report extends REST_Controller {
} }
}
public function app_pending_filter_post(){
$br = $this->post('branch');
$getStatus = $this->report_model->getUniversity($br);
if ($getStatus)
{ $cnt = count($getStatus['university']);
if($cnt>=0){
$getStatus['university'][$cnt]["universityID"] = "all";
$getStatus['university'][$cnt]["universityName"] = "ALL";
$getStatus['university'][$cnt]["batchDetails"]= [];}
$getStatus['rollnostatus'] = $this->report_model->getAppPendingStatus($br);
if(!empty($getStatus['rollnostatus'])){
$cnted = count($getStatus['rollnostatus']);
if($cnted>=0){
$getStatus['rollnostatus'][$cnted]["ListCode"] = "all";
$getStatus['rollnostatus'][$cnted]["ListName"] = "ALL";
$getStatus['rollnostatus'][$cnted]["BranchCode"]= $br;
}}
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
} }
public function app_pending_post() public function app_pending_post()
{ {
$bat = $this->post('batch'); $bat = $this->post('batch');
$br = $this->post('branch'); $br = $this->post('branch');
$u = $this->post('university'); $u = $this->post('university');
$st = $this->post('status');
$getStatus = $this->report_model->app_pending($bat,$br,$u); $from = $this->post('from');
$to = $this->post('to');
$updateddate = $this->post('updateddate');
$getStatus = $this->report_model->app_pending($bat,$br,$u,$from,$st,$to,$updateddate);
if($getStatus['app_pendingList']){
$count = count($getStatus['app_pending_data']); $count = count($getStatus['app_pending_data']);
for ($i = 0;$i < $count;$i++) { for ($i = 0;$i < $count;$i++) {
$getStatus['app_pending_data'][$i]->FormType = implode('-', array_map('ucfirst', explode('-', $getStatus['app_pending_data'][$i]->FormType))); $getStatus['app_pending_data'][$i]->FormType = implode('-', array_map('ucfirst', explode('-', $getStatus['app_pending_data'][$i]->FormType)));
} }
// die(); }
//print_r($getStatus);
if ($getStatus) if ($getStatus)
{ {
$getStatus['status'] = REST_Controller::HTTP_OK; $getStatus['status'] = REST_Controller::HTTP_OK;

View File

@ -1128,9 +1128,14 @@ class DayBook_model extends CI_Model
$fromd= date("Y-m-d",strtotime($from)); $fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to)); $tod=date("Y-m-d",strtotime($to));
// echo $fromd; // echo $fromd;
// echo $tod; // echo $tod;
// die(); // die();
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=".$fromd." and str_to_date(Date,'%d-%m-%Y')<=".$tod." and";
}else{
$where="";
}
$subQuery= 'SELECT $subQuery= 'SELECT
DISTINCT(p.Name) AS TID,ListName, DISTINCT(p.Name) AS TID,ListName,
SUM(IF(p.Name=?,Amount,0)) AS Income, SUM(IF(p.Name=?,Amount,0)) AS Income,
@ -1142,12 +1147,13 @@ class DayBook_model extends CI_Model
FROM FROM
T_DayBookMaster AS p T_DayBookMaster AS p
join T_PickListDetails on T_PickListDetails.ListCode = p.name join T_PickListDetails on T_PickListDetails.ListCode = p.name
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? and p.Status !=? or p.Name=?) and (p.ModeOfPayment != ? and p.ModeOfPayment != ? ) and Status !=? and p.BranchCode=? where '.$where.' p.IsActive=? and (p.Name=? and p.Status !=? or p.Name=?) and (p.ModeOfPayment != ? and p.ModeOfPayment != ? ) and Status !=? and p.BranchCode=?
GROUP BY p.`Name`'; GROUP BY p.`Name`';
$query = $this->db->query($subQuery,array($incomecode,$expensecode,'Pending',$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','Pending','I002','WAIVER','REFERRAL','Cancel',$br)); $query = $this->db->query($subQuery,array($incomecode,$expensecode,'Pending',$incomecode,$expensecode,'1','I001','Pending','I002','WAIVER','REFERRAL','Cancel',$br));
$expense = $query->result(); $expense = $query->result();
// print_r($this->db->last_query());die();and p.Isdaybook=? // print_r($this->db->last_query());die();
// and p.Isdaybook=?
// if(count($expense) > 0) // if(count($expense) > 0)
// { // {
$results['expense_data'] = $expense; $results['expense_data'] = $expense;
@ -1159,7 +1165,6 @@ class DayBook_model extends CI_Model
DISTINCT(q.Name) AS TID,ListName,T_Income_Outcome_Master.TypeID as Orgtype, DISTINCT(q.Name) AS TID,ListName,T_Income_Outcome_Master.TypeID as Orgtype,
SUM(IF(q.Name=?,Amount,0)) AS Income, SUM(IF(q.Name=?,Amount,0)) AS Income,
SUM(IF(q.Name=? ,Amount,0)) AS Expense, SUM(IF(q.Name=? ,Amount,0)) AS Expense,
SUM( CASE Name SUM( CASE Name
WHEN ? THEN Amount WHEN ? THEN Amount
WHEN ? THEN Amount WHEN ? THEN Amount
@ -1167,11 +1172,11 @@ class DayBook_model extends CI_Model
FROM T_NonOperationalMaster AS q FROM T_NonOperationalMaster AS q
Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID=q.Type Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID=q.Type
join T_PickListDetails on T_PickListDetails.ListCode = q.name join T_PickListDetails on T_PickListDetails.ListCode = q.name
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and q.IsActive=? and (q.Name=? or q.Name=?) where '.$where.' q.IsActive=? and (q.Name=? or q.Name=?)
and Status !=? and q.BranchCode=? and q.Isdaybook=? GROUP BY q.Name'; and Status !=? and q.BranchCode=? and q.Isdaybook=? GROUP BY q.Name';
$querynon = $this->db->query($subQueryNON,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br,'1')); $querynon = $this->db->query($subQueryNON,array($incomecode,$expensecode,$incomecode,$expensecode,'1','I001','I002','Cancel',$br,'1'));
$expensenon = $querynon->result(); $expensenon = $querynon->result();
// if(count($expensenon)>0) // if(count($expensenon)>0)
@ -1190,22 +1195,26 @@ class DayBook_model extends CI_Model
$fromd= date("Y-m-d",strtotime($from)); $fromd= date("Y-m-d",strtotime($from));
$tod=date("Y-m-d",strtotime($to)); $tod=date("Y-m-d",strtotime($to));
$expid = 'I001'; $expid = 'I001';
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=".$fromd." and str_to_date(Date,'%d-%m-%Y')<=".$tod." and";
}else{
$where="";
}
// $subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,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 str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and (T_DayBookMaster.ModeOfPayment != ? and T_DayBookMaster.ModeOfPayment != ?and T_DayBookMaster.Status !=?) group by Type,Name';
// $subQuery='select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster // $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'WAIVER','REFERRAL','Pending'));
// 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 str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and (T_DayBookMaster.ModeOfPayment != ? and T_DayBookMaster.ModeOfPayment != ?and T_DayBookMaster.Status !=?) group by Type,Name';
// $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'WAIVER','REFERRAL','Pending'));
//and T_DayBookMaster.Isdaybook=? //and T_DayBookMaster.Isdaybook=?
$subQuery="select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_DayBookMaster.Date,Reason,T_DayBookMaster.Description,ListName from T_DayBookMaster $subQuery="select Name,sum(Amount) as Total,T_DayBookMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,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 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 join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
where str_to_date(date,?)>=? and str_to_date(date,?)<=? and Status!=? and T_DayBookMaster.BranchCode=? and (case when ListName = 'Income' then T_DayBookMaster.ModeOfPayment != 'WAIVER' and T_DayBookMaster.ModeOfPayment != 'REFERRAL'and T_DayBookMaster.Status !='Pending' and T_Income_Outcome_Master.TypeName NOT LIKE '%BY CASH%' where ".$where." Status!=? and T_DayBookMaster.BranchCode=? and (case when ListName = 'Income' then T_DayBookMaster.ModeOfPayment != 'WAIVER' and T_DayBookMaster.ModeOfPayment != 'REFERRAL'and T_DayBookMaster.Status !='Pending' and T_Income_Outcome_Master.TypeName NOT LIKE '%BY CASH%'
when ListName = 'Expense' then T_DayBookMaster.Status !='Pending' and T_Income_Outcome_Master.TypeName != 'FEES' and T_Income_Outcome_Master.TypeName NOT LIKE '%CASH TO%' end) group by Type,Name"; when ListName = 'Expense' then T_DayBookMaster.Status !='Pending' and T_Income_Outcome_Master.TypeName != 'FEES' and T_Income_Outcome_Master.TypeName NOT LIKE '%CASH TO%' end) group by Type,Name";
$query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch)); $query = $this->db->query($subQuery,array('Cancel',$branch));
$expense = $query->result(); $expense = $query->result();
@ -1217,15 +1226,15 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Can
$subQueryNON = 'select Name,sum(Amount) as Total,T_NonOperationalMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_NonOperationalMaster.Date,Reason,T_NonOperationalMaster.Description,ListName $subQueryNON = 'select Name,sum(Amount) as Total,T_NonOperationalMaster.ID,T_Income_Outcome_Master.ID as SubID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,T_NonOperationalMaster.Date,Reason,T_NonOperationalMaster.Description,ListName
from T_NonOperationalMaster from T_NonOperationalMaster
left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_NonOperationalMaster.Type left join T_Income_Outcome_Master on T_Income_Outcome_Master.ID = T_NonOperationalMaster.Type
join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID join T_PickListDetails on T_PickListDetails.ListCode = T_Income_Outcome_Master.TypeID
where str_to_date(date,?)>=? and str_to_date(date,?)<=? where '.$where.'
and Status!=? and T_NonOperationalMaster.BranchCode=? and T_NonOperationalMaster.Isdaybook=? group by Type,Name'; Status!=? and T_NonOperationalMaster.BranchCode=? and T_NonOperationalMaster.Isdaybook=? group by Type,Name';
$queryNon = $this->db->query($subQueryNON,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Cancel',$branch,'1')); $queryNon = $this->db->query($subQueryNON,array('Cancel',$branch,'1'));
$expenseNon = $queryNon->result(); $expenseNon = $queryNon->result();
@ -1240,8 +1249,6 @@ $queryNon = $this->db->query($subQueryNON,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$to
return $results; return $results;
//return $query->result_array(); //return $query->result_array();
} }
@ -1301,7 +1308,11 @@ public function GetPLexcelDetails($from,$to,$branch)
// $query = $this->db->query($subQuery,array('I002','I002','I001','I001','I002','I002','I001','I001','%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,$branch,'%d-%m-%Y')); // $query = $this->db->query($subQuery,array('I002','I002','I001','I001','I002','I002','I001','I001','%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,$branch,'%d-%m-%Y'));
if($from != null && $to != null){
$where="str_to_date(Date,'%d-%m-%Y')>=".$fromd." and str_to_date(Date,'%d-%m-%Y')<=".$tod." and";
}else{
$where="";
}
$subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as month,year(str_to_date(Date,?)) as Year, $subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as month,year(str_to_date(Date,?)) as Year,
T_Income_Outcome_Master.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName, T_Income_Outcome_Master.ID,T_Income_Outcome_Master.TypeID as OrgType,T_Income_Outcome_Master.TypeName,
@ -1314,19 +1325,18 @@ $subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as mont
from T_NonOperationalMaster as q from T_NonOperationalMaster as q
left Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID= q.Type left Join T_Income_Outcome_Master on T_Income_Outcome_Master.ID= q.Type
left Join T_PickListDetails on T_PickListDetails.ListCode=q.Name left Join T_PickListDetails on T_PickListDetails.ListCode=q.Name
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? where '.$where.' q.BranchCode=? group by month';
and q.BranchCode=? group by month';
$query = $this->db->query($subQuery,array('%d-%m-%Y','%d-%m-%Y','I002','I002','I001','I001','I002','I002','I001','I001','I002','I002','I002','I002','I001','I001','I001','I001','%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,$branch)); $query = $this->db->query($subQuery,array('%d-%m-%Y','%d-%m-%Y','I002','I002','I001','I001','I002','I002','I001','I001','I002','I002','I002','I002','I001','I001','I001','I001',$branch));
// print_r($this->db->last_query()); die();
$expenseNon = $query->result(); $expenseNon = $query->result();
if(count($expenseNon)>0) if(count($expenseNon)>0)
{ {
$results['exceldetails'] = $expenseNon; $results['exceldetails'] = $expenseNon;
}else{
$results = array();
} }

View File

@ -127,7 +127,7 @@ where BranchCode = '".$br."' and BatchName = '".$batch."'";
$sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(sfs.rollno,'-') as Roll_NO,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(sms.cdate,'-') as Date,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.sem,'-') as Sem,ifnull(sfs.batch,'-') as Batch_code,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(list.status,'-') as Status,ifnull(sfp.bdate,'-') as Initial_paid_date,bal.balpayable as Balance_Fee,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber,ifnull(appdate,'-') as appdate,ifnull(ansdate,'-') as ansdate $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(sfs.rollno,'-') as Roll_NO,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sms.cid,'-') as Course_id,ifnull(sms.cdate,'-') as Date,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.sem,'-') as Sem,ifnull(sfs.batch,'-') as Batch_code,ifnull(sms.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(list.status,'-') as Status,ifnull(sfp.bdate,'-') as Initial_paid_date,bal.balpayable as Balance_Fee,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber,ifnull(appdate,'-') as appdate,ifnull(ansdate,'-') as ansdate
,scd.coursestatus as Course_Status,ifnull(andate.courierdetails,'-') as Courier_Details,IFNULL(sfs.batchname, '-') AS Batch_Name ,scd.coursestatus as Course_Status,ifnull(andate.courierdetails,'-') as Courier_Details,IFNULL(sfs.batchname, '-') AS Batch_Name
from from
(SELECT c.ID,StudentID as sid,c.CourseID as cid,c.BranchCode as branch,c.ListCode as lcode,p.ListName,c.CertificationType as ctype,c.CDate as cdate,c.Sem as sem FROM T_CertificationStatus c (SELECT c.ID,StudentID as sid,c.CourseID as cid,c.BranchCode as branch,c.ListCode as lcode,p.ListName,c.CertificationType as ctype,c.CDate as cdate,c.Sem as sem,c.CreatedOn FROM T_CertificationStatus c
left join T_PickListDetails p on p.ListCode=c.ListCode left join T_PickListDetails p on p.ListCode=c.ListCode
WHERE c.ID IN (SELECT max(ID) FROM T_CertificationStatus group by StudentID,CourseID,BranchCode,Sem) WHERE c.ID IN (SELECT max(ID) FROM T_CertificationStatus group by StudentID,CourseID,BranchCode,Sem)
group by sid,sem,cid,lcode,branch) as sms group by sid,sem,cid,lcode,branch) as sms
@ -181,8 +181,18 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
$sql.=" and cm.uid = '".$u."'"; $sql.=" and cm.uid = '".$u."'";
} }
if ($st != ''){
$sql.="and list.lcode = '".$st."'";
}
if ($from != ''){
$fromd= date("Y-m-d",strtotime($from));
$sql.="and sms.CreatedOn >= '".$fromd."'";
}
if ($to != ''){
$tod=date("Y-m-d",strtotime($to));
$sql.=" and sms.CreatedOn <= '".$tod."'";
}
$sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem,Sem_year"; $sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem,Sem_year";
// print_r($sql);die();
$leadDet=$this->db->query($sql); $leadDet=$this->db->query($sql);
$mstatusDetails = $leadDet->result(); $mstatusDetails = $leadDet->result();
if (count($mstatusDetails) > 0) { if (count($mstatusDetails) > 0) {
@ -196,7 +206,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
return $results; return $results;
} }
public function certificate_status($bat=null,$br=null,$u=null,$from=null,$to=null){ public function certificate_status($bat=null,$br=null,$u=null,$from=null,$to=null,$st=null){
// $sql = "select sms.sid as Student_id,sms.cid,ifnull(sms.status,'-') as status,ifnull(sms.adate,'-') as adate,ifnull(sms.acmts,'-') as acmts,ifnull(sms.ctype,'-') as ctype,ifnull(sms.certname,'-') as certname,ifnull(balance,'-') as balance,ifnull(sfp.BillDate,'-') as initialPaid,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,cm.uid as univID,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber // $sql = "select sms.sid as Student_id,sms.cid,ifnull(sms.status,'-') as status,ifnull(sms.adate,'-') as adate,ifnull(sms.acmts,'-') as acmts,ifnull(sms.ctype,'-') as ctype,ifnull(sms.certname,'-') as certname,ifnull(balance,'-') as balance,ifnull(sfp.BillDate,'-') as initialPaid,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,cm.uid as univID,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
// from // from
@ -240,7 +250,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
// (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,concat(FirstName,' ',Lastname) as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid // (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,concat(FirstName,' ',Lastname) as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
// left join // left join
// (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid // (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid
$sql ="SELECT sms.sid AS Student_id,sms.cid,ifnull(sms.status,'-') AS STATUS,ifnull(DATE_FORMAT(sms.adate, '%d-%m-%Y'),'-') AS adate,ifnull(sms.acmts,'-') AS acmts,ifnull(sms.ctype,'-') AS ctype,ifnull(sms.certname,'-') AS certname,ifnull(balance,'-') AS balance,ifnull(sfb.bdate,'-') AS initialPaid,ifnull(scd.eid,'-') AS Enrollment_id,ifnull(std.name,'-') AS Student_name,ifnull(std.father,'-') AS Father_name,ifnull(std.phone,'-') AS Phone_number,ifnull(cm.course,'-') AS Course_name,ifnull(cm.uname,'-') AS University,cm.uid AS univID,ifnull(std.address,'-') AS address,ifnull(std.AlternateNumber,'') AS AlternateNumber,sfs.batch as Batch,scd.coursestatus as Course_Status,ifnull(andate.courierdetails,'-') as Courier_Details $sql ="SELECT sms.sid AS Student_id,sms.cid,ifnull(sms.status,'-') AS STATUS,ifnull(DATE_FORMAT(sms.adate, '%d-%m-%Y'),'-') AS adate,ifnull(sms.acmts,'-') AS acmts,ifnull(sms.ctype,'-') AS ctype,ifnull(sms.certname,'-') AS certname,ifnull(balance,'-') AS balance,ifnull(sfb.bdate,'-') AS initialPaid,ifnull(scd.eid,'-') AS Enrollment_id,ifnull(std.name,'-') AS Student_name,ifnull(std.father,'-') AS Father_name,ifnull(std.phone,'-') AS Phone_number,ifnull(cm.course,'-') AS Course_name,ifnull(cm.uname,'-') AS University,cm.uid AS univID,ifnull(std.address,'-') AS address,ifnull(std.AlternateNumber,'') AS AlternateNumber,sfs.batch as Batch,IFNULL(sfs.batchname, '-') AS Batch_Name,scd.coursestatus as Course_Status,IFNULL(certiSt.courierdetails, '-') AS Courier_Details
FROM FROM
( (
SELECT app.ID,app.StudentID AS sid,app.CourseID AS cid,app.BranchCode AS branch,app.ListCode AS lcode,p.ListName AS STATUS,STR_TO_DATE(AppDate, '%d-%m-%Y' SELECT app.ID,app.StudentID AS sid,app.CourseID AS cid,app.BranchCode AS branch,app.ListCode AS lcode,p.ListName AS STATUS,STR_TO_DATE(AppDate, '%d-%m-%Y'
@ -252,8 +262,9 @@ AS adate,app.Comments AS acmts,CertificationType AS ctype,app.CertificationType
WHERE app.CertificationType NOT LIKE 'CERT%' AND app.ID IN (SELECT max(ID) FROM T_ApplicationStatus GROUP BY StudentID,CourseID,BranchCode,CertificationType) WHERE app.CertificationType NOT LIKE 'CERT%' AND app.ID IN (SELECT max(ID) FROM T_ApplicationStatus GROUP BY StudentID,CourseID,BranchCode,CertificationType)
GROUP BY app.ID) AS sms GROUP BY app.ID) AS sms
LEFT JOIN LEFT JOIN
(SELECT FeesID AS fid,BatchCode AS batch,StudentID AS sid,CourseID AS cid,FeesType AS ftype,sum(CourseFees) AS cf,Sum(STFOrWR) AS stf,sum(Others) AS others (SELECT FeesID AS fid,T_Students_Fees_Status.BatchCode AS batch,StudentID AS sid,CourseID AS cid,FeesType AS ftype,sum(CourseFees) AS cf,Sum(STFOrWR) AS stf,sum(Others) AS others,T_BatchMaster.BatchName as batchname
FROM T_Students_Fees_Status FROM T_Students_Fees_Status
left join T_BatchMaster on T_BatchMaster.BatchCode = T_Students_Fees_Status.BatchCode
GROUP BY sid,cid,fid) GROUP BY sid,cid,fid)
AS sfs ON sfs.sid=sms.sid AND sfs.cid=sms.cid AND sfs.ftype=sms.ctype AS sfs ON sfs.sid=sms.sid AND sfs.cid=sms.cid AND sfs.ftype=sms.ctype
LEFT JOIN LEFT JOIN
@ -275,11 +286,10 @@ LEFT JOIN
LEFT JOIN LEFT JOIN
(SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(Status,'-') as coursestatus (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(Status,'-') as coursestatus
FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid And scd.coursestatus not in ('Cancelled','Discontinued','Refund_issued') FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid And scd.coursestatus not in ('Cancelled','Discontinued','Refund_issued')
left join (select StudentID as sid,CourierDetails as courierdetails LEFT JOIN
from T_AnswerBookletStatus abs (SELECT StudentID AS sid, CourierDetails AS courierdetails FROM T_CertificationStatus cs
left join T_PickListDetails list on list.ListCode=abs.ListCode WHERE CDate IS NOT NULL AND ID IN (SELECT MAX(ID) FROM T_CertificationStatus WHERE CDate IS NOT NULL GROUP BY StudentID , Sem)
where AnsDate is not null and ID in ( select max(ID) from T_AnswerBookletStatus where AnsDate is not null group by StudentID,Sem) GROUP BY sid , Sem) AS certiSt ON certiSt.sid = sms.sid
group by sid,Sem) as andate on andate.sid=sms.sid
where sms.branch = '".$br."'"; where sms.branch = '".$br."'";
@ -308,6 +318,9 @@ left join (select StudentID as sid,CourierDetails as courierdetails
$sql.=" and sfb.bdate <= '".$tod."'"; $sql.=" and sfb.bdate <= '".$tod."'";
}
if ($st != ''){
$sql.=" and sms.lcode = '".$st."'";
} }
$sql.=" group by Student_id,cid,ctype"; $sql.=" group by Student_id,cid,ctype";
$sql.=" ORDER BY sfb.bdate ASC"; $sql.=" ORDER BY sfb.bdate ASC";
@ -641,7 +654,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
return $results; return $results;
} }
public function app_pending($bat=null,$br=null,$u=null){ public function app_pending($bat=null,$br=null,$u=null,$st=null,$from=null,$to=null,$udate=null){
@ -770,10 +783,53 @@ WHERE STU.IsActive = '1' and APFS.ID in (select max(ID) from T_ApplicationFormSt
} }
if ($u!= ''){ if ($u!= ''){
if($u=="all"){
$sql.=" and COUR.UniversityID = '".$u."'"; $this->db->select('UniversityID');
$this->db->where('IsActive','1');
$this->db->where('BranchCode',$br);
$university = $this->db->get(UNIVERSITY);
$q = [];
for($i = 0 ; $i<count($university->result());$i++)
{
$q[$i] = $university->result()[$i]->UniversityID;
}
$sql.=" and COUR.UniversityID in ('".implode("','",$q)."')";
} }
else{
$sql.=" and COUR.UniversityID = '".$u."'";
}
}
if($st != ''){
if($st=="all"){
$resn = $this->db->query("select ListCode from T_PickListDetails where T_PickListDetails.IsActive = 1 and T_PickListDetails.BranchCode = ? and T_PickListDetails.ListName in ('RECEIVED','PENDING') order by T_PickListDetails.ListGroup desc;",array($br));
$list = $resn->result();
$q = [];
for($i = 0 ; $i<count($list);$i++)
{
$q[$i] = $list[$i]->UniversityID;
}
$sql.=" and APFS.ListCode in ('".implode("','",$q)."')";
}
else{
$sql.=" and APFS.ListCode = '".$st."'";
}
}
if ($from != ''){
$fromd= date("Y-m-d",strtotime($from));
$sql.="and STR_TO_DATE(BALFEE.CreatedOn,'%d-%m-%Y') >= '".$fromd."'";
}
if ($to != ''){
$tod=date("Y-m-d",strtotime($to));
$sql.=" and STR_TO_DATE(BALFEE.CreatedOn,'%d-%m-%Y') <= '".$tod."'";
}
if ($udate != ''){
$ud=date("Y-m-d",strtotime($udate));
$sql.=" and STR_TO_DATE(APFS.AppFormDate,'%d-%m-%Y') = '".$ud."'";
}
$sql.=" and STU_COUR.IsActive='1'"; $sql.=" and STU_COUR.IsActive='1'";
$sql.=" and STU.BranchCode='".$br."'"; $sql.=" and STU.BranchCode='".$br."'";
@ -782,8 +838,6 @@ WHERE STU.IsActive = '1' and APFS.ID in (select max(ID) from T_ApplicationFormSt
$sql.=" ORDER BY StatusUpdationOn,InitialPayDate ASC "; $sql.=" ORDER BY StatusUpdationOn,InitialPayDate ASC ";
$leadDet=$this->db->query($sql); $leadDet=$this->db->query($sql);
// print_r($sql);
// die();
$answer = $leadDet->result(); $answer = $leadDet->result();
if (count($answer) > 0) { if (count($answer) > 0) {
$results['app_pendingList'] = true; $results['app_pendingList'] = true;
@ -1241,6 +1295,38 @@ from T_Lead_Tracking_Followup as ltf
$this->db->order_by('BatchDate','DESC'); $this->db->order_by('BatchDate','DESC');
$batchDetails = $this->db->get(BATCH); $batchDetails = $this->db->get(BATCH);
return $batchDetails->result(); return $batchDetails->result();
}
public function getUniversity2($br=null)
{
$this->db->select('UniversityID,UniversityName');
$this->db->where('BranchCode',$br);
$this->db->order_by('CreatedOn','DESC');
$university = $this->db->get(UNIVERSITY);
if($university->result()){
$result = array();
$result['univlist'] = true;
foreach ($university->result() as $row)
{
$university_array['universityID'] = $row->UniversityID;
$university_array['universityName'] = $row->UniversityName;
$university_array['batchDetails']= $this->getBatch($row->UniversityID,$br);
$result_array[]=$university_array;
}
$result['university']= $result_array;
}
else {
$result['univlist'] = false;
$result['message'] = "No records found!";
$result['universityID'] = "";
$result['universityName'] = "";
$result['batchDetails']= "";
}
// print_r( $this->db->last_query());
// die();
return $result;
} }
public function GetAllUniversity($branchId) public function GetAllUniversity($branchId)
{ {
@ -1266,7 +1352,6 @@ from T_Lead_Tracking_Followup as ltf
return $result_array; return $result_array;
} }
public function GetNewRegList($det) public function GetNewRegList($det)
{ {
@ -1531,4 +1616,25 @@ if($feeDetails)
} }
public function getDefaultActivity($code,$reqBranch)
{
$this->db->select('DA.StudentActivityCode,PLD.ListCode,PLD.ListName');
$this->db->from(DEFAULTACTIVITY .' as DA');
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = DA.StatusCode');
$this->db->where('PLD.IsActive','1');
$this->db->where('DA.IsActive','1');
$this->db->where('DA.BranchCode', $reqBranch);
$this->db->where('DA.StudentActivityCode',$code);
$result=$this->db->get()->result();
return $result;
}
public function getAppPendingStatus($br){
$query = "select ListCode,ListName,BranchCode from T_PickListDetails where T_PickListDetails.IsActive = 1 and T_PickListDetails.BranchCode = ? and T_PickListDetails.ListName in ('RECEIVED','PENDING') order by T_PickListDetails.ListGroup desc;";
$resn = $this->db->query($query,array($br));
$list = $resn->result();
$result = count($list) > 0 ? $list : array();
return $result;
}
} }

View File

@ -51,12 +51,16 @@ $scope.generateButtonStatus = false;
"branch": "", "branch": "",
"university": "", "university": "",
"batch": "", "batch": "",
"status":"",
"from_date":"",
"to_date":"",
"updated_date":""
}; };
$scope.filters = function () { $scope.filters = function () {
var filterlist = { var filterlist = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'report_filters/', url: apiPoint.url + 'report_app_pending_filter/',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
@ -71,6 +75,7 @@ $scope.generateButtonStatus = false;
$scope.batch=[]; $scope.batch=[];
$scope.batchlist = response.data.batch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
$scope.statuslist = response.data.rollnostatus;
//Desc order Batchlist //Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) { angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-"); var parts = values.BatchDate.split("-");
@ -92,14 +97,25 @@ $scope.generateButtonStatus = false;
$scope.$watch('univModel.university', function (newValue,oldValue) { $scope.$watch('univModel.university', function (newValue,oldValue) {
if(newValue==undefined || newValue==''){ if(newValue==undefined || newValue==''){
$scope.filterBatchDetails=""; $scope.filterBatchDetails="";
$scope.disableSubmit=true;
console.log($scope.filterBatchDetails); console.log($scope.filterBatchDetails);
} }
else{ else{
if(angular.isString(newValue)){ if(angular.isString(newValue)){
$scope.disableSubmit=false;
$scope.filterBatchDetails=angular.fromJson(newValue); $scope.filterBatchDetails=angular.fromJson(newValue);
} }
} }
});
$scope.$watchCollection('univModel.status', function (newValue,oldValue) {
if(newValue==undefined || newValue=='' || newValue==null){
$scope.disableSubmit=true;
}
else{
$scope.disableSubmit=false;
}
}); });
//Response data //Response data
$scope.show = false; $scope.show = false;
@ -116,16 +132,17 @@ $scope.generateButtonStatus = false;
var field = null, firstError = null; var field = null, firstError = null;
$scope.show = true; $scope.show = true;
for (field in form) { for (field in form) {
console.log('field',field);
if (field[0] != '$') { if (field[0] != '$') {
if (firstError === null && !form[field].$valid) { if (firstError === null && !form[field].$valid) {
firstError = form[field].$batch; firstError = form[field].$name;
} }
if (form[field].$pristine) { if (form[field].$pristine) {
form[field].$dirty = true; form[field].$dirty = true;
} }
} }
} }
angular.element('.ng-invalid[batch=' + firstError + ']').focus(); angular.element('.ng-invalid[name=' + firstError + ']').focus();
}else { }else {
//alert($scope.batch.name); //alert($scope.batch.name);
$scope.app_pending_data = ''; $scope.app_pending_data = '';
@ -139,7 +156,11 @@ $scope.generateButtonStatus = false;
data: { data: {
branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID, branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID,
university: $scope.filterUniv.universityID, university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch batch: $scope.univModel.batch,
status:$scope.univModel.status,
from:$scope.univModel.from_date,
to:$scope.univModel.to_date,
updateddate:$scope.univModel.updated_date
} }

View File

@ -52,6 +52,7 @@ $scope.generateButtonStatus = false;
"branch": "", "branch": "",
"university": "", "university": "",
"batch": "", "batch": "",
"status":"",
"from_date": "", "from_date": "",
"to_date": "", "to_date": "",
@ -60,7 +61,7 @@ $scope.generateButtonStatus = false;
$scope.filters = function () { $scope.filters = function () {
var filterlist = { var filterlist = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'report_filters/', url: apiPoint.url + 'report_certificate_filter/',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
@ -75,6 +76,7 @@ $scope.generateButtonStatus = false;
$scope.batch=[]; $scope.batch=[];
$scope.batchlist = response.data.batch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
$scope.certificatestatus = response.data.certificatestatus;
//Desc order Batchlist //Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) { angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-"); var parts = values.BatchDate.split("-");
@ -108,7 +110,7 @@ $scope.generateButtonStatus = false;
}); });
// disable submit // disable submit
$scope.$watchCollection('univModel.from_date', function (newValue,oldValue) { $scope.$watchCollection('univModel.status', function (newValue,oldValue) {
if(newValue==undefined || newValue=='' || newValue==null){ if(newValue==undefined || newValue=='' || newValue==null){
$scope.disableSubmit=true; $scope.disableSubmit=true;
} }
@ -139,6 +141,7 @@ $scope.generateButtonStatus = false;
branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID, branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID,
university: $scope.filterUniv.universityID, university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch, batch: $scope.univModel.batch,
status:$scope.univModel.status,
from : $scope.univModel.from_date, from : $scope.univModel.from_date,
to : $scope.univModel.to_date to : $scope.univModel.to_date
} }
@ -185,7 +188,7 @@ $scope.generateButtonStatus = false;
$scope.exportData = function () { $scope.exportData = function () {
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,initialPaid as CertificateFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as Course,University as University,CAST(balance AS NUMBER) as Balance,certname as CertificateName,STATUS as CertificateStatus,acmts as Comments, adate as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]); alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,initialPaid as CertificateFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as Course,University as University,CAST(balance AS NUMBER) as Balance,certname as CertificateName,STATUS as CertificateStatus,acmts as Comments, adate as Date,Batch_Name as Batch,Courier_Details as CertificationCourierDetails INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
}; };
$scope.$watch(function () { $scope.$watch(function () {
$scope.filteredItems = $scope.$eval(" cert_data | filter: search "); $scope.filteredItems = $scope.$eval(" cert_data | filter: search ");
@ -357,7 +360,7 @@ $scope.generateButtonStatus = false;
var firstError = null; var firstError = null;
if (form.$invalid) { if (form.$invalid) {
console.log('field',field);
var field = null, firstError = null; var field = null, firstError = null;
for (field in form) { for (field in form) {
if (field[0] != '$') { if (field[0] != '$') {

View File

@ -50,19 +50,20 @@ $scope.generateButtonStatus = false;
"branch": "", "branch": "",
"university": "", "university": "",
"batch": "", "batch": "",
"status":"",
"from_date": "",
"to_date": ""
}; };
$scope.filters = function () { $scope.filters = function () {
var filterlist = { var filterlist = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'report_filters/', url: apiPoint.url + 'report_markcard_filter/',
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
branch : JSON.parse(sessionStorage.getItem('localObj')).localBranchID branch : JSON.parse(sessionStorage.getItem('localObj')).localBranchID
} }
}; };
@ -71,6 +72,7 @@ $scope.generateButtonStatus = false;
$scope.batch=[]; $scope.batch=[];
$scope.batchlist = response.data.batch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
$scope.markcardstatus = response.data.markcardstatus;
//Desc order Batchlist //Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) { angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-"); var parts = values.BatchDate.split("-");
@ -84,6 +86,7 @@ $scope.generateButtonStatus = false;
// call service for make a list in desc order based on date // call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch); $scope.batch=dateListDescService.getOrderByList($scope.batch);
console.log(response.data.batch); console.log(response.data.batch);
// console.log('89',response.data.markcardstatus);
console.log($scope.batch); console.log($scope.batch);
} else { } else {
} }
@ -94,24 +97,39 @@ $scope.generateButtonStatus = false;
$scope.$watch('univModel.university', function (newValue,oldValue) { $scope.$watch('univModel.university', function (newValue,oldValue) {
if(newValue==undefined || newValue==''){ if(newValue==undefined || newValue==''){
$scope.filterBatchDetails=""; $scope.filterBatchDetails="";
$scope.disableSubmit=true;
} }
else{ else{
if(angular.isString(newValue)){ if(angular.isString(newValue)){
$scope.filterBatchDetails=angular.fromJson(newValue); $scope.filterBatchDetails=angular.fromJson(newValue);
$scope.disableSubmit=false;
} }
} }
});
// disable submit
$scope.$watchCollection('univModel.status', function (newValue,oldValue) {
if(newValue==undefined || newValue=='' || newValue==null){
$scope.disableSubmit=true;
}
else{
$scope.disableSubmit=false;
}
}); });
$scope.show = false; $scope.show = false;
$scope.onSubmit = function (form) { $scope.onSubmit = function (form) {
$scope.isLoaderShow1 =true; $scope.isLoaderShow1 =true;
console.log(form);
var firstError = null; var firstError = null;
if (form.$invalid) { if (form.$invalid) {
var field = null, firstError = null; var field = null, firstError = null;
$scope.show = true; $scope.show = true;
for (field in form) { for (field in form) {
console.log('field',field);
console.log($batch);
if (field[0] != '$') { if (field[0] != '$') {
if (firstError === null && !form[field].$valid) { if (firstError === null && !form[field].$valid) {
firstError = form[field].$batch; firstError = form[field].$batch;
@ -136,7 +154,11 @@ $scope.generateButtonStatus = false;
data: { data: {
branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID, branch: JSON.parse(sessionStorage.getItem('localObj')).localBranchID,
university: $scope.filterUniv.universityID, university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch batch: $scope.univModel.batch,
status: $scope.univModel.status,
from_date: $scope.univModel.from_date,
to_date: $scope.univModel.to_date
} }
}; };
@ -175,7 +197,7 @@ $scope.generateButtonStatus = false;
$scope.exportData = function () { $scope.exportData = function () {
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Initial_paid_date as InitialPaymentPaidDate,Enrollment_id as EnrollmentID,Roll_NO as RollNO,Student_name as StudentName,Father_name as FatherName,Course_name as Course,Sem_year as SemYear,University as University,CAST(Balance_Fee AS NUMBER) as BalanceFee,appdate as ApplicationSenttoUnivDate,ansdate as AnswerBookletUnivDate,Status as MarkCardStatus,Date as Date INTO XLS("Markcard_status.xls",?) FROM ?',[mystyle,$scope.markcard_data]); alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Initial_paid_date as InitialPaymentPaidDate,Enrollment_id as EnrollmentID,Roll_NO as RollNO,Student_name as StudentName,Father_name as FatherName,Course_name as Course,Sem_year as SemYear,University as University,CAST(Balance_Fee AS NUMBER) as BalanceFee,appdate as ApplicationSenttoUnivDate,ansdate as AnswerBookletUnivDate,Status as MarkCardStatus,Date as Date,Batch_Name as Batch,Courier_Details as AnswerBooksCourierDetails INTO XLS("Markcard_status.xls",?) FROM ?',[mystyle,$scope.markcard_data]);
}; };
$scope.$watch(function () { $scope.$watch(function () {
$scope.filteredItems = $scope.$eval(" markcard_data | filter: search "); $scope.filteredItems = $scope.$eval(" markcard_data | filter: search ");

View File

@ -53,23 +53,66 @@
</select> </select>
<span style="color:red;" ng-if="show" ng-show="Form.university.$dirty && Form.university.$error.required">Please select University.</span> <span style="color:red;" ng-if="show" ng-show="Form.university.$dirty && Form.university.$error.required">Please select University.</span>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label> <label>
Batch Batch
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="batch" ng-model="univModel.batch" required> <select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="batch" ng-model="univModel.batch">
<option value="" selected>Select Batch</option> <option value="" selected>Select Batch</option>
<option ng-repeat="batchDetails in filterBatchDetails.batchDetails" value="{{batchDetails.BatchCode}}">{{batchDetails.BatchName}}</option> <option ng-repeat="batchDetails in filterBatchDetails.batchDetails" value="{{batchDetails.BatchCode}}">{{batchDetails.BatchName}}</option>
</select> </select>
<span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span> <!-- <span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span> -->
</div>
<div class="col-md-3">
<label>Status</label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required>
<option value="" selected>Select Status</option>
<option ng-repeat="details in statuslist" value="{{details.ListCode}}">{{details.ListName}}</option>
</select>
<span style="color:red;" ng-if="show" ng-show="Form.status.$dirty && Form.status.$error.required">Please select Status.</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div data-ng-controller="DatepickerDemoCtrl">
<label>
From Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.from_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3">
<div data-ng-controller="DatepickerDemoCtrl">
<label>
To Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.to_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3">
<div data-ng-controller="DatepickerDemoCtrl">
<label>
Updated Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.updated_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" show-button-bar="true" />
</div>
</div> </div>
<div class="col-md-2" style="padding-top: 2.3%;"> <div class="col-md-2" style="padding-top: 2.3%;">
<div> <div>
<button type="submit" class="btn btn-success btn-o" tabindex="8"> <button type="submit" class="btn btn-success btn-o" tabindex="8" ng-disabled="disableSubmit==true">
Submit Submit
</button> </button>
@ -86,7 +129,7 @@
<div class="col-md-6"> <div class="col-md-6">
<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> </div>
<div class="col-md-6" style="align:right"> <div class="col-md-6" >
<button class="btn btn-success btn-o" ng-click="sendingsms()">Send SMS</button> <button class="btn btn-success btn-o" ng-click="sendingsms()">Send SMS</button>
<button class="btn btn-success btn-o" ng-click="calltracking()">Call Tracking</button> <button class="btn btn-success btn-o" ng-click="calltracking()">Call Tracking</button>

View File

@ -63,6 +63,18 @@ td,th {
</select> </select>
<span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span> <span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span>
</div> --> </div> -->
<div class="col-md-4">
<label for="form-field-select-2">
Status
</label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required>
<option value="" selected>Select Status</option>
<option ng-repeat="details in certificatestatus" value="{{details.ListCode}}">{{details.ListName}}</option>
</select>
<span style="color:red;" ng-if="show" ng-show="Form.status.$dirty && Form.status.$error.required">Please select Status.</span>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
@ -73,7 +85,7 @@ td,th {
</label> </label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.from_date" <input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.from_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions" is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()" placeholder="Select Date" close-text="Close" ng-change="changeDate()"
show-button-bar="true" /> show-button-bar="true" />
</div> </div>
@ -86,7 +98,7 @@ td,th {
</label> </label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.to_date" <input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.to_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions" is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()" placeholder="Select Date" close-text="Close" ng-change="changeToDate()"
show-button-bar="true" /> show-button-bar="true" />
</div> </div>

View File

@ -22,9 +22,7 @@ td,th {
th { th {
cursor: pointer; cursor: pointer;
} */ } */
.word-break{
word-wrap: break-word;
}
</style> </style>
<script type="text/javascript" src="bower_components/ng-table-excel-export/ng-table-excel-export.min.js"> <script type="text/javascript" src="bower_components/ng-table-excel-export/ng-table-excel-export.min.js">
@ -177,7 +175,7 @@ td,th {
<th>University</th> <th>University</th>
<th>Course</th> <th>Course</th>
<th>Present Status</th> <th>Present Status</th>
<th>Comments</th> <th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Comments</th>
<th>Activity</th> <th>Activity</th>
<th>Assigned To</th> <th>Assigned To</th>
@ -196,7 +194,7 @@ td,th {
<td>{{p.univ}}</td> <td>{{p.univ}}</td>
<td>{{p.course}}</td> <td>{{p.course}}</td>
<td>{{p.prsStatus}}</td> <td>{{p.prsStatus}}</td>
<td class="word-break">{{p.cmnts}}</td> <td style="max-width: 120px;white-space: pre-wrap; word-wrap: break-word !important;">{{p.cmnts}}</td>
<td>{{p.activity}}</td> <td>{{p.activity}}</td>
<td>{{p.AssignTo}}</td> <td>{{p.AssignTo}}</td>

View File

@ -42,29 +42,52 @@
<label> <label>
Batch Batch
</label><br> </label><br>
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="batch" ng-model="univModel.batch">
<select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="batch" ng-model="univModel.batch" required>
<option value="" selected>Select Batch</option> <option value="" selected>Select Batch</option>
<option ng-repeat="batchDetails in filterBatchDetails.batchDetails" value="{{batchDetails.BatchCode}}">{{batchDetails.BatchName}}</option> <option ng-repeat="batchDetails in filterBatchDetails.batchDetails" value="{{batchDetails.BatchCode}}">{{batchDetails.BatchName}}</option>
</select> </select>
<span style="color:red;" ng-if="show" ng-show="Form.batch.$dirty && Form.batch.$error.required">Please select Batch.</span>
</div> </div>
<!-- <div class="col-md-3">
<label for="form-field-select-2">
Batch
</label>
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="batch" ng-model="searchData.Batch" ng-change="getValueChange()"> <div class="col-md-3">
<option value="" selected>Select Batch</option> <label>Mark Card Status</label><br>
<option ng-repeat="itemBatch in batchData" value="{{itemBatch.BatchCode}}">{{itemBatch.BatchName}}</option> <select ui-select2 class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="status" ng-model="univModel.status" required>
<option value="" selected>Select Status</option>
<option ng-repeat="details in markcardstatus" value="{{details.ListCode}}">{{details.ListName}}</option>
</select> </select>
</div> --> <span style="color:red;" ng-if="show" ng-show="Form.status.$dirty && Form.status.$error.required">Please select Status.</span>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div data-ng-controller="DatepickerDemoCtrl">
<label>From Date</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.from_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3">
<div data-ng-controller="DatepickerDemoCtrl">
<label>To Date </label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="univModel.to_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-2" style="padding-top: 2.3%;"> <div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right"> <div class="pull-right">
<button type="submit" class="btn btn-success btn-o" tabindex="8"> <button type="submit" class="btn btn-success btn-o" tabindex="8" ng-disabled="disableSubmit==true">
Submit Submit
</button> </button>