| 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_supply/ |
Upload File : |
<?php
@$linkurl = "index.php?name=manu_supply&file=supplyfrombus";
@$link1 = "index.php?name=manu_supply&file=supplytrack";
if(isset($fullsc)){
@$linkurl .= "&fullsc=fullsc";
@$link1 .= "&fullsc=fullsc";
}
$linkprints = "index.php?name=exportReport&file=report_trackproduct";
@$where_lang = " lang_code = '".@$lang_code."'";
@$search = @$_POST['keyword'] ? @$_POST['keyword'] : @$_GET['keyword'] ;
@$setpoint = @$_POST['DeliveryPointID'] ? @$_POST['DeliveryPointID'] : @$_GET['DeliveryPointID'] ;
if(@$search){
@$search = str_replace("'", "\'", @$search);
if(@$where_f){
@$where_f .= " and b.SetDate = '".@$objMaster->getdateformat(@$search)."' and a.DeliveryPointID = '
".@$setpoint."' order by c.RouteName,b.SetTime desc";
}else{
@$where_f = " b.SetDate = '".@$objMaster->getdateformat(@$search)."' and a.DeliveryPointID = '
".@$setpoint."' order by c.RouteName,b.SetTime desc";
}
@$setpoint = @$setpoint;
}else{
@$setpoint = @$_SESSION['member']['point'];
@$where_f = " b.SetDate = '".date("Y-m-d")."' and a.DeliveryPointID = '
".@$_SESSION['member']['point']."' order by c.RouteName,b.SetTime desc";
}
$fieldid = array();
if(@$_GET['act']=="updateall"){
//echo "<pre>"; print_r($_SESSION);
//exit;
//echo '<pre>'; var_dump($_POST); echo '</pre>';
//if()
if(@is_array($_POST['pagedel'])){
foreach($_POST['pagedel'] as $key => $val){
if($_POST['pointName'][$val]==$_SESSION['member']['type']){
//echo $_POST['pointName'][$val];
// if(count(@$_POST['pagedel']) > 0){
//foreach(@$_POST['pagedel'] as $key => $val){
$arrDataHist = array();
$getiddetail = $db->getOne("invoicedetail","*","InvoiceDetailID='".$val."'","","");
$getend = $db->getOne("invoice","*","InvoiceID='".$getiddetail['InvoiceID']."'","","");
$arrDataHist['InvoiceDetailID'] = $getiddetail['InvoiceDetailID'];
$arrDataHist['InvoiceID'] = $getiddetail['InvoiceID'];
$arrDataHist['LastPoint'] = @$_POST['DeliveryPointID_Print'];
$arrDataHist['BusXRouteID'] = $getiddetail['BusXRouteID'];
$arrDataHist['EmpSendID'] = $getiddetail['EmpSendID'];
$arrDataHist['EmpReviceID'] = $_SESSION['member']['userid'];
$arrDataHist['StartPoint'] = $getend['InvoiceStartPoint'];
$arrDataHist['EndPoint'] = $getend['InvoiceEndPoint'];
$arrDataHist['status'] = '3';
$arrDataHist['HistDatetime'] = date("Y-m-d H:i:s");
$db->insertData("hist",$arrDataHist);
$arrUpdateProduct = array();
$arrUpdateProduct['status'] = '3';
$arrUpdateProduct['LastPoint'] = @$_POST['DeliveryPointID_Print'];
$arrUpdateProduct['EmpReviceID'] = $_SESSION['member']['userid'];
$arrUpdateProduct['BusXRouteID'] = '0';
$datasu = $db->updateData("invoicedetail",$arrUpdateProduct," InvoiceDetailID ='".$val."'");
//}
//}
}else{
$fieldid[] = $val;
}
}
}
//exit;
@$msg = "Update Data complete.";
@$res = true;
}
@$page = @$_GET['page'] ? @$_GET['page'] : 1;
@$arrpageP = @$db->getJoin("a.PointID,a.PointTime,a.PointStop,a.PointSequence,a.DeliveryPointID,a.PointPeriodic,a.RouteID,b.BusXRouteID,b.SetDate,b.SetTime,b.BusID,c.RouteName","better_routexpoint a
LEFT OUTER JOIN better_busxroute b ON a.RouteID = b.RouteID
LEFT JOIN better_route c on a.RouteID=c.RouteID
",@$where_f,"","");
@$arrPage = @$objMaster->viewPages(@$page, @$arrpageP, "50");
@$getPage = @$db->getJoin("a.PointID,a.PointTime,a.PointStop,a.PointSequence,a.DeliveryPointID,a.PointPeriodic,a.RouteID,b.BusXRouteID,b.SetDate,b.SetTime,b.BusID,c.RouteName","better_routexpoint a
LEFT OUTER JOIN better_busxroute b ON a.RouteID = b.RouteID
LEFT JOIN better_route c on a.RouteID=c.RouteID
",@$where_f,"",@$arrPage["offset"]);
@$getPoint = @$db->getAll( "deliverypoint", "*",@$where_lang." and DeliveryPointStatus = '1'","" );
@$linkurlsearch = "index.php?name=manu_supply&file=supplyfrombus&keyword=".@$search."&DeliveryPointID=".@$setpoint;
?>
<!-- Start Content Box -->
<div class="content-box">
<!-- Start Content Box Header-->
<div class="content-box-header">
<?PHP if(isset($fullsc)){ ?>
<label><a href="index.php?name=manu_main&hk=login"><img src="resources/images/home.png" alt="Edit" /></a></label>
<?PHP }?>
<h3><?php echo @$lang_set['busin_title']; ?></h3>
<ul class="content-box-tabs">
<li><a href="#list" <?php echo (@$_GET['act']=="" ? 'class="default-tab"' : '');?>><?php echo @$lang_set['list_busin']; ?></a></li> <!-- href must be unique and match the id of target div -->
</ul>
<div class="clear"></div>
</div>
<!-- End Content Box Header-->
<!-- Start Content Box Content-->
<div class="content-box-content">
<?php if(@$res){?>
<div class="notification success png_bg">
<a href="#" class="close"><img src="resources/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
<div>
<?php echo @$msg;?>
</div>
</div>
<?php
if(@$_POST['fu']){
@$linkurl = "index.php?name=manu_supply&file=supplyfrombus&fullsc=fullsc" ?>
<meta http-equiv="refresh" content="1;URL=<?PHP echo @$linkurl;?>">
<?php }else{
@$linkurl = "index.php?name=manu_supply&file=supplyfrombus" ?>
<meta http-equiv="refresh" content="1;URL=<?PHP echo @$linkurl;?>">
<?php
}
}?>
<!-- Start Tab Content id="list"-->
<div class="tab-content <?php echo (@$_GET['act']=="" ? 'default-tab' : '');?>" id="list">
<form action="<?PHP echo @$linkurl;?>" method="post" name="form_search">
<?php echo @$lang_set['input_search'];?> :
<?php if(@$_SESSION['member']['permistion'] == "4"){?>
<select name="DeliveryPointID" id="DeliveryPointID" onchange="SelectSS();">
<?php
if(@$getPoint){foreach($getPoint as $key => $val){
?>
<option value="<?php echo @$val['DeliveryPointID'];?>" <?php echo (@$val['DeliveryPointID']=='' || @$val['DeliveryPointID']==@$setpoint ? "selected" : "")?>><?php echo @$val['DeliveryPointName'];?></option>
<?php }
}
?>
</select>
<?PHP }else{
@$getpointname = @$db->getOne("deliverypoint","*",@$where_lang." and DeliveryPointID='".@$setpoint."'");
?>
<a><?PHP echo @$getpointname['DeliveryPointName']?></a>
<input type="hidden" name="DeliveryPointID" value="<?PHP echo @$setpoint;?>" />
<?PHP }?>
<input type="text" class="text date_picker" name="keyword" value="<?php echo @$search == ''? @$objMaster->getdbdateformat(date("Y-m-d")) : @$search ;?>"/>
<input type="submit" class="button" value="ค้นหา"/>
</form>
<form action="<?PHP echo @$linkurlsearch;?>&act=updateall" method="post">
<input type="hidden" name="DeliveryPointID_Print" value="<?PHP echo @$setpoint;?>"/>
<input type="hidden" name="Date_Print" value="<?PHP echo @$search;?>"/>
<?php if(@$_GET['fullsc']){ ?>
<input type="hidden" name="fu" value="<?PHP echo @$_GET['fullsc'];?>"/>
<?php }?>
<table cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
<th><input type="checkbox" class="check_all" /></th>
<th><?php echo @$lang_set['route_code']; ?></th>
<th><?php echo @$lang_set['route_name']; ?></th>
<th><?php echo @$lang_set['deliverypoint_name']; ?></th>
<th><?php echo @$lang_set['bus_name']; ?></th>
<th><?php echo @$lang_set['bustype_name']; ?></th>
<th><?php echo @$lang_set['planbuspoint_date']; ?></th>
<th><?php echo @$lang_set['planbuspoint_time']; ?></th>
<th style="text-align:center;"><?php echo "พัสดุบนรถ"; ?></th>
</tr>
</thead>
<?php
@$checkmin = 0;
@$check = 0;
if(@$getPage){
foreach($getPage as $key => $val){
@$getpoint = @$db->getOne("deliverypoint","*",@$where_lang." and DeliveryPointID='".@$val['DeliveryPointID']."'");
@$getroute = @$db->getOne("route","*",@$where_lang." and RouteID='".@$val['RouteID']."'");
@$getbus = @$db->getOne("bus","*",@$where_lang." and BusID='".@$val['BusID']."'");
@$getbustype = @$db->getOne("bustype","*",@$where_lang." and BusTypeID='".@$getbus['BusType']."'");
@$gettime = @$db->gettest("SELECT ADDTIME( '".@$val['SetDate']." ".@$val['SetTime']."', '".@$val['PointTime']."' ) AS PointTime");
@$getsuccess = explode(" ",@$gettime['PointTime']);
//echo "<pre>";print_r(@$val);
@$getmin = @$db->getOne("routexpoint","min(PointSequence) as min"," RouteID='".@$val['RouteID']."'");
if(@$getmin['min'] != @$val['PointSequence']){
?>
<tr>
<th> </th>
<td><?php echo @$getroute['RouteCode'];?></td>
<td><?php echo @$getroute['RouteName'];?></td>
<td><?php echo @$getpoint['DeliveryPointName'];?></td>
<td><?php echo @$getbus['BusName'];?></th>
<td><?php echo @$getbustype['BusTypeName'];?></td>
<td><?php echo @$objMaster->getdbdateformat(@$getsuccess[0])?></td>
<td><?php echo @$getsuccess[1];?></td>
<td style="text-align:center;">
<a title="รายการพัสดุบนรถ" onclick="ShowDetailBus(<?php echo @$val['BusXRouteID'];?>);" style="cursor:pointer"><img src="resources/images/icons/Out.png" alt="PlanBusPoint" /></a>
<input type="hidden" value="0" id="CheckShowDetailBus_<?php echo @$val['BusXRouteID'];?>" />
</td>
</tr>
<tr>
<th colspan="11">
<div id="DetailBus_<?php echo @$val['BusXRouteID'];?>" style="display:none">
<fieldset>
<table>
<tr style="background:#999; color:#fff;">
<th><input type="checkbox" class="checkall" /></th>
<th><?php echo @$lang_set['endpoint']; ?></th>
<th><?php echo @$lang_set['CodeProduct']; ?></th>
<th><?php echo @$lang_set['NameProduct']; ?></th>
<th><?php echo @$lang_set['WeightProduct']; ?></th>
<th><?php echo @$lang_set['SizeProducr']; ?></th>
<th><?php echo @$lang_set['totalmoney']; ?></th>
<th><?php echo @$lang_set['invoice_status']; ?></th>
<th><?php echo @$lang_set['comment']; ?></th>
</tr>
<?PHP
@$getcode = @$db->getOne("busxroute","*"," BusXRouteID='".@$val['BusXRouteID']."'");
@$getrouteid = @$getcode['RouteID'];
@$getbusid = @$getcode['BusID'];
@$getroutename = @$db->getOne("route","*"," RouteID='".@$getrouteid."'");
@$getbusname = @$db->getOne("bus","*"," BusID='".@$getbusid."'");
//@$where_f = " BusXRouteID = '".@$val['BusXRouteID']."' and InvoiceEndPoint = '".@$setpoint."' or 1=1 ''";
//@$getDetailBus = @$db->getJoin("*","better_invoicedetail a left outer join better_invoice b on a.InvoiceID = b.InvoiceID
// left outer join better_producereturn c on a.ProductCode = c.ProductCode",@$where_f,"");
@$where_f = " a.BusXRouteID = '".@$val['BusXRouteID']."' and b.InvoiceEndPoint = '
".@$setpoint."' or (c.ProductCode <> '' and a.BusXRouteID = '
".@$val['BusXRouteID']."')";
@$getDetailBus = @$db->getJoin("distinct a.*","better_invoicedetail a left outer join better_invoice b on a.InvoiceID = b.InvoiceID
left outer join better_productreturn c on a.ProductCode = c.ProductCode
",@$where_f,"");
if(@$getDetailBus){
foreach($getDetailBus as $key => $va){
@$getstatusproduct = @$db->getOne("invoidestatus","*"," statusid='".@$va['status']."'");
@$getinvoice = @$db->getOne( "invoice", "*"," InvoiceID = '".@$va['InvoiceID']."'","" );
@$getendname = @$db->getOne("deliverypoint","*","DeliveryPointID = ".@$getinvoice['InvoiceEndPoint']);
@$getnamesize = @$db->getOne("setupsize","*","SetupSizeID = ".@$va['ProductSize']);
?>
<tbody id="ShowTrack">
<tr>
<td><span id="chkbar_<?php echo @$va['InvoiceDetailID'];?>"><input type="checkbox" name="pagedel[]" value="<?php echo @$va['InvoiceDetailID'];?>"/></span>
<input type="hidden" name="pointName[<?php echo @$va['InvoiceDetailID'];?>]" value="<?php echo @$getendname['DeliveryPointName'];?>" />
</td>
<td><?php echo @$getendname['DeliveryPointName'];?></td>
<td><?php echo @$va['ProductCode'];?></td>
<td><?php echo @$va['ProductName'];?></td>
<td><?php echo @$va['ProductWeight'];?></td>
<td><?php echo @$getnamesize['SetupSizeSize'];?></td>
<td><?php echo @$va['totalmoney'];?></td>
<td><span id="divstatus_<?php echo @$va['InvoiceDetailID'];?>"><?php echo @$getstatusproduct['statusdesc'];?></span></td>
<td><?php echo @$va['comment'];?></a></td>
</tr>
<?php }
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
</tr>
<?php
}
?>
</tbody>
</table>
</fieldset>
</div>
</th>
</tr>
<?php
}else{@$checkmin++;}
@$check++;
}
?>
<?PHP if(@$check == @$checkmin){?>
<tr>
<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
</tr>
<?PHP }?>
<?PHP
}else{
?>
<tr>
<th colspan="11" style="text-align:center"><?php echo @$lang_set['not_data']; ?></th>
</tr>
<?php
}
?>
<tfoot>
<tr>
<td colspan="11">
<div class="bulk-actions align-left">
<a href="<?PHP echo $linkprints;?>&DeliveryPointID_Print=<?php echo @$setpoint;?>&Date_Print=<?php echo (@$search ? @$objMaster->getdateformat(@$search) : date("Y-m-d"));?>" target="_blank"><img src="resources/images/printer-icon.png" alt="Print" /></a><br /><br />
<select name="actdel">
<option value="updateall">รับพัสดุ</option>
</select>
<input class="button" type="submit" value="<?php echo @$lang_set['selected']; ?>" />
</div>
<!-- Start .pagination -->
<div class="pagination">
<?php //if($arrPage['allpage']>1){?>
<a href="<?PHP echo @$linkurlsearch;?>&page=1" title="หน้าแรก">« หน้าแรก</a><a href="<?PHP echo @$linkurlsearch;?>&page=<?php echo ($page==1 ? $page : @$page-1);?>" title="หน้าก่อนหน้า">« ก่อนหน้า</a>
<?php if( @$arrPage["startPage"]!="" && @$arrPage["endPage"] !="" ){?>
<?php
for($i = @$arrPage["startPage"]; $i <= @$arrPage["endPage"]; ++$i) {
echo'<a href="'.@$linkurlsearch.'&page='.@$i.'" '.(@$page == @$i ? 'class="number current"' : '').'>'.(@$i).'</a>';
}?>
<?php }?>
<a href="<?PHP echo @$linkurlsearch;?>&page=<?php echo ($page==$arrPage["allpage"] ? $page : $page+1);?>" title="หน้าถัดไป">ถัดไป »</a><a href="<?PHP echo @$linkurlsearch;?>&page=<?php echo @$arrPage["allpage"];?>" title="หน้าสุดท้าย">หน้าสุดท้าย »</a>
<?php //}?>
</div>
<!-- End .pagination -->
<div class="clear"></div>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<!-- End Tab Content id="list"-->
</div>
<div class="content-box-header">
<?PHP if(isset($fullsc)){ ?>
<label><a href="index.php?name=manu_main&hk=login"><img src="resources/images/home.png" alt="Edit" /></a></label>
<?PHP }?>
<h3>ติดตามสินค้า</h3>
<div class="clear"></div>
</div>
<div class="content-box-content">
<form onsubmit="javascript:UpdateStatusTrack(<?PHP echo @$setpoint;?>);return false;">
<fieldset>
<p>
<label><?php echo @$lang_set['CodeTrack']; ?>:</label>
<input type="text" class="text-input medium-input" name="InvoiceDetailCode" id="InvoiceDetailCode" />
<input type="button" class="button" onclick="javascript:UpdateStatusTrack(<?PHP echo @$setpoint;?>);" style="width:75px;" value="<?php echo @$lang_set['submit']; ?>" >
</p>
</fieldset>
</form>
</div>
<?php
if(is_array($fieldid)){
foreach($fieldid as $kk => $vv){
$field_id = $vv;
$getdetail = $db->getOne( "invoicedetail", "*"," InvoiceDetailID = '".$field_id."'","" );
$getinvoice = $db->getOne( "invoice", "*"," InvoiceID = '".$getdetail['InvoiceID']."'","" );
$getendname = $db->getOne("deliverypoint","*","DeliveryPointID = ".$getinvoice['InvoiceEndPoint']);
$getstatusproduct = $db->getOne("invoidestatus","*"," statusid='".$getdetail['status']."'");
$temp = "";
$temp .= "<div class='content-box-header'>";
$temp .= "<h3>Error Track</h3>";
$temp .= "</div>";
$temp .= "<div class='content-box-content'>";
$temp .= '<form>';
$temp .= "<table>";
$temp .= "<thead>";
$temp .= "<tr>";
$temp .= "<th width='20'></th>";
$temp .= "<th width='100'>".$lang_set['endpoint']."</th>";
$temp .= "<th width='100'>".$lang_set['CodeProduct']."</th>";
$temp .= "<th width='100'>".$lang_set['NameProduct']."</th>";
$temp .= "<th width='50'>".$lang_set['WeightProduct']."</th>";
$temp .= "<th width='50'>".$lang_set['SizeProducr']."</th>";
$temp .= "<th width='100'>".$lang_set['totalmoney']."</th>";
$temp .= "<th width='75'>".$lang_set['invoice_status']."</th>";
$temp .= "<th width='75'>".$lang_set['comment']."</th>";
$temp .= "<th width='47'>".$lang_set['action']."</th>";
$temp .= "</tr>";
$temp .= "</thead>";
$temp .= "<tr>";
$temp .= "<th><span id='ajax_loader'></span><span id='ajax_success'></span></th>";
$temp .= "<th>".$getendname['DeliveryPointName']."</th>";
$temp .= "<th>".$getdetail['ProductCode']."</th>";
$temp .= "<th>".$getdetail['ProductName']."</th>";
$temp .= "<th>".$getdetail['ProductWeight']."</th>";
$temp .= "<th>".$getdetail['ProductSize']."</th>";
$temp .= "<th>".$getdetail['totalmoney']."</th>";
$temp .= "<th>".$getstatusproduct['statusdesc']."</th>";
$temp .= '<th><input type="text" class="text-input large-input" name="Comment" id="Comment" value="'.$getdetail['comment'].'"/></th>';
$temp .= '<th><a href="javascript:void();" onclick="UpdateComment('.$getdetail['InvoiceDetailID'].');" title="Edit"><img src="resources/images/icons/ico_update.gif" alt="Edit" /></a></th>';
$temp .= "</tr>";
$temp .= "</table>";
$temp .= "</form>";
$temp .= "</div>";
echo $temp;
$getcode = $db->getOne( "invoicedetail", "*"," ProductCode = '".$getdetail['ProductCode']."'" );
if($getcode){
$getinvoice = $db->getOne( "invoice", "*"," InvoiceID = ".$getcode['InvoiceID'],"" );
$arrDataHist = array();
$getiddetail = $db->getOne("invoicedetail","*","InvoiceDetailID='".$getcode['InvoiceDetailID']."'","","");
$getend = $db->getOne("invoice","*","InvoiceID='".$getiddetail['InvoiceID']."'","","");
$arrDataHist['InvoiceDetailID'] = $getiddetail['InvoiceDetailID'];
$arrDataHist['InvoiceID'] = $getiddetail['InvoiceID'];
$arrDataHist['LastPoint'] = @$setpoint;
$arrDataHist['BusXRouteID'] = $getiddetail['BusXRouteID'];
$arrDataHist['EmpSendID'] = $getiddetail['EmpSendID'];
$arrDataHist['EmpReviceID'] = $_SESSION['member']['userid'];
$arrDataHist['StartPoint'] = $getend['InvoiceStartPoint'];
$arrDataHist['EndPoint'] = $getend['InvoiceEndPoint'];
$arrDataHist['status'] = '7';
$arrDataHist['HistDatetime'] = date("Y-m-d H:i:s");
$db->insertData("hist",$arrDataHist);
$arrUpdateProduct = array();
$arrUpdateProduct['status'] = '7';
$arrUpdateProduct['LastPoint'] = @$setpoint;
$arrUpdateProduct['EmpReviceID'] = $_SESSION['member']['userid'];
$arrUpdateProduct['BusXRouteID'] = '0';
$datasu = $db->updateData("invoicedetail",$arrUpdateProduct," InvoiceDetailID ='".$getcode['InvoiceDetailID']."'");
$arrUpdateComplate = array();
$arrUpdateComplate['InvoiceStatus'] = '7';
$datasu = $db->updateData("invoice",$arrUpdateComplate," InvoiceID ='".$getcode['InvoiceID']."'");
}
// $arrDataHist = array();
// //$getiddetail = $db->getOne("invoicedetail","*","InvoiceDetailID='".$getdetail['InvoiceDetailID']."'","","");
// //$getend = $db->getOne("invoice","*","InvoiceID='".$getiddetail['InvoiceID']."'","","");
// $arrDataHist['InvoiceDetailID'] = $getdetail['InvoiceDetailID'];
// $arrDataHist['InvoiceID'] = $getdetail['InvoiceID'];
// $arrDataHist['LastPoint'] = $field_point;
// $arrDataHist['BusXRouteID'] = $getdetail['BusXRouteID'];
// $arrDataHist['EmpSendID'] = $getdetail['EmpSendID'];
// $arrDataHist['EmpReviceID'] = $_SESSION['member']['userid'];
// $arrDataHist['StartPoint'] = $getend['InvoiceStartPoint'];
// $arrDataHist['EndPoint'] = $getend['InvoiceEndPoint'];
// $arrDataHist['status'] = '7';
// $arrDataHist['HistDatetime'] = date("Y-m-d H:i:s");
//
// //$db->insertData("hist",$arrDataHist);
//
// //$arrDataHist2 = array();
// //$arrDataHist2['ProductCode'] = $getiddetail['ProductCode'];
// //$db->insertData("productreturn",$arrDataHist2);
//
// $arrUpdateProduct = array();
// $arrUpdateProduct['status'] = '7';
// $arrUpdateProduct['LastPoint'] = $field_point;
// $arrUpdateProduct['EmpReviceID'] = $_SESSION['member']['userid'];
// $arrUpdateProduct['BusXRouteID'] = '0';
// //$datasu = $db->updateData("invoicedetail",$arrUpdateProduct," InvoiceDetailID ='".$getcode['InvoiceDetailID']."'");
//
// $arrUpdateComplate = array();
// $arrUpdateComplate['InvoiceStatus'] = '7';
// //$datasu = $db->updateData("invoice",$arrUpdateComplate," InvoiceID ='".$getcode['InvoiceID']."'");
//
// $st = "7";
//
}
//$arrForm=$_POST;
//$field_code = $arrForm['field_code'];
//$field_point = $arrForm['field_point'];
//$getcode = $db->getOne( "invoicedetail", "*"," ProductCode = '".$field_code."'" );
//$getdetail = $db->getOne( "invoicedetail", "*"," InvoiceDetailID = '".$field_id."'","" );
//$getinvoice = $db->getOne( "invoice", "*"," InvoiceID = '".$getdetail['InvoiceID']."'","" );
//$getendname = $db->getOne("deliverypoint","*","DeliveryPointID = ".$getinvoice['InvoiceEndPoint']);
//$getstatusproduct = $db->getOne("invoidestatus","*"," statusid='".$getdetail['status']."'");
//if($getdetail){
// $arrDataHist = array();
// //$getiddetail = $db->getOne("invoicedetail","*","InvoiceDetailID='".$getdetail['InvoiceDetailID']."'","","");
// //$getend = $db->getOne("invoice","*","InvoiceID='".$getiddetail['InvoiceID']."'","","");
// $arrDataHist['InvoiceDetailID'] = $getiddetail['InvoiceDetailID'];
// $arrDataHist['InvoiceID'] = $getiddetail['InvoiceID'];
// $arrDataHist['LastPoint'] = $field_point;
// $arrDataHist['BusXRouteID'] = $getiddetail['BusXRouteID'];
// $arrDataHist['EmpSendID'] = $getiddetail['EmpSendID'];
// $arrDataHist['EmpReviceID'] = $_SESSION['member']['userid'];
// $arrDataHist['StartPoint'] = $getend['InvoiceStartPoint'];
// $arrDataHist['EndPoint'] = $getend['InvoiceEndPoint'];
// $arrDataHist['status'] = '7';
// $arrDataHist['HistDatetime'] = date("Y-m-d H:i:s");
//
// $db->insertData("hist",$arrDataHist);
//
// $arrDataHist2 = array();
// $arrDataHist2['ProductCode'] = $getiddetail['ProductCode'];
// $db->insertData("productreturn",$arrDataHist2);
//
// $arrUpdateProduct = array();
// $arrUpdateProduct['status'] = '7';
// $arrUpdateProduct['LastPoint'] = $field_point;
// $arrUpdateProduct['EmpReviceID'] = $_SESSION['member']['userid'];
// $arrUpdateProduct['BusXRouteID'] = '0';
// $datasu = $db->updateData("invoicedetail",$arrUpdateProduct," InvoiceDetailID ='".$getcode['InvoiceDetailID']."'");
//
// $arrUpdateComplate = array();
// $arrUpdateComplate['InvoiceStatus'] = '7';
// $datasu = $db->updateData("invoice",$arrUpdateComplate," InvoiceID ='".$getcode['InvoiceID']."'");
//
// $st = "7";
//}
}
?>
<div id="PopupComment">
</div>