| 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/administrator/modules/manu_track/ |
Upload File : |
<?php
if(@$_GET['act']=="search"){
if(strlen($_POST['InvoiceCode']) < 10){
$getproduct = $db->getJoin("BusID.BusXRouteID as BusID,HistDatetime,ind.*,CONCAT(CustomerName,' ',CustomersurName) as detailName ,(select CONCAT(CustomerName,' ',CustomerSurName) as Name from ".DB_PREFIX."customer where CustomerID=inv.InvoiceReceiveID ) as DetailNameRe,size.SetupSizeSize",DB_PREFIX."invoicedetail ind inner join ".DB_PREFIX."invoice inv on inv.InvoiceID=ind.InvoiceID left outer join ".DB_PREFIX."customer cus on cus.CustomerID=inv.InvoiceSendID inner join (select BusXRouteID,HistDatetime from tasoft_hist hist inner join tasoft_invoidestatus sta on sta.statusid=hist.status order by HistDatetime desc limit 1) as BusID left outer join ".DB_PREFIX."setupsize size on size.SetupSizeID=ind.ProductSize","inv.InvoiceCode = '".$_POST['InvoiceCode']."'");
$type = "InvoiceCode";
}else{
$getproduct = $db->getJoin('hist.*,inv.InvoiceReceiveID,sta.statusdesc,CONCAT(CustomerName," ",CustomerSurName) as detailName,(select CONCAT(CustomerName," ",CustomerSurName) as Name from '.DB_PREFIX.'customer where CustomerID=inv.InvoiceReceiveID ) as DetailNameRe',DB_PREFIX.'hist hist inner join '.DB_PREFIX.'invoidestatus sta on sta.statusid=hist.status inner join '.DB_PREFIX.'invoicedetail ind on ind.InvoiceDetailID=hist.InvoiceDetailID inner join '.DB_PREFIX.'invoice inv on inv.InvoiceID=ind.InvoiceID left outer join '.DB_PREFIX.'customer cus on cus.CustomerID=inv.InvoiceSendID'," ind.ProductCode = '".$_POST['InvoiceCode']."'","order by hist.HistDatetime asc" );
$type = "ProductCode";
}
}
$where_lang = "lang_code='".$lang_code."'";
//echo 'hist.*,inv.InvoiceReceiveID,sta.statusdesc,CONCAT(CustomerName," ",CustomerSurName) as detailName,(select CONCAT(CustomerName," ",CustomerSurName) as Name from '.DB_PREFIX.'customer where CustomerID=inv.InvoiceReceiveID ) as DetailNameRe',DB_PREFIX.'hist hist inner join '.DB_PREFIX.'invoidestatus sta on sta.statusid=hist.status inner join '.DB_PREFIX.'invoicedetail ind on ind.InvoiceDetailID=hist.InvoiceDetailID inner join '.DB_PREFIX.'invoice inv on inv.InvoiceID=ind.InvoiceID left outer join '.DB_PREFIX.'customer cus on cus.CustomerID=inv.InvoiceSendID'," ind.ProductCode = '".$_POST['InvoiceCode']."'","order by hist.HistDatetime asc";
//echo "<pre>"; print_r($getproduct);
?>
<!-- Start Content Box -->
<div class="content-box">
<!-- Start Content Box Header-->
<div class="content-box-header">
<h3><?php echo "ติดตามรายการพัสดุ"; ?></h3>
<div class="clear"></div>
</div>
<!-- End Content Box Header-->
<!-- Start Content Box Content-->
<div class="content-box-content">
<!-- Start Tab Content id="list"-->
<div class="tab-content default-tab">
<?PHP ?>
<form action="index.php?name=manu_track&act=search" method="post" enctype="multipart/form-data" ><!--onsubmit="return checkdelivery();"-->
<fieldset>
<p>
<strong><?php echo "รหัสใบกำกับสินค้า / รหัสพัสดุ" ?>:</strong> <input type="text" class="text-input small-input" name="InvoiceCode" id="InvoiceCode" value="" />
<!--<span class="input-notification error png_bg" id="span_name"></span>-->
<input type="submit" class="button" value="Submit" />
</p>
</fieldset>
</form>
<form action="index.php?name=manu_track&act=search" method="post">
<?PHP if(@$type == "InvoiceCode"){?>
<table>
<thead style="background:#999; color:#fff;">
<tr>
<th style="text-align:left"><?php echo $lang_set['CodeProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailNameCus']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailNameCusRe']; ?></th>
<th style="text-align:left"><?php echo $lang_set['NameProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['lastpoint']; ?></th>
<th style="text-align:left"><?php echo $lang_set['bus_name']; ?></th>
<th style="text-align:left"><?php echo $lang_set['ProductWeight']; ?></th>
<th style="text-align:left"><?php echo $lang_set['ProductSize']; ?></th>
<th style="text-align:left"><?php echo $lang_set['totalmoney']; ?></th>
<th><?php echo $lang_set['invoice_status']; ?></th>
<th style="text-align:center"><?php echo $lang_set['date_make']; ?></th>
<th><?php echo $lang_set['comment']; ?></th>
</tr>
</thead>
<?PHP
if(@$getproduct){
foreach(@$getproduct as $key => $va){
$getbusxroute = $db->getOne( "busxroute", "*"," BusXRouteID = '".$va['BusID']."'","" );
$getbus = $db->getOne( "bus", "*"," BusID= '".$getbusxroute['BusID']."'","" );
//echo "<pre>";print_r($getproduct);
$getstatusproduct = $db->getOne("invoidestatus","*"," statusid='".$va['status']."'");
$getpoint = $db->getOne("deliverypoint","*",$where_lang." and DeliveryPointID='".$va['LastPoint']."'");
$color = @$color=="#fff" ? "#E8E8E8" : "#fff";
list($date,$time) = @split(' ',@$va['HistDatetime']);
?>
<tr style="background:<?php echo $color;?>">
<th><?php echo $va['ProductCode'];?></th>
<th><?php echo $va['detailName'];?></th>
<th><?php echo $va['DetailNameRe'];?></th>
<th><?php echo $va['ProductName'];?></th>
<th><?php echo $va['ProductDetail'];?></th>
<th><?php echo $getpoint['DeliveryPointName'];?></th>
<th><?php echo $getbus['BusName'];?></th>
<th><?php echo $va['ProductWeight'];?></th>
<th><?php echo $va['SetupSizeSize'];?></th>
<th><?php echo $va['totalmoney'];?></th>
<th><?php echo $getstatusproduct['statusdesc'];?></th>
<th><div align="center"><?php echo @$objMaster->getdbdateformat_barcode($va['HistDatetime'])." ".$time;?></div></th>
<th><?php echo ($va['comment'] ? $va['comment'] : "");?></th>
<tr>
<?php }
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo $lang_set['not_data']; ?></th>
<tr>
<?php
}
?>
</table>
<?PHP }elseif(@$type == "ProductCode"){?>
<table>
<thead style="background:#999; color:#fff;">
<tr>
<th style="text-align:left"><?php echo $lang_set['CodeProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailNameCus']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailNameCusRe']; ?></th>
<th style="text-align:left"><?php echo $lang_set['NameProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['DetailProduct']; ?></th>
<th style="text-align:left"><?php echo $lang_set['startpoint']; ?></th>
<th style="text-align:left"><?php echo $lang_set['endpoint']; ?></th>
<th style="text-align:left"><?php echo $lang_set['lastpoint']; ?></th>
<th style="text-align:left"><?php echo $lang_set['bus_name']; ?></th>
<th><?php echo $lang_set['invoice_status']; ?></th>
<th style="text-align:center"><?php echo $lang_set['date_make']; ?></th>
<!-- <th width="75"><?php echo $lang_set['comment']; ?></th>-->
</tr>
</thead>
<?PHP
if(@$getproduct){
foreach(@$getproduct as $key => $va){
$getbusxroute = $db->getOne( "busxroute", "*"," BusXRouteID = '".$va['BusXRouteID']."'","" );
$getbus = $db->getOne( "bus", "*"," BusID= '".$getbusxroute['BusID']."'","" );
$getDetail = $db->getOne( "invoicedetail", "*"," InvoiceDetailID = '".$va['InvoiceDetailID']."'","" );
$getstart = $db->getOne("deliverypoint","*",$where_lang." and DeliveryPointID='".$va['StartPoint']."'");
$getend = $db->getOne("deliverypoint","*",$where_lang." and DeliveryPointID='".$va['EndPoint']."'");
$getpoint = $db->getOne("deliverypoint","*",$where_lang." and DeliveryPointID='".$va['LastPoint']."'");
$color = @$color=="#fff" ? "#E8E8E8" : "#fff";
list($date,$time) = @split(' ',@$va['HistDatetime']);
?>
<tr style="background:<?php echo $color;?>">
<th><?php echo $getDetail['ProductCode'];?></th>
<th><?php echo $va['detailName'];?></th>
<th><?php echo $va['DetailNameRe'];?></th>
<th><?php echo $getDetail['ProductName'];?></th>
<th><?php echo $getDetail['ProductDetail'];?></th>
<th><?php echo $getstart['DeliveryPointName'];?></th>
<th><?php echo $getend['DeliveryPointName'];?></th>
<th><?php echo $getpoint['DeliveryPointName'];?></th>
<th><?php echo $getbus['BusName'];?></th>
<th><?php echo $va['statusdesc'];?></th>
<th><?php echo @$objMaster->getdbdateformat_barcode($va['HistDatetime'])." ".$time;?></th>
<!-- <th><?php //echo ($va['comment'] ? $va['comment'] : "");?></th>-->
<tr>
<?php }
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo $lang_set['not_data']; ?></th>
<tr>
<?php
}
?>
</table>
<?PHP }?>
</form>
</div>
<!-- End Tab Content id="add"-->
</div>