<?php

echo "<div class='form_panel' align=left >";
	echo "<div class='form_panel_title'>";
	
					
		echo "<div class='fa-stack fa-lg'  style='cursor:pointer;float:left;'  onclick=\"document.".$this_form_name.".ui_action.value='ADD_ITEM_OK';mon_submit_form('".$this_form_name."','".$this_url."')\" >";
			echo "<i class='fa fa-square fa-stack-2x color_green'  ></i><i class='fa fa-check fa-stack-1x color_white' ></i>";
		echo "</div>";
			
	
		
		echo "<div class='fa-stack fa-lg'  style='cursor:pointer;float:right;'  onclick=\"document.".$this_form_name.".ui_action.value='';mon_submit_form('".$this_form_name."','".$this_url."')\" >";
			echo "<i class='fa fa-square fa-stack-2x color_red'  ></i><i class='fa fa-times fa-stack-1x color_white' ></i>";
		echo "</div>";

	
	
	
	echo "</div>";
	echo "<div class='form_panel_content'>";
		
		
		
		
			
		echo "<div style='width:96%;padding:1%;margin:1%;box-shadow:0px 0px 3px #888;background:#ECF0F1;'>";
			echo "<b>Search PO: </b>";
			echo "<input type=text class='textbox textbox-l' name='pick_po_search' value='".$_REQUEST["pick_po_search"]."' >";
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer;'  onclick=\"document.".$this_form_name.".ui_action.value='PICK_PO';mon_submit_form('".$this_form_name."','".$this_url."')\" >";
				echo "<i class='fa fa-square fa-stack-2x color_grey'  ></i><i class='fa fa-search fa-stack-1x color_white' ></i>";
			echo "</div>";
		
		echo "</div>";
		
		echo "<div style='width:100%;height:400px;overflow:auto;float:left;'>";
		
		
			
		
		
		
		$query_po = " select * 
					from t_".$key_table_prefix."_purchase_order_header
					";
		if($_REQUEST["pick_po_search"]!="")
		{
			$query_po=$query_po." where (
											poh_doc_no like '%".$_REQUEST["pick_po_search"]."%'
											or
											poh_date like '%".$_REQUEST["pick_po_search"]."%'
											or
											poh_reference_no like '%".$_REQUEST["pick_po_search"]."%'
											or
											poh_remark like '%".$_REQUEST["pick_po_search"]."%'
											
											or
											poh_vendor_code like '%".$_REQUEST["pick_po_search"]."%'
											or
											poh_vendor_name like '%".$_REQUEST["pick_po_search"]."%'
											
			
											) ";	
		}
		$query_po=$query_po." order by poh_date desc  ";
		
		
		$result_po = mysqli_query($dbconn,$query_po);
		while($line_po= mysqli_fetch_array($result_po,MYSQLI_ASSOC))
		{
			echo "<div style='width:96%;padding:1%;margin:1%;box-shadow:0px 0px 3px #888;'
			     onclick=\"document.".$this_form_name.".ui_action.value='PICK_PO_DONE';document.".$this_form_name.".add_item_id.value='".$line_po["poh_id"]."';mon_submit_form('".$this_form_name."','".$this_url."')\"
				>";
				
				//show balance:
				//echo "<span style='float:right;text-align:right;'>";
					//echo "<font size=1 color=#BDC3C7 >".$line_po["poh_date"]."</font>";
				//echo "</span>";
				
				
				//show info:	
				echo "<b>".$line_po["poh_doc_no"]."</b><br>";
				echo "Date : ".$line_po["poh_date"]."<br>";
				echo "Vendor: ".$line_po["poh_vendor_code"]." ".$line_po["poh_vendor_name"]."<br>";
				
				echo "Reference No.: ".$line_po["poh_reference_no"]."<br>";
				echo "Remark: ".$line_po["poh_remark"]."<br>";
				
			
			
			
			
			
			echo "</div>";
			
			
		}
		echo "</div>";
		
		
	 
	
	
	echo "</div>";
echo "</div>";

?>