| 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/public_html/parcel/administrator/ |
Upload File : |
<?php
require_once('../lib/sys_config.php');
require_once('../lib/class/SC_Query.php');
require_once('../lib/class/SC_Mysql.php');
require_once('../lib/class/SC_Master.php');
require_once('../lib/class/SC_Email.php');
require_once('../lib/class/SC_Function.php');
@$db = new SC_Query();
@$objMaster = new SC_Master();
@$objFun = new SC_Function();
if(isset($_SESSION['lang_code']) && @$_GET['lang']){
//@$la = @$_GET['lang'] ? @$_GET['lang'] : "En";
@$_SESSION['lang_code'] = @$_GET['lang'];
@$lang_code = @$_SESSION['lang_code'];
}elseif(isset($_SESSION['lang_code'])){
@$lang_code = @$_SESSION['lang_code'];
}else{
@$lang_code = "En";
@$_SESSION['lang_code'] = @$lang_code;
}
@$lang_value = @$db->getAll('language_value','*',"lang_code='".@$lang_code."'");
//echo "<pre>"; print_r(@$lang_value);
if(@$lang_value){
@$lang_set = array();
foreach($lang_value as $ke => $va){
@$lang_set[@$va['name']] = @$va['value'];
//echo @$lang_set[@$va['name']];
//@$lang = @$lang_f;
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<!-- Scrip Java-->
<?PHP
@$GetInvoiceID = array();
if(isset($_GET['InvoiceID']))
{
unset($_SESSION['SSInvoice']);
@$_SESSION['SSInvoice'][] = @$_GET['InvoiceID'];
}
//@$_SESSION['SSInvoice'] = @$_GET['InvoiceID'];
@$GetInvoiceID = @$_SESSION['SSInvoice'];
//@$GetInvoiceID['end'] = '0';
//@$GetInvoiceID = @$_SESSION['SSInvoice'];
unset($_SESSION['SSInvoice']);
foreach($GetInvoiceID as $val){
@$GetInvoice = @$db->getOne( "invoice", "*"," InvoiceID = '".@$val."'","" );
@$getstartname = @$db->getOne("deliverypoint","*","DeliveryPointID = ".@$GetInvoice['InvoiceStartPoint']);
@$getendname = @$db->getOne("deliverypoint","*","DeliveryPointID = ".@$GetInvoice['InvoiceEndPoint']);
@$Getproduct = @$db->getAll( "invoicedetail", "*"," InvoiceID = '".@$GetInvoice['InvoiceID']."'","Order By InvoiceDetailID" );
@$sendRes = @$db->getOne("customer","*"," CustomerID='".@$GetInvoice['InvoiceSendID']."'");
@$recvRes = @$db->getOne("customer","*"," CustomerID='".@$GetInvoice['InvoiceReceiveID']."'");
@$getsendprovince = @$db->getOne("province","*"," PROVINCE_ID='".@$sendRes['CustomerProvince']."'");
@$getsenddistrict = @$db->getOne("district","*"," AMPHUR_ID='".@$sendRes['CustomerDistrict']."'");
@$getrecvprovince = @$db->getOne("province","*"," PROVINCE_ID='".@$recvRes['CustomerProvince']."'");
@$getrecvdistrict = @$db->getOne("district","*"," AMPHUR_ID='".@$recvRes['CustomerDistrict']."'");
@$getallroute = @$db->getAll("route","*","");
@$sumtime = 0;
foreach($getallroute as $va){
@$gettimestart = @$db->getOne( "routexpoint", "*","DeliveryPointID = '".@$GetInvoice['InvoiceStartPoint']."' And RouteID = '".@$va['RouteID']."'","");
@$gettimeend = @$db->getOne( "routexpoint", "*","DeliveryPointID = '".@$GetInvoice['InvoiceEndPoint']."' And RouteID = '".@$va['RouteID']."'","");
if(@$gettimestart){
if(@$gettimeend){
if(@$gettimestart['PointTime'] < @$gettimeend['PointTime']){
@$gettime = @$db->gettest("SELECT ADDTIME( '".@$GetInvoice['InvoiceDate']." ".@$GetInvoice['InvoiceTime']."'
,'".@$gettimeend['PointTime']."' ) AS PointTime");
if(@$sumtime < @$gettime['PointTime']){
@$sumtime = @$gettime['PointTime'];
}
}
}
}
}
@$sumtimefin = @$db->gettest("SELECT ADDTIME( '".@$sumtime."','08:00:00' ) AS PointTime");
@$getsuccess = @explode(" ",@$sumtimefin['PointTime']);
@$checktime = @explode(" ",@$getsuccess[1]);
if(@$checktime[0] > 17)
{
@$getsuccess[1] = '08:00:00';
@$updatedate = @$db->gettest("SELECT ADDTIME( '".@$getsuccess[0]." ".@$getsuccess[1]."','24:00:00' ) AS PointTime");
@$updatesuccess = @explode(" ",@$updatedate['PointTime']);
@$getsuccess[0] = @$updatesuccess[0];
}elseif(@$checktime[0] < 8){
@$getsuccess[1] = '08:00:00';
}
?>
<div style="width:100%; height:100%">
<table width="100%">
<tr>
<td>
<img id="logo" src="resources/images/Logo/Header2.png" alt="Simpla Admin logo" width="100%"/>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td colspan="3" width="750px"></td>
<td width="50px">
Data
</td>
<td width="150px" >
<?PHP echo @$objMaster->getdbdateformat(date("Y-m-d"));?>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td align="right" width="150px">Invoice Code</td>
<td align="center" width="200px"><?PHP echo @$GetInvoice['InvoiceCode']?></td>
<td align="center" width="200px">
รับฝาก-ส่งถึง
</td>
<td align="center" width="400px">
<?PHP echo @$getstartname['DeliveryPointName']." - ".@$getendname['DeliveryPointName'];?>
</td>
</tr>
<tr>
<td align="right" width="150px">
ของส่งถึงวันที่
</td>
<td align="center" width="300px">
<?PHP echo @$objMaster->getreportformat(@$objMaster->getdbdateformat(@$getsuccess['0']))." - ".@$getsuccess['1'];?>
</td>
<td colspan="2" width="500px">
</td>
</tr>
</table>
<!-- //-------------------------------ผู้ส่ง------------------------------------//-------->
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">ข้อมูลผู้ส่ง</label>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td align="right" width="200px">เลขบัตรประชาชน :</td>
<td colspan="6"><?PHP echo @$sendRes['CustomerIdentification']?></td>
</tr>
<tr>
<td align="right" width="200px">ชื่อ :</td>
<td><?PHP echo @$sendRes['CustomerName']?></td>
<td align="right" width="150px">นามสกุล :</td>
<td><?PHP echo @$sendRes['CustomerSurName']?></td>
<td colspan="3"></td>
</tr>
<tr>
<td align="right" width="200px">ที่อยู่ : </td>
<td colspan="6"><?PHP echo @$sendRes['CustomerAddress']?></td>
</tr>
<tr>
<td align="right" width="200px">จังหวัด :</td>
<td align="left" width="150px"><?PHP echo @$getsendprovince['PROVINCE_NAME']?></td>
<td align="right" width="150px">อำเภอ :</td>
<td align="left" width="150px"><?PHP echo @$getsenddistrict['AMPHUR_NAME']?></td>
<td align="right" width="150px">ตำบล : </td>
<td align="left" width="150px"><?PHP echo @$sendRes['CustomerTambon']?> </td>
<td></td>
</tr>
<tr>
<td align="right" width="200px">รหัสไปรษณีย์ : </td>
<td colspan="6"><?PHP echo @$sendRes['CustomerPostCode']?></td>
</tr>
<tr>
<td align="right" width="200px">โทรศัพท์มือถือ : </td>
<td align="left" width="150px"><?PHP echo @$sendRes['CustomerPhon']?></td>
<td align="right" width="150px">โทรศัพท์บ้าน : </td>
<td align="left" width="150px"><?PHP echo @$sendRes['CustomerHomePhon']?></td>
<td align="right" width="150px">โทรศัพท์อื่น : </td>
<td align="left" width="150px"><?PHP echo @$sendRes['CustomerOtherPhon']?> </td>
<td></td>
</tr>
</table>
<!-- //-------------------------------ผู้รับ------------------------------------//-------->
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">ข้อมูลผู้รับ</label>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td align="right" width="200px">เลขบัตรประชาชน :</td>
<td colspan="6"><?PHP echo @$recvRes['CustomerIdentification']?></td>
</tr>
<tr>
<td align="right" width="200px">ชื่อ :</td>
<td><?PHP echo @$recvRes['CustomerName']?></td>
<td align="right" width="150px">นามสกุล :</td>
<td><?PHP echo @$recvRes['CustomerSurName']?></td>
<td colspan="3"></td>
</tr>
<tr>
<td align="right" width="200px">ที่อยู่ : </td>
<td colspan="6"><?PHP echo @$recvRes['CustomerAddress']?></td>
</tr>
<tr>
<td align="right" width="200px">จังหวัด :</td>
<td align="left" width="150px"><?PHP echo @$getrecvprovince['PROVINCE_NAME']?></td>
<td align="right" width="150px">อำเภอ :</td>
<td align="left" width="150px"><?PHP echo @$getrecvdistrict['AMPHUR_NAME']?></td>
<td align="right" width="150px">ตำบล : </td>
<td align="left" width="150px"><?PHP echo @$recvRes['CustomerTambon']?> </td>
<td></td>
</tr>
<tr>
<td align="right" width="200px">รหัสไปรษณีย์ : </td>
<td colspan="6"><?PHP echo @$recvRes['CustomerPostCode']?></td>
</tr>
<tr>
<td align="right" width="200px">โทรศัพท์มือถือ : </td>
<td align="left" width="150px"><?PHP echo @$recvRes['CustomerPhon']?></td>
<td align="right" width="150px">โทรศัพท์บ้าน : </td>
<td align="left" width="150px"><?PHP echo @$recvRes['CustomerHomePhon']?></td>
<td align="right" width="150px">โทรศัพท์อื่น : </td>
<td align="left" width="150px"><?PHP echo @$recvRes['CustomerOtherPhon']?> </td>
<td></td>
</tr>
</table>
<!-- //-------------------------------ของ------------------------------------//-------->
<table width="100%">
<tr>
<td>
<label style="font-size:20px; color:#00FF00">รายการพัสดุ</label>
</td>
</tr>
</table>
<table width="80%" border="1">
<tr bgcolor="#3399FF">
<td align="center">รหัสพัสดุ</td>
<td align="center">ประเภทพัสดุ</td>
<td align="center">ขนาด</td>
<td align="center">น้ำหนัก(กก.)</td>
<td align="center">ส่วนลด(%)</td>
<td align="center">ราคา</td>
</tr>
<?PHP
@$summoney = 0;
@$sumcount = 0;
@$discount = 0;
?>
<?PHP foreach($Getproduct as $key => $va){
@$getnamesize = @$db->getOne("setupsize","*","SetupSizeID = ".@$va['ProductSize']);?>
<tr>
<td><?PHP echo @$va['ProductCode'];?></td>
<td><?PHP echo @$va['ProductName'];?></td>
<td align="right"><?PHP echo @$getnamesize['SetupSizeSize'];?></td>
<td align="right"><?PHP echo @$va['ProductWeight'];?></td>
<td align="right"><?PHP echo @$va['Saleper']."%";?></td>
<td align="right"><?PHP echo @$va['totalmoney'];?></td>
</tr>
<?PHP
@$summoney = @$summoney + @$va['totalmoney'];
//@$discount = @$discount + (@$va['totalmoney'] * @$va['Saleper'] /100);
//@$discount = @$va['Saleper'];
@$sumcount++;
}?>
</table>
<table width="80%">
<tr>
<td></td>
<td align="right" width="100px">จำนวนชิ้น</td>
<td align="center" width="50px"><?PHP echo @$sumcount." ชิ้น";?></td>
<td align="right" width="100px">รวมราคา</td>
<td align="center" width="100px"><?PHP echo @$summoney." บาท";?></td>
</tr>
<!--<tr>
<td colspan="3"></td>
<td align="right" width="100px">รวมสุทธิ</td>
<td align="center" width="100px"><?PHP echo (@$summoney - @$discount)." บาท";?></td>
</tr>-->
</table>
</div>
<?PHP }?>
</body>
<?PHP echo "<script>t = 3*1000;
window.print();
</script>";?>
<?PHP //setTimeout('window.close()',t); ?>