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.188.245.152
Current Path : /var/www/oasis/src_old/ |
| Current File : /var/www/oasis/src_old/admchallanpreparation.php |
<?php
class ack_rv_rt_application
{
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 PrepareChallanDetailsForAdm()
{
$checked_app_nos = trim($this->aobj_context->mobj_data["checked_app_nos"]);
$FAPPCNT = trim($this->aobj_context->mobj_data["FAPPCNT"]);
$FCHALAMT = trim($this->aobj_context->mobj_data["FCHALAMT"]);
$exp_arr = explode(",",$checked_app_nos);
$no_of_app = count($exp_arr);
$app_arry = implode(",",$exp_arr);
$query = "INSERT INTO chaldet (FCOLLCODE, FCHALDATE, FAPPCNT,FCHALAMT) VALUES ('{$this->college_code}',now(),'{$FAPPCNT}','{$FCHALAMT}')";
$result = $this->aobj_context->mobj_db->Execute($query);
if($result)
{
$id = $this->aobj_context->mobj_db->Insert_ID();
$query = "update studadm
set FCHALNO='{$id}'
where FAPPNO in($app_arry)";
$result = $this->aobj_context->mobj_db->Execute($query);
var_dump($result);
$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>";
$str_reval.="<td class='tbl_row1' style='text-align:left; border-left:1px solid #C5DBEC;border-top:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >Document No</td>";
$str_reval.="<td class='tbl_row1' id = 'docno' style='border-left:0px solid #C5DBEC; ;border-top:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:left; '>{$id}</td>";
$str_reval.="</tr>";
$str_reval.="<tr>";
$str_reval.="<td class='tbl_row_alter' style='text-align:left; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >Total Amount</td>";
$str_reval.="<td class='tbl_row_alter' id = 'challamt' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:left; ' >{$FCHALAMT}</td>";
$str_reval.="</tr>";
$str_reval.="<tr>";
$str_reval.="<td class='tbl_row1' style='text-align:left; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >No of Applications</td>";
$str_reval.="<td class='tbl_row1' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:left;' id = 'totapp' >{$no_of_app}</td>";
$str_reval.="</tr>";
$str_reval.="</table>";
$str_reval.="<span style='color:red;'>Note: Report is valid only on updating the challan paid details against document number.</span> ";
$str_reval.='<br><div style="width:42px; margin: 0 auto; ;float: none;" class="raval_submit">
<span style="margin-top: 2px;float:left;margin-left:8px;cursor: pointer; color:#545345;line-height: 19px;font-size:14px;font-weight:bold;" onclick="printchallan();">Print</span>
</div><br>';
$arr['html']=$str_reval;
}
if($result)
{
$arr['message'] = "updated successfully";
$arr['html']=$str_reval;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr = "updation failure";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
function DeleteAckowledgedApplications()
{
$APPNO = ($this->aobj_context->mobj_data["APPNO"]);
$update=" update res_stud
set FACKDATE=null,FACKUSER='{$this->log_name}'
where APPNO='{$APPNO}'";
$lobj_get_data = $this->aobj_context->mobj_db->Execute($update);
$data="Application(s) has been acknowledged successfully.";
echo $this->aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
}
function DisplayAdmChallanPreparationDetails()
{
$degree_from = trim($this->aobj_context->mobj_data["degree_from"]);
//$degree_to = trim($this->aobj_context->mobj_data["degree_to"]);
$appfrom = trim($this->aobj_context->mobj_data["appfrom"]);
$appto = trim($this->aobj_context->mobj_data["appto"]);
$get_data = "select s.fname, s.fchalno, s.fappno, s.fdegree,s.TOTAL_FEE as total_fee
from studadm s where s.fdegree between '{$degree_from}' and '{$degree_from}'
and ifnull(s.fdeleted,'') <> 'T' and fcollcode = '{$this->college_code}'
and ifnull(fappno,'') <> '' and ifnull(fchalno,'') = '' and ifnull(s.TOTAL_FEE,'') <> ''
and s.fappno between '{$appfrom}' and '{$appto}'";
//var_dump($get_data);
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
$str_reval.="<table class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='0'>";
$str_reval.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Application No</td>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Challan No.</td>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Student Name</td>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Degree</td>";
$str_reval.="<td align='center' style='padding:5px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Amount</td>";
$str_reval.="<td align='center' style='font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC; cursor:pointer;' onclick='SelectAllChallanPreparationCheckBox();' > Select All</td>";
$str_reval.="</tr>";
$k=0;
$sl_no=1;
foreach($lobj_get_data as $ak=>$av)
{
$fappno = $av['fappno'];
$fchallno = $av['fchallno'];
$fdegree = $av['fdegree'];
$fname = $av['fname'];
$total_fee = $av['total_fee'];
$disabled = "";
if($fchallno != '')
$disabled = "disabled checked";
if($k%2==0)
$class = 'tbl_row1';
else
$class = 'tbl_row_alter1';
$str_reval.="<tr class='ui-widget-content jqgrow'>";
$str_reval.="<td class='{$class} tbl_row_new' style='border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;text-align:center;' >{$sl_no}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:center; ' > {$fappno}</td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;text-align:center; ' >{$fchallno} </td>";
$str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:left; ' >{$fname}</td>";
$str_reval.="<td class='{$class} tbl_row_new' 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} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ; ;text-align:center; ' id = 'amount_{$fappno}'>{$total_fee}</td>";
$str_reval.="<td class='{$class} tbl_row_new' align='center' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;font-weight:bold;text-align:center;' ><input type='checkbox' value = '$fappno' onchange = 'gettotalchallanamount(\"{$fappno}\")' {$disabled} id='ack_check_box_{$fappno}' /></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 DisplayAdmChallanPreparationDetails($aobj_context)
{
$class_obj=new ack_rv_rt_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DisplayAdmChallanPreparationDetails();
}
function PrepareChallanDetailsForAdm($aobj_context)
{
$class_obj=new ack_rv_rt_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->PrepareChallanDetailsForAdm();
}
function DeleteAckowledgedApplications($aobj_context)
{
$class_obj=new ack_rv_rt_application($aobj_context);
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj->DeleteAckowledgedApplications();
}
?>
|