| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/domains/fulltion.com/private_html/parcel/tester/lib/class/ |
Upload File : |
<?php
class PDF extends FPDF
{
function Header($head_fi=''){
if($head_fi==1){
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',10);
$this->SetFont('angsa','',12);
//$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['header_fromdate']." "),0,1,"R");
$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['date_print']." "),0,1,"R");
$this->Ln(20);
$this->Cell(0,-20,iconv('UTF-8','TIS-620',$_SESSION['txt_nm_coparate']),0,1,"L");
$this->Ln(20);
$this->Cell(0,-30,iconv('UTF-8','TIS-620',$_SESSION['txt_address_coperate']),0,1,"L");
$this->Ln(30);
$this->AddFont('angsa','B','angsa.php');
$this->SetFont('angsa','B',18);
$this->Cell(175,-10,iconv('UTF-8','TIS-620',$_SESSION['txt_report_sum_emp']),0,1,"C");
$this->SetFont('angsa','',10);
$this->Ln(5);
$this->Cell(175,10,iconv('UTF-8','TIS-620'," ".$_SESSION['emp_name']." ".$_SESSION['nm_emp']." ".
$_SESSION['emp_deliverypoint']." ".$_SESSION['ae']." ".$_SESSION['update_date']." ".$_SESSION['header_fromdate']." "),0,1,"C");
$this->Ln(2);
//ปัดบรรทัด กำหนดความกว้างของบรรทัด 20หน่วย
@$w = array(10,30,30,25,25,20,20,20);
for($i=0;$i<count($_SESSION['header_tb']);$i++)
{
$this->Cell($w[$i],7,iconv('UTF-8','TIS-620',$_SESSION['header_tb'][$i]),1,0,'C');
}
$this->Ln(8);
}elseif($head_fi==2){
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',10);
$this->SetFont('angsa','',12);
$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['date_print']." "),0,1,"R");
//$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['header_fromdate']." "),0,1,"R");
$this->Ln(20);
$this->Cell(0,-20,iconv('UTF-8','TIS-620',$_SESSION['txt_nm_coparate']),0,1,"L");
$this->Ln(20);
$this->Cell(0,-30,iconv('UTF-8','TIS-620',$_SESSION['txt_address_coperate']),0,1,"L");
$this->Ln(30);
$this->AddFont('angsa','B','angsa.php');
$this->SetFont('angsa','B',18);
$this->Cell(175,-10,iconv('UTF-8','TIS-620',$_SESSION['txt_report_sum_branch']),0,1,"C");
$this->SetFont('angsa','',10);
$this->Ln(5);
$this->Cell(175,10,iconv('UTF-8','TIS-620'," ".$_SESSION['emp_deliverypoint']." ".$_SESSION['ae']." ".$_SESSION['update_date']." ".$_SESSION['header_fromdate']." "),0,1,"C");
$this->Ln(1);
@$w=array(10,55,35,35,35);
for($i=0;$i<count($_SESSION['header_tb']);$i++)
{
$this->Cell($w[$i],7,iconv('UTF-8','TIS-620',$_SESSION['header_tb'][$i]),1,0,'C');
}
$this->Ln(8);
}// elseif
elseif($head_fi==3){
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',10);
$this->SetFont('angsa','',12);
$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['date_print']." "),0,1,"R");
//$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['header_fromdate']." "),0,1,"R");
$this->Ln(20);
$this->Cell(0,-20,iconv('UTF-8','TIS-620',$_SESSION['txt_nm_coparate']),0,1,"L");
$this->Ln(20);
$this->Cell(0,-30,iconv('UTF-8','TIS-620',$_SESSION['txt_address_coperate']),0,1,"L");
$this->Ln(30);
$this->AddFont('angsa','B','angsa.php');
$this->SetFont('angsa','B',18);
$this->Cell(175,-10,iconv('UTF-8','TIS-620',$_SESSION['txt_report_sum_emp']),0,1,"C");
$this->SetFont('angsa','',10);
$this->Ln(5);
$this->Cell(175,10,iconv('UTF-8','TIS-620'," ".$_SESSION['emp_name']." ".$_SESSION['nm_emp']." ".
$_SESSION['emp_deliverypoint']." ".$_SESSION['ae']." ".$_SESSION['update_date']." ".$_SESSION['header_fromdate']." "),0,1,"C");
$this->Ln(1);
@$w=array(10,25,30,25,25,20,20,20);
for($i=0;$i<count($_SESSION['header_tb']);$i++)
{
$this->Cell($w[$i],7,iconv('UTF-8','TIS-620',@$_SESSION['header_tb'][$i]),1,0,'C');
}
$this->Ln(8);
}//elseif
elseif($head_fi==4){
$this->AddFont('angsa','','angsa.php');
$this->SetFont('angsa','',10);
$this->SetFont('angsa','',12);
$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['date_print']." "),0,1,"R");
//$this->Cell(185,0,iconv('UTF-8','TIS-620'," ".$_SESSION['txt_date']." ".$_SESSION['header_fromdate']." "),0,1,"R");
$this->Ln(20);
$this->Cell(0,-20,iconv('UTF-8','TIS-620',$_SESSION['txt_nm_coparate']),0,1,"L");
$this->Ln(20);
$this->Cell(0,-30,iconv('UTF-8','TIS-620',$_SESSION['txt_address_coperate']),0,1,"L");
$this->Ln(30);
$this->AddFont('angsa','B','angsa.php');
$this->SetFont('angsa','B',18);
$this->Cell(195,-10,iconv('UTF-8','TIS-620',$_SESSION['txt_report_sum_employee']),0,1,"C");
$this->SetFont('angsa','',10);
$this->Ln(8);
}// elseif
} // close header
function Footer($foot_fi='') {
//if($foot_fi==1)
//{
//นับจากขอบกระดาษด้านล่างขึ้นมา 10 มม.
$this->SetY( -10 );
//กำหนดใช้ตัวอักษร Arial ตัวเอียง ขนาด 5
$this->SetFont('angsa','',10);
//พิมพ์ หมายเลขหน้า ตรงมุมขวาล่าง
$this->Cell(0,10, iconv('UTF-8','TIS-620'," ".$_SESSION['txt_page']." ".$this->PageNo().'/tp '),0,0,'R');
//}
} //close footer
function BasicTable($data,$summoney,$discount,$word_sum){
//@$i = 1;
if($data){
foreach($data as $key => $va){
//$this->Cell(20,6,$i,0,0,'C');
$this->Cell(10,6,$key+1,0,0,'C');
$this->Cell(30,6,@$va['InvoiceCode'],0,0,'C');
$this->Cell(30,6,@$va['ProductCode'],0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$va['ProductDetail']),0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$va['DeliveryPointName']),0,0,'C');
$this->Cell(20,6,number_format(@$va['i_summoney'],2,'.',','),0,0,'C');
//$this->Cell(20,6,number_format(floor($va['totalmoney'] * 100 / (100 - $va['Saleper'])),2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$va['i_discount'],2,'.',','),0,0,'C');
//$this->Cell(20,6,number_format(floor($va['totalmoney'] * 100 / (100 - $va['Saleper'])) - $va['totalmoney'],2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$va['totalmoney'],2,'.',',').@$va['cancel'],0,0,'C');
//$this->Cell(20,6,iconv('UTF-8','TIS-620',@$va['comment']),0,0,'L');
$this->Ln();
//@$i++;
// @$i_summoney = @$i_summoney + floor(@$getproduct[$key]['totalmoney'] * 100 / (100 - @$getproduct[$key]['Saleper']));
// @$i_discount = @$i_discount + floor(@$getproduct[$key]['totalmoney'] * 100 / (100 - @$getproduct[$key]['Saleper'])) - @$getproduct[$key]['totalmoney'];
} //foreach($data as $key => $va){
}// if($data){
$this->Cell(10,6,"",0,0);
$this->Cell(30,6,"",0,0,'C');
$this->Cell(30,6,"",0,0,'C');
$this->Cell(25,6,"",0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$word_sum),0,0,'C');
$this->Cell(20,6,number_format($summoney+$discount,2,'.',','),0,0,'C');
//$this->Cell(20,6,number_format(@$i_discount,2,'.',','),0,0,'C');
$this->Cell(20,6,number_format($discount,2,'.',','),0,0,'C');
$this->Cell(20,6,number_format($summoney,2,'.',','),0,0,'C');
// $this->Cell(20,6,"",0,0,'C');
$this->Ln();
} //close function basic
function BasicTable1($data,$summoney,$discount,$word_sum)
{
@$i = 1;
if(@$data){
foreach($data as $key => $va){
$this->Cell(10,6,$key+1,0,0,'C');
$this->Cell(55,6,iconv('UTF-8','TIS-620',@$va['EmpName']." ".@$va['EmpSurName']),0,0);
//$this->Cell(35,6,iconv('UTF-8','TIS-620',$va['summoneyemp']),0,0,'C');
$this->Cell(35,6,number_format(@$va['i_summoney'],2,'.',','),0,0,'C');
//$this->Cell(35,6,iconv('UTF-8','TIS-620',$va['discountemp']),0,0,'C');
$this->Cell(35,6,number_format(@$va['i_discount'],2,'.',','),0,0,'C');
$this->Cell(35,6,number_format((@$va['i_summoney'] - @$va['i_discount']),2,'.',','),0,0,'C');
$this->Ln();
@$i++;
} //foreach($data as $key => $va){
}// if($data){
$this->Cell(10,6,"",0,0);
$this->Cell(55,6,iconv('UTF-8','TIS-620',@$word_sum),0,0);
$this->Cell(35,6,number_format(@$summoney,2,'.',','),0,0,'C');
$this->Cell(35,6,number_format(@$discount,2,'.',','),0,0,'C');
$this->Cell(35,6,number_format((@$summoney - @$discount),2,'.',','),0,0,'C');
$this->Ln();
} //close function basic1
function BasicTable2($data,$summoney,$discount,$word_sum)
{
//@$i = 1;
if(@$data){
foreach($data as $key => $va){
@$reprint = @$va['reprint'] ? "(".(@$va['reprint']-1).")" : "";
$this->Cell(10,6,$key+1,0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$va['InvoiceCode']).$reprint,0,0,'C');
//$this->Cell(35,6,iconv('UTF-8','TIS-620',$va['summoneyemp']),0,0,'C');
$this->Cell(30,6,iconv('UTF-8','TIS-620',@$va['ProductCode']),0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$va['ProductDetail']),0,0,'C');
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$va['DeliveryPointName']),0,0,'C');
$this->Cell(20,6,number_format(@$va['i_summoney'],2,'.',','),0,0,'C');
//$this->Cell(35,6,iconv('UTF-8','TIS-620',$va['discountemp']),0,0,'C');
$this->Cell(20,6,number_format(@$va['i_discount'],2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$va['totalmoney'],2,'.',',').@$va['cancel'],0,0,'C');
//$this->Cell(35,6,number_format(($va['i_summoney'] - $va['i_discount']),2,'.',','),0,0,'C');
$this->Ln();
//@$i++;
} //foreach($data as $key => $va){
}// if($data){
$this->Cell(10,6,"",0,0);
$this->Cell(25,6,"",0,0);
$this->Cell(30,6,"",0,0);
$this->Cell(25,6,"",0,0);
$this->Cell(25,6,iconv('UTF-8','TIS-620',@$word_sum),0,0,'C');
$this->Cell(20,6,number_format(@$summoney,2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$discount,2,'.',','),0,0,'C');
$this->Cell(20,6,number_format((@$summoney - @$discount),2,'.',','),0,0,'C');
$this->Ln();
} //close function basic2
function BasicTable3($data,$nm_branch,$fromdate)
{
$this->Cell(195,6,iconv('UTF-8','TIS-620',$_SESSION['emp_name']. " ".@$data['EmpName']." ".@$data['EmpSurName']." ".$_SESSION['emp_deliverypoint']." ".$nm_branch['DeliveryPointName']." ".$_SESSION['update_date']." ".$fromdate),0,0,'C');
$this->Ln(8);
@$w=array(10,35,35,35,20,20,20,20);
for($i=0;$i<count($_SESSION['header_tb']);$i++)
{
$this->Cell($w[$i],9,iconv('UTF-8','TIS-620',$_SESSION['header_tb'][$i]),1,0,'C');
}
$this->Ln(10);
}
function BasicTable4($data,$sequence)
{
//$this->Cell(10,6,"",0,0);
$this->Cell(10,6,$sequence+1,0,0,'C');
$this->Cell(35,6,@$data['InvoiceCode'],0,0,'C');
$this->Cell(35,6,@$data['ProductCode'],0,0,'C');
$this->Cell(35,6,iconv('UTF-8','TIS-620',@$data['ProductDetail']),0,0,'L');
$this->Cell(20,6,iconv('UTF-8','TIS-620',@$data['destination']),0,0,'L');
$this->Cell(20,6,iconv('UTF-8','TIS-620',@$data['totalmoney']),0,0,'C');
$this->Cell(20,6,number_format(@$data['Saleper'],2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$data['money_net'],2,'.',',').@$data['cancel'],0,0,'C');
$this->Ln(8);
}
function BasicTable5($data,$wd_sum)
{
$this->Cell(10,6,"",0,0,'C');
$this->Cell(35,6,"",0,0,'C');
$this->Cell(35,6,"",0,0,'C');
$this->Cell(35,6,"",0,0,'C');
$this->Cell(20,6,iconv('UTF-8','TIS-620',@$wd_sum),0,0,'C');
$this->Cell(20,6,number_format(@$data['summary_emp'],2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$data['summary_dis_emp'],2,'.',','),0,0,'C');
$this->Cell(20,6,number_format(@$data['summary_net_emp'],2,'.',','),0,0,'C');
$this->Ln(8);
}
} //close class
?>