<?php include "../../includes/start_ajax.php";

?>

<div  align=left >
<?php


$cell_width="50";


$this_url="mod/stock_balance_simple/index.php";




if($_REQUEST["filter_balance_category"]!="")
{
		$_SESSION["list_filter"]["filter_balance_category"] = $_REQUEST["filter_balance_category"];
}
if($_SESSION["list_filter"]["filter_balance_category"]=="")
{
    $_SESSION["list_filter"]["filter_balance_category"]="ALL";
}


if($_REQUEST["filter_balance_warehouse"]!="")
{
	$_SESSION["list_filter"]["filter_balance_warehouse"] = $_REQUEST["filter_balance_warehouse"];
		
}
if($_SESSION["list_filter"]["filter_balance_warehouse"]=="")
{
    $_SESSION["list_filter"]["filter_balance_warehouse"]="ALL";
}




if($_REQUEST["filter_balance_vendor"]!="")
{
    $_SESSION["list_filter"]["filter_balance_vendor"]=$_REQUEST["filter_balance_vendor"];
}

if($_SESSION["list_filter"]["filter_balance_vendor"]=="")
{
    $_SESSION["list_filter"]["filter_balance_vendor"]="ALL";
}



//-------------toggle filter button---------------------
if($_REQUEST["filter_balance_color"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_color"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_color"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_color"]="YES";
	}
}



if($_REQUEST["filter_balance_size"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_size"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_size"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_size"]="YES";
	}
}


if($_REQUEST["filter_balance_pattern"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_pattern"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_pattern"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_pattern"]="YES";
	}
}


if($_REQUEST["filter_balance_featured"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_featured"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_featured"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_featured"]="YES";
	}
}


if($_REQUEST["filter_balance_inventory"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_inventory"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_inventory"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_inventory"]="YES";
	}
}


if($_REQUEST["filter_balance_discount"]!="")
{
	
	if($_SESSION["list_filter"]["filter_balance_discount"]=="YES")
	{
	    $_SESSION["list_filter"]["filter_balance_discount"]="";
	}
	else {
		$_SESSION["list_filter"]["filter_balance_discount"]="YES";
	}
}





$query_pdt_count="select count(pdt_id) as total,
			pdt_category_code
			from t_".$key_table_prefix."_product 
			group by pdt_category_code ; ";
$result_pdt_count =mysqli_query($dbconn,$query_pdt_count);
while($line_pdt_count = mysqli_fetch_array($result_pdt_count,MYSQLI_ASSOC))
{
	$category_product_count[$line_pdt_count["pdt_category_code"]]=$line_pdt_count["total"];
}






echo "<form name='form_balance' >";



echo "<section class='view_toolbar'>";
               echo "<div class='view_toolbar_left' style='width:50%;'>";
					echo "<span class='fa fa-tasks'></span> Stock Balance";
               echo "</div>";
               echo "<div class='view_toolbar_right'>";	

			

				echo "<div class='fa-stack fa-lg'  style='cursor:pointer;float:right;'  onclick=\"mon_refresh_tab(mon_current_selected_tab);\" >";
					echo "<i class='fa fa-square fa-stack-2x color_red'   ></i><i class='fa fa-refresh fa-stack-1x color_white' ></i>";
				echo "</div>";
					

               echo "</div>";
	echo "</section>";
	

//----------------------filters 0-------------------------------------------------------------


echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-filter fa-lg'></span> Filter Product with Settings";
	echo "</div>";
	echo "<div class='view_toolbar_filter' style='border:0px solid #ff0000;'>";
		
		echo "<div   class='view_toolbar_filter_box'>";			
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer; ' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_color=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
				if($_SESSION["list_filter"]["filter_balance_color"]=="YES")
				{
					$this_button_color="color_green";
				}
				else {
					$this_button_color="color_grey";
				}
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-tint fa-stack-1x color_white" ></i>';
			echo "</div> Color ";
		echo "</div>";
			
		echo "<div   class='view_toolbar_filter_box'>";				
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer; ' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_size=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			if($_SESSION["list_filter"]["filter_balance_size"]=="YES")
			{
				$this_button_color="color_green";
			}
			else {
				$this_button_color="color_grey";
			}
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-arrows-h fa-stack-1x color_white" ></i>';
			echo "</div> Size ";
		echo "</div>";	
			
		echo "<div class='view_toolbar_filter_box'>";			
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer; ' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_pattern=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			if($_SESSION["list_filter"]["filter_balance_pattern"]=="YES")
			{
				$this_button_color="color_green";
			}
			else {
				$this_button_color="color_grey";
			}
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-puzzle-piece fa-stack-1x color_white" ></i>';
			echo "</div> Pattern";
		echo "</div>";
		
		echo "<div   class='view_toolbar_filter_box'>";			
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer;' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_featured=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			if($_SESSION["list_filter"]["filter_balance_featured"]=="YES")
			{
				$this_button_color="color_green";
			}
			else {
				$this_button_color="color_grey";
			}	
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-lightbulb-o fa-stack-1x color_white" ></i>';
			echo "</div> Featured ";
		echo "</div>";
		
		echo "<div   class='view_toolbar_filter_box'>";			
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer;' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_inventory=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			if($_SESSION["list_filter"]["filter_balance_inventory"]=="YES")
			{
				$this_button_color="color_green";
			}
			else {
				$this_button_color="color_grey";
			}	
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-cubes fa-stack-1x color_white" ></i>';
			echo "</div> Inventory ";
		echo "</div>";
			
		echo "<div   class='view_toolbar_filter_box'>";			
			echo "<div class='fa-stack fa-lg'  style='cursor:pointer;' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&filter_balance_discount=YES&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			if($_SESSION["list_filter"]["filter_balance_discount"]=="YES")
			{
				$this_button_color="color_green";
			}
			else {
				$this_button_color="color_grey";
			}
				echo '<i class="fa fa-square fa-stack-2x '.$this_button_color.'"  ></i><i class="fa fa-cut fa-stack-1x color_white" ></i>';
			echo "</div> Discount ";
		echo "</div>";
			
	echo "</div>";
	
echo "</section>";




//----------------------filters 1-------------------------------------------------------------


echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-filter fa-lg'></span> Warehouse";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		
		echo "<select class='dropdown dropdown-auto' name='filter_balance_warehouse' onchange=\"mon_send_get('mod/stock_balance_simple/index.php','?filter_balance_warehouse='+this.value+'&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
			
			
			
			echo "<option value='ALL'>All Warehouses</option>";
			
			
			
			$query_whs="select * from t_".$key_table_prefix."_warehouse order by whs_code ; ";
			$result_whs =mysqli_query($dbconn,$query_whs);
			
			while($line_whs = mysqli_fetch_array($result_whs,MYSQLI_ASSOC))
			{
				
				if($_SESSION["list_filter"]["filter_balance_warehouse"]==$line_whs["whs_code"])
				{
					echo "<option value='".$line_whs["whs_code"]."' selected >";
				}
				else {
					echo "<option value='".$line_whs["whs_code"]."' >";
				}
				
					echo $line_whs["whs_code"];
					echo " - ";
					echo $line_whs["whs_name"];
				echo "</option>";
				
			}


		
			echo "</select>";
	
	
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
		echo "<br>";
	echo "</div>";
		
echo "</section>";




echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-filter fa-lg'></span> Product Category";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		
	echo "<select class='dropdown dropdown-auto' name='filter_balance_category' onchange=\"mon_send_get('mod/stock_balance_simple/index.php','?filter_balance_category='+this.value+'&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
		
		
		if($_SESSION["list_filter"]["filter_balance_category"]=="ALL")
		{
			echo "<option value='ALL' selected >All Categories</option>";
		}
		else {
			echo "<option value='ALL' >All Categories</option>";	
		}
		
		
		if($_SESSION["list_filter"]["filter_balance_category"]=="UNSPECIFIED")
		{
			echo "<option value='UNSPECIFIED' selected >Unspecified</option>";
		}
		else {
			echo "<option value='UNSPECIFIED' >Unspecified</option>";	
		}
		
		
		$query_cat="select * from t_".$key_table_prefix."_category order by cat_code ; ";
		$result_cat =mysqli_query($dbconn,$query_cat);
		while($line_cat = mysqli_fetch_array($result_cat,MYSQLI_ASSOC))
		{
			if($_SESSION["list_filter"]["filter_balance_category"]==$line_cat["cat_code"])
			{
				echo "<option value='".$line_cat["cat_code"]."' selected >";
			}
			else {
				echo "<option value='".$line_cat["cat_code"]."' >";
			}
			
				echo $line_cat["cat_code"];
				echo " - ";
				echo $line_cat["cat_name"];
				
				echo " (".($category_product_count[$line_cat["cat_code"]]+0).")";
				
			echo "</option>";
			
		}
	echo "</select>";
	
	
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
		echo "<br>";
	echo "</div>";
		
echo "</section>";





//----------------------filters 2-------------------------------------------------------------


echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-filter fa-lg'></span> Vendor";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		echo "<select class='dropdown dropdown-l' name='filter_balance_vendor' onchange=\"mon_send_get('mod/stock_balance_simple/index.php','?filter_balance_vendor='+this.value+'&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\" >";
			
			$query_filter="select * from t_".$key_table_prefix."_vendor order by vdr_code ";
			echo "<option value='ALL'>All</option>";
			$result_filter = mysqli_query($dbconn,$query_filter) or die("Listing failed- Err msg  ". mysqli_error($dbconn));
			while($line_filter=mysqli_fetch_array($result_filter,MYSQLI_ASSOC))
			{
				if($_SESSION["list_filter"]["filter_balance_vendor"]==$line_filter["vdr_code"])
				{
					echo "<option value='".$line_filter["vdr_code"]."' selected >".$line_filter["vdr_code"]." - ".$line_filter["vdr_name"]."</option>";
				}
				else {
					echo "<option value='".$line_filter["vdr_code"]."'>".$line_filter["vdr_code"]." - ".$line_filter["vdr_name"]."</option>";	
				}
			}
		echo "</select>";
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
			echo "<br>";
	echo "</div>";
		
echo "</section>";




echo "<section class='view_toolbar' >";
	echo "<div class='view_toolbar_search_field'>";
		echo "<span class='fa fa-search fa-lg'></span> Search";
	echo "</div>";
	echo "<div class='view_toolbar_search_button'>";
		echo "<input type=text class='textbox textbox-l' name='search_word' id='balance_product_search_word' value='".$_REQUEST["search_word"]."'>";
		echo "<br><br> <input type=button class='button button-blue' name='search_button'  value='Search' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&search_word='+document.getElementById('balance_product_search_word').value,'div_main')\">";
		echo " <input type=button class='button button-grey' name='clear_button'  value='Clear' onclick=\"mon_send_get('$this_url','?offset=0".$extraurl."&search_word=','div_main')\">";
		echo "<br><br>";
		
	echo "</div>";
	echo "<div class='view_toolbar_action_button'>";
			echo "<br>";
	echo "</div>";
		
echo "</section>";





	
	$data_found=false;

	$query_pdt="select * from t_".$key_table_prefix."_product 
			where pdt_id> 0 
			";
			//where pdt_code = '".$_SESSION["BALANCE_PDT_CODE"]."'
	if($_SESSION["list_filter"]["filter_balance_category"]!="ALL")
	{
		if($_SESSION["list_filter"]["filter_balance_category"]=="UNSPECIFIED")
		{
			$query_pdt=$query_pdt." and (pdt_category_code = '' or pdt_category_code = '0'  ) ";
		}
		else {
			$query_pdt=$query_pdt." and pdt_category_code = '".$_SESSION["list_filter"]["filter_balance_category"]."' ";
		}
		
		
	}
	
	
				 
	if($_SESSION["list_filter"]["filter_balance_vendor"]!="ALL")
	{
		$query_pdt=$query_pdt." and pdt_vendor_code = '".$_SESSION["list_filter"]["filter_balance_vendor"]."' ";
		
	}
	if($_REQUEST["search_word"]!="")
	{
		$query_pdt=$query_pdt." and  ( pdt_code like '%".$_REQUEST["search_word"]."%' ";
		$query_pdt=$query_pdt." or pdt_barcode like '%".$_REQUEST["search_word"]."%' ";
		$query_pdt=$query_pdt." or pdt_name like '%".$_REQUEST["search_word"]."%' ";
		$query_pdt=$query_pdt." ) ";
	}
	
	if($_SESSION["list_filter"]["filter_balance_color"]=="YES")
    	{
    	    $query_pdt=$query_pdt." and pdt_select_color = 'YES' ";   
    	}
	
	if($_SESSION["list_filter"]["filter_balance_size"]=="YES")
    	{
    	    $query_pdt=$query_pdt." and pdt_select_size = 'YES' ";   
    	}
	
	if($_SESSION["list_filter"]["filter_balance_pattern"]=="YES")
    	{
    	    $query_pdt=$query_pdt." and pdt_select_pattern = 'YES' ";   
    	}
	
	if($_SESSION["list_filter"]["filter_balance_featured"]=="YES")
    	{
    	    $query_pdt=$query_pdt." and pdt_featured = 'YES' ";   
    	}
	
	if($_SESSION["list_filter"]["filter_balance_featured"]=="YES")
     {
 	   $query_pdt=$query_pdt." and pdt_featured = 'YES' ";   
     }
	
	if($_SESSION["list_filter"]["filter_balance_inventory"]=="YES")
     {
 	   $query_pdt=$query_pdt." and pdt_inventory_tracking = 'YES' ";   
     }
	
	
	if($_SESSION["list_filter"]["filter_balance_discount"]=="YES")
     {
 	   $query_pdt=$query_pdt." and pdt_discount_allow = 'YES' ";   
     }
	
	
	
	
	$result_pdt =mysqli_query($dbconn,$query_pdt);
	while($line_pdt = mysqli_fetch_array($result_pdt,MYSQLI_ASSOC))
	{
		$data_found=true;
		$pdt_data[$line_pdt["pdt_code"]]=$line_pdt["pdt_name"];
		
		$lib_barcode[$line_pdt["pdt_code"]]=$line_pdt["pdt_barcode"];
	}
	
	
	
	
	
	
	
	
	
	
	$query_whs = "select * from t_".$key_table_prefix."_warehouse 
			 ";
	if($_SESSION["list_filter"]["filter_balance_warehouse"]!="ALL")		 
	{
		$query_whs = $query_whs." where whs_code = '".$_SESSION["list_filter"]["filter_balance_warehouse"]."' ";
	}
	
	$result_whs = mysqli_query($dbconn,$query_whs);
	while($line_whs = mysqli_fetch_array($result_whs,MYSQLI_ASSOC))
	{
		$whs_data[$line_whs["whs_code"]]=$line_whs["whs_name"];
	}
	
	


	unset($bal_data);
	
	$query_balance="select * from t_".$key_table_prefix."_balance
				";
	if($_SESSION["list_filter"]["filter_balance_warehouse"]!="ALL")		 
	{
		$query_balance = $query_balance." where bal_warehouse_code = '".$_SESSION["list_filter"]["filter_balance_warehouse"]."' ";
	}
	$result_balance=mysqli_query($dbconn,$query_balance);
	while($line_balance=mysqli_fetch_array($result_balance,MYSQLI_ASSOC))
	{
		$bal_data[$line_balance["bal_product_code"]][$line_balance["bal_warehouse_code"]] = $bal_data[$line_balance["bal_product_code"]][$line_balance["bal_warehouse_code"]] +  $line_balance["bal_quantity"];	
		$bal_data[$line_balance["bal_product_code"]]["ALL"] = $bal_data[$line_balance["bal_product_code"]]["ALL"] +  $line_balance["bal_quantity"];	
		
	}
	
		
		
		
		
		
		
		echo "<div class='data_display_content'>";	
			echo "<div class='view_list_title_row'>";
				echo "<div class='view_list_title_content'>";
					
					echo "<div style='width:80px;' class='view_list_title_content_object'  >";
						echo "<b>Code</b>";
					echo "</div>";
					
					echo "<div style='width:80px;' class='view_list_title_content_object'  >";
						echo "<b>Barcode</b>";
					echo "</div>";
					
					echo "<div style='width:250px;' class='view_list_title_content_object'  >";
						echo "<b>Name</b>";
					echo "</div>";
					
					
					
					foreach($whs_data as $whs_code => $whs_name)
					{
						echo "<div style='width:".$cell_width."px;' class='view_list_title_content_object'  >";
							echo "<b>".$whs_code."</b><br>";
							echo "<font size=1>".$whs_name."</font>";
						echo "</div>";
						
					}
					
					echo "<div style='width:".$cell_width."px;' class='view_list_title_content_object'  >";
						echo "<b>Total</b><br>";
						
					echo "</div>";
					
					echo "<div style='width:".$cell_width."px;' class='view_list_title_content_object'  >";
						
					echo "</div>";
				echo "</div>";
			echo "</div>";
					
					
			if(!$data_found)		
			{
				echo "<div class='view_row'>";
				
				
					echo "<div style='width:100%;text-align:center;' >";	
						echo "<br><br><font color=#BDC3C7 >No Product Found</font>";
					echo "</div>";
			
				echo "</div>";
				
				
			}
			else {
				foreach($pdt_data as $pdt_code => $pdt_name)
				{
				
					echo "<div class='view_row'>";
					
					
						echo "<div style='width:80px;text-align:left;' class='view_row_content_object'  >";
							echo "<font class='view_row_content_label'>Code</font>";
						
							echo "<font class='view_row_content_text'>";
								echo "<font color=#000>".$pdt_code."</font> ";
								
							echo "</font><br>";			
						echo "</div>";
						
						echo "<div style='width:80px;text-align:left;' class='view_row_content_object'  >";
							echo "<font class='view_row_content_label'>Barcode</font>";
						
							echo "<font class='view_row_content_text'>";
								echo "<font color=#000>".$lib_barcode[$pdt_code]."</font> ";
								
							echo "</font><br>";			
						echo "</div>";
						
						
					
						echo "<div style='width:250px;text-align:left;' class='view_row_content_object'  >";
							echo "<font class='view_row_content_label'>Name</font>";
						
							echo "<font class='view_row_content_text'>";
								
								echo "<font color=#000>".$pdt_name."</font>";
							echo "</font><br>";			
						echo "</div>";
						
						
						
						
				
						foreach($whs_data as $whs_code => $whs_name)
						{
							echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
								echo "<font class='view_row_content_label'>".$whs_name."</font>";
							
								echo "<font class='view_row_content_text'>";
									echo $bal_data[$pdt_code][$whs_code];
									
								echo "</font><br>";			
							echo "</div>";
					
							$total_bal_data[$whs_code] = $total_bal_data[$whs_code] + $bal_data[$pdt_code][$whs_code];
							
							
						}
						
						
							echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
								echo "<font class='view_row_content_label'>".$whs_name."</font>";
							
								echo "<font class='view_row_content_text'>";
									echo "<b>".$bal_data[$pdt_code]["ALL"]."</b>";
									
								echo "</font><br>";			
							echo "</div>";
							
							
							$total_bal_data["ALL"] = $total_bal_data["ALL"] + $bal_data[$pdt_code]["ALL"];
							
							
							
							echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
								
							echo "</div>";
						
					echo "</div>";
					
				}
			
			
			
			
				//total:
				
				echo "<div class='view_row'>";
				
				
					echo "<div style='width:80px;text-align:left;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Code</font>";
					
						echo "<font class='view_row_content_text'>";
							echo "<font color=#000></font> ";
							
						echo "</font><br>";			
					echo "</div>";
					
					echo "<div style='width:80px;text-align:left;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Barcode</font>";
					
						echo "<font class='view_row_content_text'>";
							echo "<font color=#000></font> ";
							
						echo "</font><br>";			
					echo "</div>";
					
					
				
					echo "<div style='width:250px;text-align:left;' class='view_row_content_object'  >";
						echo "<font class='view_row_content_label'>Name</font>";
					
						echo "<font class='view_row_content_text'>";
							
							echo "<font color=#000><b>Total</b></font>";
						echo "</font><br>";			
					echo "</div>";
					
					
					
					
			
					foreach($whs_data as $whs_code => $whs_name)
					{
						echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
							echo "<font class='view_row_content_label'>".$whs_name."</font>";
						
							echo "<font class='view_row_content_text' style='color:#000;'>";
								echo "<b>".$total_bal_data[$whs_code]."</b>";
								
							echo "</font><br>";			
						echo "</div>";
				
				
						
					}
					
					
						echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
							echo "<font class='view_row_content_label'>".$whs_name."</font>";
						
							echo "<font class='view_row_content_text' style='color:#000;' >";
								echo "<b>".$total_bal_data["ALL"]."</b>";
								
							echo "</font><br>";			
						echo "</div>";
						
						echo "<div style='width:".$cell_width."px;text-align:right;' class='view_row_content_object'  >";
							
						echo "</div>";
					
				echo "</div>";
				
			}	
				
			
			
			
		echo "</div>";

		
		



echo "<div style='float:left;height:200px;'></div>";

echo "</form>";
?>
</div>
<?php include "../../includes/end_ajax.php";

?>
