<?php
include "start.php";
include "../includes/function.php";

$json_array_status = array();



$query_get="select * from t_".$key_table_prefix."_invoice_header
		where ivh_operation_mode = 'ORDER'
		and not ifnull(ivh_delivery_status,'') = 'DELIVERED'
		and ivh_id = '".$_REQUEST["pkh_id"]."'
		
		";
$result_get = mysqli_query($dbconn, $query_get);
if($line_get = mysqli_fetch_array($result_get,MYSQLI_ASSOC))
{
  
  
		$query_update_header = "update  t_".$key_table_prefix."_invoice_header
     			
				set  ivh_picking_status = 'PICKED'  

					where ivh_id = '".$_REQUEST["pkh_id"]."'
     			
     			";
     	$result_update_header = mysqli_query($dbconn, $query_update_header);
		
		$this_data = array(
			"status" => "SUCCESS",
			"message" => "Update successful"
			
		  );
		array_push($json_array_status, $this_data); 
	
	

}


$content_array["update"] = $json_array_status;	





$json = json_encode($content_array);	
echo $json;
?>