<?php


//All this setting can be configured accordingly for the view display
  	
  	//===Row Limit per page========
	$limit=50;
  
  	
    //===Search Label =============
    //no need to specify field for search after v7.1 framework
	//$listing_search_label[1]="Name";
	//$listing_search_label[2]="User ID";
	//$listing_search_label[3]="Email";
	
		
	//===Search Fields==========
	$listing_search_field[1]="sth_doc_no";
	$listing_search_field[2]="sth_customer_code";
	$listing_search_field[3]="sth_customer_name";
	$listing_search_field[4]="sth_vendor_code";
	$listing_search_field[5]="sth_vendor_name";
	$listing_search_field[6]="sth_reference_no";
	$listing_search_field[7]="sth_remark";
	
	
	
        
        
        
  	//===Header Label =============
  	$listing_header[1]="Modified Date";
	$listing_header[2]="Doc. No.";
	$listing_header[3]="Customer";
	$listing_header[4]="Vendor";
	$listing_header[5]="Date";
	$listing_header[6]="Amount";
	$listing_header[7]="Status";
	$listing_header[8]="Transaction";
	$listing_header[9]="Reference";
	$listing_header[10]="Remark";
	$listing_header[11]="Category";
	
	
		
	//===Database Fields==========
	$listing_content[1]="modified_date";
	$listing_content[2]="sth_doc_no";
	$listing_content[3]="sth_customer_name";
	$listing_content[4]="sth_vendor_name";
	$listing_content[5]="sth_date";
	$listing_content[6]="sth_total_amount";
	$listing_content[7]="sth_status";
	$listing_content[8]="sth_module";
	
	$listing_content[9]="sth_reference_no";
	$listing_content[10]="sth_remark";
	$listing_content[11]="sth_category_code";
	
	
	
	
	//===Column width==========
	$listing_width[1]="80";
	$listing_width[2]="60";
	$listing_width[3]="100";
	$listing_width[4]="150";
	$listing_width[5]="80";
	$listing_width[6]="60";
	$listing_width[7]="60";
	$listing_width[8]="100";
	
	$listing_width[9]="80";
	$listing_width[10]="100";
	$listing_width[11]="80";
	
	
	
        //===Column align==========
	$listing_align[1]="left";
    	$listing_align[2]="left";
    	$listing_align[3]="left";
	$listing_align[4]="left";
	$listing_align[5]="left";
	$listing_align[6]="right";
	$listing_align[7]="left";
	$listing_align[8]="left";
	
	$listing_align[9]="left";
	$listing_align[10]="left";
	$listing_align[11]="left";
	
    
        
	//==Listing Url===============
	$this_url="mod/stock_transaction/index.php";
	$display_url="mod/stock_transaction/display.php";
	
	

	
	
	//===Main SQL query=============
    $query="SELECT * , date_format(modified_date,'%d-%m-%Y') as modified_date_f FROM $form_table_name ";
    $query=$query." where ifnull(client_id,0) >= 0 ";
    
    if($_SESSION["list_filter"]["filter_stock_transaction_category"]!="ALL")
    {
    		$query=$query." and sth_category_code = '".$_SESSION["list_filter"]["filter_stock_transaction_category"]."' ";
    }

    if($_SESSION["list_filter"]["filter_stock_transaction_customer"]!="ALL")
    {
    		$query=$query." and sth_customer_code = '".$_SESSION["list_filter"]["filter_stock_transaction_customer"]."' ";
    }
    
    if($_SESSION["list_filter"]["filter_stock_transaction_vendor"]!="ALL")
    {
    		$query=$query." and sth_vendor_code = '".$_SESSION["list_filter"]["filter_stock_transaction_vendor"]."' ";
    }
    
    if($_SESSION["list_filter"]["filter_stock_transaction_warehouse"]!="ALL")
    {
    		$query=$query." and ( sth_warehouse_code = '".$_SESSION["list_filter"]["filter_stock_transaction_warehouse"]."' or ifnull(sth_warehouse_code2,'') = '".$_SESSION["list_filter"]["filter_stock_transaction_warehouse"]."') ";
    }
    
    if($_SESSION["list_filter"]["filter_stock_transaction_module"]!="ALL")
    {
    		$query=$query." and sth_module= '".$_SESSION["list_filter"]["filter_stock_transaction_module"]."' ";
    }
    
    
    
	//$query=$query." where client_id = '".$CurrentUserID."' ";
	
    
	
	//==Action Button Setting======
	$action_cell=true;
	$action_cell_edit=true;
	$action_cell_delete=false;
?>