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.15.10.104
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
//$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
class applicationFormReport
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
//$this->pdf= new FPDF();
$this->pdf= new TCPDF();
$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= new TCPDF('L');
$this->pdf->SetMargins(2,2);
//$this->pdf->addPage('L');
}
function formcolldata()
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
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);
$query = "select FLATERAL_ENTRY from studadm where fappno = '{$this->app_no}'";
$results = $this->aobj_context->mobj_db->GetRow($query);
$this->latral = $results['FLATERAL_ENTRY'];
$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'];
$this->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
}
function GetBankDetails()
{
//$this->FPAYMENTYPE = "SBM";
$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()
{
//$this->app_no = '170000001';
$get_app_no="select fchallanno as fappno,'' as fname,
appchallan.famount as ftotfee,appchallan.fdegree,fcollcode, '' as fcaste,'SBM' as FPAYMENTTYPE,
d.FDESCPN,appchallan.fexamno,
date_format(appchallan.fchalastdate,'%d/%m/%Y') as lastdate,d.fexamname,
date_format(now(),'%d/%m/%Y') as fcurrent_date from appchallan inner join degree d
on appchallan.fdegree = d.fdegree and d.fexamno = appchallan.fexamno
where fchallanno='{$this->app_no}'";
$obj_get_app_no=$this->aobj_context->mobj_db->GetRow($get_app_no);
//var_dump($get_app_no);
$this->fappno = $obj_get_app_no['fappno'];
$this->fname = $obj_get_app_no['fname'];
$this->ftotfee = $obj_get_app_no['ftotfee'];
$this->fdegree = $obj_get_app_no['fdegree'];
$this->fcollcode = $obj_get_app_no['fcollcode'];
$this->fcaste = $obj_get_app_no['fcaste'];
$this->curr_date = $obj_get_app_no['fcurrent_date'];
$this->FPAYMENTYPE = $obj_get_app_no['FPAYMENTTYPE'];
$this->FDESCPN = $obj_get_app_no['FDESCPN'];
$this->lastdate = $obj_get_app_no['lastdate'];
$this->fexamno = $obj_get_app_no['fexamno'];
$this->fregno = $obj_get_app_no['fregno'];
$this->fexamname = $obj_get_app_no['fexamname'];
$this->GetBankDetails();
}
function WriteRect()
{
$this->pdf->addPage('L');
$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->aobj_context->mobj_data["db"]."/".$this->pdf_logo_path;
$this->pdf->Image($img_logo_path,4,7,15,15);
$this->pdf->Image($img_logo_path,$width+6,7,15,15);
$this->pdf->Image($img_logo_path,$width+$width+7,7,15,15);
$img_logo_path = $this->aobj_context->main_src."/".$this->aobj_context->mobj_data["db"]."/".'img/umy.jpg';
$this->pdf->Image($img_logo_path,82,6,15,15);
$this->pdf->Image($img_logo_path,180,6,15,15);
$this->pdf->Image($img_logo_path,278,6,15,15);
}
$this->pdf->setY(5);
}
function formData($label)
{
$line_height=5;
$width=96;
$x_pos=2;
$style = array(
'position' => 'right',
'align' => 'C',
'stretch' => false,
'fitwidth' => true,
'cellfitalign' => '',
'border' => false,
'hpadding' => 'auto',
'vpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255),
'text' => true,
'font' => 'helvetica',
'fontsize' => 8,
'stretchtext' => 3
);
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',7);
//var_dump($this->FUNIVNAME);
$this->pdf->SetX($x_pos);
$this->pdf->SetFont('Times','B',8);
$this->pdf->Cell($jump_width,4,$this->FUNIVNAME,'0',1,'C');
$this->pdf->SetFont('Times','B',6);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,4,$this->s_state,'0',1,'C');
$this->pdf->SetFont('Times','B',8);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"Challan - ".$label,'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',8);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"A/C No. : {$this->acc_no}"." / IFSC CODE: {$this->ifsc_code}",'0',1,'C');
$this->pdf->ln(2);
/* $this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"{$this->bank_name}",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"IFSC CODE: {$this->ifsc_code}",'0',1,'C');
//$this->pdf->Cell($jump_width,$line_height,"BRANCH CODE: {$this->branch_code} | IFSC CODE: {$this->ifsc_code}",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"BANK USE ONLY",'0',1,'C'); */
$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,$line_height,"Bank",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->bank_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Branch Name",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->branch_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Branch Code",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->branch_code}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Journal No",'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,"Date",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"",'1',1,'L');
$line_height = 4;
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Reference No: {$this->fappno}",'0',1,'L');
if($this->fregno !='')
{
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Register No: {$this->fregno}",'0',1,'L');
}
// $this->pdf->SetX($x_pos+1);
// $this->pdf->Cell($jump_width,$line_height,"Applicant Name: {$this->fname}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"College / Degree: {$this->fcollcode} / {$this->FDESCPN} {$this->fexamname}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Valid Upto : {$this->lastdate}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Fee: {$this->ftotfee}/-",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->SetFont('Times','',8);
$this->pdf->MultiCell($jump_width,$line_height,"PAID TO THE CREDIT OF {$this->cheque_favour} ",0,"L");
$line_height = 4;
$this->pdf->SetX($x_pos+1);
$this->pdf->SetFont('Times','B',8);
$tdd1_width=$jump_width*(0.25)-1;
$tdd2_width=($jump_width)*.25 ;
$tdd3_width=($jump_width)*.25 ;
$tdd4_width=($jump_width)*.25-1;
$this->pdf->Cell($tdd1_width,$line_height,"Particulars",'1',0,'C');
$this->pdf->Cell($tdd2_width,$line_height,"Course Fee",'1',0,'C');
$this->pdf->Cell($tdd3_width,$line_height,"Bank Charges",'1',0,'C');
$this->pdf->Cell($tdd4_width,$line_height,"Total",'1',1,'C');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($tdd1_width,$line_height,"Amount",'1',0,'C');
$this->pdf->Cell($tdd2_width,$line_height,"Rs. {$this->ftotfee}/-",'1',0,'C');
$this->pdf->Cell($tdd3_width,$line_height," ",'1',0,'C');
$total=($this->ftotfee+$this->bank_charge);
$this->pdf->Cell($tdd4_width,$line_height," ",'1',1,'C');
// $in_words
$this->pdf->SetX($x_pos+1);
$in_words=getNumber($total);
//var_dump($in_words);
$this->pdf->Cell($jump_width,$line_height,"Rupees In Words : ",'0',1,'L');
$this->pdf->ln(3);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Date",'0',0,'L');
$this->pdf->Cell($td2_width,$line_height,"Signature of Remitter ",'0',1,'R');
$this->pdf->ln(3);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Received Rupees",'0',1,'L');
$this->pdf->ln(4);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Date & Seal",'0',0,'L');
$this->pdf->Cell($td2_width,$line_height,"Signature of Receiver ",'0',1,'R');
$this->pdf->SetFont('Times','',8);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"Denomination",'1',0,'L');
$this->pdf->Cell(10,4,"No.s",'1',0,'L');
$this->pdf->Cell(20,4,"Rs.",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"2000x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"500x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"100x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"50x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"20x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"10x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"Total",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
/* $this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,'1. Accepted at all branches of ANDHRA BANK ',0,"L"); */
$this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,'1. Collecting Branch has to enter Reference No: & Name of the candidate for this transaction in core banking system',0,"L");
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"2. Not Transferable",'0',1,'L');
$this->pdf->SetX($x_pos+5);
$this->pdf->write1DBarcode($this->app_no, 'C39', '10', '173.9','100', 16, 0.3, $style, 'R');
$this->pdf->write1DBarcode($this->app_no, 'C39', '110', '173.9','100', 16, 0.3, $style, 'R');
$this->pdf->write1DBarcode($this->app_no, 'C39', '210', '173.9','100', 16, 0.3, $style, 'R');
$this->pdf->SetY($this->old_y);
$img_path=$this->aobj_context->main_src.$this->photo_path;
}
function SendOutput()
{
$this->pdf->Output("application_letter_{$this->app_no}.pdf","I");
}
}
function PrintApplicationFormBankChalan($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("Centre Copy");
$class_obj->pos=3;
$class_obj->formData("University Copy");
$class_obj->SendOutput();
}
?>
|