Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.222.161.57
<?php
class challan_entries
{
function __construct($aobj_context)
{
session_start();
$this->aobj_context=$aobj_context;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->user_id=$_SESSION['user_id'] ;
$this->collcode=$_SESSION['collcode'];
$this->college_code=$_SESSION['collcode'];
$this->log_name = $_SESSION['usr'];
}
function DeleteChallanDetails()
{
$FDOCNO = ($this->aobj_context->mobj_data["FDOCNO"]);
$update=" update res_stud
set FDOCNO=null, FDOCDATE=null
where FDOCNO='{$FDOCNO}'";
$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
$data="Document deleted successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
function DeleteDocNoFromChallanDetails()
{
$APPNO = ($this->aobj_context->mobj_data["APPNO"]);
$update=" update res_stud
set FDOCNO=null, FDOCDATE=null
where APPNO='{$APPNO}'";
$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
$data="Document deleted successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
function UpdateChallanDetailsForDoc()
{
$FDOCNO = ($this->aobj_context->mobj_data["FDOCNO"]);
$challan_no = ($this->aobj_context->mobj_data["challan_no"]);
$challan_date = ($this->aobj_context->mobj_data["challan_date"]);
$challan_amt = ($this->aobj_context->mobj_data["challan_amt"]);
$challan_place = ($this->aobj_context->mobj_data["challan_place"]);
$challan_bank = ($this->aobj_context->mobj_data["challan_bank"]);
$update=" update res_stud
set FCHALLANNO='{$challan_no}',
FCHALLANDATE='{$challan_date}',
FCHALLANPLACE='{$challan_place}',
FCHALLANAMOUNT='{$challan_amt}',
FCHALLANBANK='{$challan_bank}'
where FDOCNO='{$FDOCNO}'";
//var_dump($update);
$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
if($lobj_get_data)
{
$data="Challan Entry Updated successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
else
{
$data="Challan Entry Updation failed ";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
function DisplayChallanEntryDetails()
{
$up_to = ($aobj_context->mobj_data["up_to"]);
$cond="";
if($up_to!="0000-00-00")
$cond=" and r.FACKDATE>='{$up_to}'";
$get_data="SELECT IF(IFNULL(FUNIVRECDATE,'')='','Not Received','Received') AS doc_status,
FDOCNO,FCHALLANNO,DATE_FORMAT(IFNULL(FCHALLANDATE,'0000-00-00'),'%d/%m/%Y') AS FCHALLANDATE,
SUM(FAMOUNT) AS FAMOUNT,COUNT(DISTINCT APPNO) AS no_of_app,
DATE_FORMAT(IFNULL(FDOCDATE,'0000-00-00'),'%d/%m/%Y') AS challan_prepared_date
FROM res_stud WHERE FCOLLCODE='{$this->collcode}'
and ifnull(FDOCNO,'') <>''
GROUP BY FDOCNO";
//var_dump($get_data);
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
$str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='0'>";
$str_reval.="<tr class='tr_bg1'>";
$str_reval.="<td align='center' style=' font-size:11px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Document No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan No </td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan Date</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Amount</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>No of Appl.</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan Prepared Date</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Status</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'> </td>";
$str_reval.="</tr>";
$k=0;
$sl_no=1;
foreach($lobj_get_data as $ak=>$av)
{
$FDOCNO=$av['FDOCNO'];
$doc_status=$av['doc_status'];
$challan_prepared_date=$av['challan_prepared_date'];
$no_of_app=$av['no_of_app'];
$FAMOUNT=$av['FAMOUNT'];
$FCHALLANDATE=$av['FCHALLANDATE'];
$FCHALLANNO=$av['FCHALLANNO'];
$div_class="red_corner_div";
$delete_edit="<img onclick='EnableChallanUpdateScreen(\"{$FDOCNO}\")' src='img/Edit_New.jpg' title='Edit' /> ";
$delete_edit.="<img onclick='DeleteChallanDetails(\"{$FDOCNO}\")'; src='img/delete1.PNG' title='Delete Re-totaling College Acknowledged Application' /> ";
if($doc_status=="Received")
{
$delete_edit="";
$div_class="green_corner_div";
}
$new_doc_status='<div style= margin: 0 auto; " class="'.$div_class.'">
<span style=" color:#FFFFFF;line-height: 19px;font-size:11px;font-weight:bold;" >'.$doc_status.'</span>
</div>';
if($FCHALLANNO != '')
{
$challprint = "<img onclick='PrintChallanEntryDetails(\"{$FDOCNO}\")' src='img/Print_New.jpg' title='Edit' />";
}
else
{
$challprint = "";
}
if($k%2==0)
$class='tbl_row1';
else
$class='tbl_row_alter1';
$str_reval.="<tr>";
$str_reval.="<td class='{$class}' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$FDOCNO}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' >{$FCHALLANNO} </td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' > {$FCHALLANDATE}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FAMOUNT}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$no_of_app}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$challan_prepared_date}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$new_doc_status}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center; cursor:pointer; ' >{$challprint}{$delete_edit}</td>";
$str_reval.="</tr>";
/* if($k%2==0)
$class='tbl_row1';
else
$class='tbl_row_alter1';
$str_reval.="<tr>";
$str_reval.="<td class='{$class}' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$FDOCNO}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' >{$FCHALLANNO} </td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' > {$FCHALLANDATE}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FAMOUNT}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$no_of_app}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$challan_prepared_date}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$new_doc_status}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center; cursor:pointer; ' ><img onclick='PrintChallanEntryDetails(\"{$FDOCNO}\")' src='img/Print_New.jpg' title='Edit' />{$delete_edit}</td>";
$str_reval.="</tr>"; */
$sl_no++;
$k++;
}
$str_reval.="</table>";
$arr['html']=$str_reval;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function ShowApplicationsForDocNo()
{
$FDOCNO = ($this->aobj_context->mobj_data["FDOCNO"]);
$get_data=" SELECT r.APPNO,
DATE_FORMAT(r.FAPPDATE,'%d/%m/%Y') AS FAPPDATE,
DATE_FORMAT(r.FACKDATE,'%d/%m/%Y') AS FACKDATE,
r.FREGNO,s.FNAME,r.FDEGREE,sum(r.FAMOUNT) as FAMOUNT
FROM res_stud r INNER JOIN student s ON s.FREGNO=r.FREGNO
WHERE r.FCOLLCODE='{$this->collcode}' and r.FDOCNO='{$FDOCNO}'
group by r.APPNO";
//var_dump($get_data);
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
$str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='0'>";
$str_reval.="<tr class='tr_bg1'>";
$str_reval.="<td align='center' style=' font-size:11px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Application No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Applied Date</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Reg No</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Student Name</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Degree</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Amount</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'> Approved Date</td>";
$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'> Delete</td>";
$str_reval.="</tr>";
$k=0;
$sl_no=1;
foreach($lobj_get_data as $ak=>$av)
{
$APPNO=$av['APPNO'];
$FREGNO=$av['FREGNO'];
$FAPPDATE=$av['FAPPDATE'];
$FNAME=$av['FNAME'];
$FDEGREE=$av['FDEGREE'];
$FAMOUNT=$av['FAMOUNT'];
$FACKDATE=$av['FACKDATE'];
if($k%2==0)
$class='tbl_row1';
else
$class='tbl_row_alter1';
$str_reval.="<tr>";
$str_reval.="<td class='{$class}' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
$str_reval.="<td class='{$class}' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$APPNO}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' >{$FAPPDATE} </td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' > {$FREGNO}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FNAME}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FDEGREE}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FAMOUNT}</td>";
$str_reval.="<td class='{$class}' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' >{$FACKDATE}</td>";
$str_reval.="<td class='{$class}' align='center' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;font-weight:bold;text-align:center;' ><img onclick='DeleteDocNoFromChallanDetails({$FDOCNO},{$APPNO})'; src='img/delete1.PNG' title='Delete Re-totaling College Acknowledged Application' /></td>";
$str_reval.="</tr>";
$sl_no++;
$k++;
}
$str_reval.="</table>";
$get_other_details="SELECT FDOCNO,SUM(IFNULL(FAMOUNT,0)) AS FAMOUNT, IFNULL(FCHALLANNO,'') AS FCHALLANNO,DATE_FORMAT(IFNULL(FCHALLANDATE,'0000-00-00'),'%d/%m/%Y') AS FCHALLANDATE,IFNULL(FCHALLANPLACE,'') AS FCHALLANPLACE,
IFNULL(FCHALLANAMOUNT,0) AS FCHALLANAMOUNT,IFNULL(FCHALLANBANK,'') FCHALLANBANK
FROM res_stud WHERE FCOLLCODE='{$this->collcode}' and FDOCNO='{$FDOCNO}'
GROUP BY FDOCNO";
//var_dump($get_other_details);
$lobj_get_other_details = $this->aobj_context->mobj_db->GetRow($get_other_details);
$arr['html']=$str_reval;
$arr['data']=$lobj_get_other_details;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
}
function DisplayChallanEntryDetails($aobj_context)
{
$class_obj=new challan_entries($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DisplayChallanEntryDetails();
}
function DeleteChallanDetails($aobj_context)
{
$class_obj=new challan_entries($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DeleteChallanDetails();
}
function ShowApplicationsForDocNo($aobj_context)
{
$class_obj=new challan_entries($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->ShowApplicationsForDocNo();
} function DeleteDocNoFromChallanDetails($aobj_context)
{
$class_obj=new challan_entries($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DeleteDocNoFromChallanDetails();
} function UpdateChallanDetailsForDoc($aobj_context)
{
$class_obj=new challan_entries($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->UpdateChallanDetailsForDoc();
}
?>
|