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 : 3.144.104.175
Current Path : /var/www/results/kus/src/ |
| Current File : /var/www/results/kus/src/applicationFormReportNEFT.php |
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
require_once($pdf_writer_class);
class applicationFormReport
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
$this->pdf= new FPDF();
$this->pdf=$this;
$this->app_no=trim($this->aobj_context->mobj_data["app_no"]);
$this->ip=$_SERVER["REMOTE_ADDR"];
$get_date="select date_add(date_add(now(),INTERVAL 13 hour),interval 30 minute) as now_date";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
require_once("getnumword.php");
$this->current_date=$obj[now_date];
$this->pdf = new FPDF('L');
$this->pdf->SetMargins(2,5,2);
$this->pdf->addPage('L');
}
function formcolldata()
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',
FUNIVADD1 as 'state', pdf_logo_path,ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
$this->s_state=$lobj_get_coll_name['state'];
$this->f_year=$lobj_get_coll_name['f_year'];
$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
$this->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
}
function GetBankDetails()
{
$get_data="SELECT bank_name, acc_no, branch_name, branch_code, ifsc_code, cheque_favour, place,bank_charge
FROM acc_mas where payment_type='{$this->FPAYMENTYPE}'";
$lobj_get_data= $this->aobj_context->mobj_db->GetRow($get_data);
$this->bank_name=$lobj_get_data['bank_name'];
$this->acc_no=$lobj_get_data['acc_no'];
$this->branch_name=$lobj_get_data['branch_name'];
$this->branch_code=$lobj_get_data['branch_code'];
$this->ifsc_code=$lobj_get_data['ifsc_code'];
$this->cheque_favour=$lobj_get_data['cheque_favour'];
$this->place=$lobj_get_data['place'];
$this->bank_charge=$lobj_get_data['bank_charge'];
}
function GetData()
{
$get_app_no=" SELECT FREGNO ,'' FRECPTNO,FAPPDATE AS FRECPTDATE,FTOTAL AS FTOTALFEE, FPAYMENTYPE,'' FFEETYPE,'' FCATEGORY
FROM res_stud
where APPNO='{$this->app_no}' group by APPNO ";
$obj_get_app_no=$this->aobj_context->mobj_db->GetRow($get_app_no);
$this->reg_no=$obj_get_app_no['FREGNO'];
$this->FRECPTDATE=$obj_get_app_no['FRECPTDATE'];
$this->FTOTALFEE=$obj_get_app_no['FTOTALFEE'];
$this->FPAYMENTYPE=$obj_get_app_no['FPAYMENTYPE'];
$this->FCATEGORY=$obj_get_app_no['FCATEGORY'];
$this->FFEETYPE=$obj_get_app_no['FFEETYPE'];
$get_other_details="select date_format(current_date,'%d/%m/%Y') as curr_date,FDEGREE,FCOLLCODE,FNAME,CONCAT(IFNULL(FCURRADD1,''),' ',FCURRADD2) AS s_address from student where FREGNO='{$this->reg_no}' ";
$lobj_get_name = $this->aobj_context->mobj_db->GetRow($get_other_details);
$this->college_code=$lobj_get_name['FCOLLCODE'];
$this->degree=$lobj_get_name['FDEGREE'];
$this->student_name=$lobj_get_name['FNAME'];
$this->s_address=$lobj_get_name['s_address'];
$this->curr_date=$lobj_get_name['curr_date'];
$this->GetBankDetails();
}
function WriteRect()
{
$width=96;
$this->pdf->Rect(2,5,$width,200);
$this->pdf->Rect(2+$width+2,5,$width,200);
$this->pdf->Rect(2+$width+$width+4,5,$width,200);
if(!empty($this->pdf_logo_path))
{
$img_logo_path=$this->aobj_context->main_src.$this->pdf_logo_path;
$this->pdf->Image($img_logo_path,4,7,15);
$this->pdf->Image($img_logo_path,$width+6,7,15);
$this->pdf->Image($img_logo_path,$width+$width+7,7,15);
}
$this->pdf->setY(5);
}
function formData($label)
{
$line_height=5;
$width=96;
$x_pos=2;
if($this->pos==2)
$x_pos=2+$width+2;
if($this->pos==3)
$x_pos=2+$width+2+$width+2;
$jump_width=$width;
if($this->pos==2)
$jump_width=$width;
else if($this->pos==3)
$jump_width=$width;
$this->pdf->SetX($x_pos);
$this->old_y=$this->pdf->GetY(); $this->pdf->SetFont('Times','B',9);
$this->pdf->Cell($jump_width,$line_height,"N.E.F.T Application Form",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,$this->FUNIVNAME,'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,$this->s_state,'0',1,'C');
$this->pdf->SetFont('Times','BU',9);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,$label,'0',1,'C');
$this->pdf->SetFont('Times','B',9);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"From Bank____________________Branch______________________",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height," Date_____________________",'0',1,'L');
$td1_width=$jump_width*(0.40)-1;
$td2_width=$jump_width-$td1_width-2;
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width+$td2_width,$line_height-1,"Details of Applicant Remitter",'1',1,'C');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Reference/Applcation No",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->app_no}",'1',1,'L');
$this->pdf->SetFont('Times','B',8);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Name",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->student_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Reg. No",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->reg_no}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"College / Degree",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->college_code} / {$this->degree}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Category / Fee Type",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->FCATEGORY} / {$this->FFEETYPE}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Account No(if any)",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Cheque Details(if applicable)",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"",'1',1,'L');
$this->pdf->ln(2);
$td1_width=$jump_width*(0.30)-1;
$td2_width=$jump_width-$td1_width-2;
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width+$td2_width,$line_height,"Details of Beneficary's Name",'1',1,'C');
$this->pdf->SetFont('Times','B',7);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"CenterPlace",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->place}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Bank/Branch",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->bank_name}/{$this->branch_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"IFSC Code",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->ifsc_code}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Beneficary's Name",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->cheque_favour}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Beneficary's A/C No",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->acc_no}",'1',1,'L');
$this->pdf->SetFont('Times','B',9);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height," Amount To Be Remitted Rs {$this->FTOTALFEE}/-",'0',1,'L');
$this->pdf->SetX($x_pos);
$in_words=getNumber($this->FTOTALFEE);
$this->pdf->Cell($jump_width,$line_height," Rupees {$in_words}",'0',1,'L');
$this->pdf->SetFont('Times','',9);
$this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,'1. Remit the amount as per details enumerated above.',0,"L");
$this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,'2. Remitance to be made as per conditions of transfer by N.E.F.T',0,"L");
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"3. Not Transferable",'0',1,'L');
$this->pdf->ln(3);
$this->pdf->SetFont('Times','B',9);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"Applicant's Signature ",'0',1,'R');
$this->pdf->ln(3);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width-2.5,$line_height,"Payment particulars- Cash/Transfer Date:",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$tdd1_width=$jump_width*(0.25);
$tdd2_width=($jump_width)*.25 ;
$tdd3_width=($jump_width-$tdd2_width)*.60+2;
$this->pdf->Cell($tdd1_width,$line_height,"Amount",'1',0,'L');
$this->pdf->Cell($tdd2_width,$line_height,"Rs {$this->FTOTALFEE}/-",'1',0,'L');
$this->pdf->Cell($tdd3_width,$line_height," ",'R',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($tdd1_width,$line_height,"Bank Charges",'1',0,'L');
$this->pdf->Cell($tdd2_width,$line_height,"Rs {$this->bank_charge}/-",'1',0,'L');
$this->pdf->Cell($tdd3_width,$line_height," ",'R',1,'L');
$this->pdf->SetX($x_pos+1);
$total=($this->FTOTALFEE+$this->bank_charge);
$this->pdf->Cell($tdd1_width,$line_height,"Total",'1',0,'L');
$this->pdf->Cell($tdd2_width,$line_height,"Rs {$total}/-",'1',0,'L');
$this->pdf->Cell($tdd3_width,$line_height,"Seal & Signature ",'BR',1,'L');
$this->pdf->ln(2);
$this->pdf->SetX($x_pos+1);
$in_words=getNumber($total);
$this->pdf->Cell($jump_width,$line_height,"Rupees {$in_words}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->SetFont('Times','',9);
$this->pdf->Cell($jump_width,$line_height,"Cash Received/Debited Applicants A/C",'0',1,'L');
$this->pdf->ln(2);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($tdd1_width,$line_height,"Remitance/",'LRT',0,'L');
$this->pdf->Cell($tdd2_width+10,$line_height," ",'LRT',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($tdd1_width,$line_height,"UTR Number",'LRB',0,'L');
$this->pdf->Cell($tdd1_width+10,$line_height," ",'LRB',0,'L');
$this->pdf->Cell($tdd1_width+10,$line_height," Authorised Signatory",'0',1,'L');
$this->pdf->SetY($this->old_y);
$img_path=$this->aobj_context->main_src.$this->photo_path;
}
function SendOutput()
{
$this->pdf->Output("neft_challan_{$this->app_no}.pdf","D");
}
}
function PrintApplicationFormNEFT($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new applicationFormReport();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata();
$class_obj->GetData();
$class_obj->WriteRect();
$class_obj->pos=1;
$class_obj->formData("Bank Copy");
$class_obj->pos=2;
$class_obj->formData("College Copy");
$class_obj->pos=3;
$class_obj->formData("Student Copy");
$class_obj->SendOutput();
}
?>
|