<?php
$tdataVendor_Details=array();
	$tdataVendor_Details[".NumberOfChars"]=80; 
	$tdataVendor_Details[".ShortName"]="Vendor_Details";
	$tdataVendor_Details[".OwnerID"]="";
	$tdataVendor_Details[".OriginalTable"]="vendor_list";


	
//	field labels
$fieldLabelsVendor_Details = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsVendor_Details["English"]=array();
	$fieldToolTipsVendor_Details["English"]=array();
	$fieldLabelsVendor_Details["English"]["idvendor_list"] = "Idvendor List";
	$fieldToolTipsVendor_Details["English"]["idvendor_list"] = "";
	$fieldLabelsVendor_Details["English"]["Vendor_Name"] = "Vendor Name";
	$fieldToolTipsVendor_Details["English"]["Vendor Name"] = "";
	$fieldLabelsVendor_Details["English"]["Brief_About"] = "Brief About";
	$fieldToolTipsVendor_Details["English"]["Brief About"] = "";
	$fieldLabelsVendor_Details["English"]["Web_Address"] = "Web Address";
	$fieldToolTipsVendor_Details["English"]["Web Address"] = "";
	$fieldLabelsVendor_Details["English"]["Remarks"] = "Remarks";
	$fieldToolTipsVendor_Details["English"]["Remarks"] = "";
	if (count($fieldToolTipsVendor_Details["English"])){
		$tdataVendor_Details[".isUseToolTips"]=true;
	}
}


	
	$tdataVendor_Details[".NCSearch"]=true;

	

$tdataVendor_Details[".shortTableName"] = "Vendor_Details";
$tdataVendor_Details[".nSecOptions"] = 0;
$tdataVendor_Details[".recsPerRowList"] = 1;	
$tdataVendor_Details[".tableGroupBy"] = "0";
$tdataVendor_Details[".mainTableOwnerID"] = "";
$tdataVendor_Details[".moveNext"] = 1;




$tdataVendor_Details[".showAddInPopup"] = false;

$tdataVendor_Details[".showEditInPopup"] = false;

$tdataVendor_Details[".showViewInPopup"] = false;


$tdataVendor_Details[".fieldsForRegister"] = array();

$tdataVendor_Details[".listAjax"] = false;

	$tdataVendor_Details[".audit"] = false;

	$tdataVendor_Details[".locking"] = false;
	
$tdataVendor_Details[".listIcons"] = true;
$tdataVendor_Details[".edit"] = true;
$tdataVendor_Details[".view"] = true;




$tdataVendor_Details[".showSimpleSearchOptions"] = false;

$tdataVendor_Details[".showSearchPanel"] = true;


$tdataVendor_Details[".isUseAjaxSuggest"] = true;

$tdataVendor_Details[".rowHighlite"] = true;


// button handlers file names

$tdataVendor_Details[".addPageEvents"] = false;

$tdataVendor_Details[".arrKeyFields"][] = "idvendor_list";

// use datepicker for search panel
$tdataVendor_Details[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdataVendor_Details[".isUseTimeForSearch"] = false;

$tdataVendor_Details[".isUseiBox"] = false;




$tdataVendor_Details[".isUseInlineJs"] = $tdataVendor_Details[".isUseInlineAdd"] || $tdataVendor_Details[".isUseInlineEdit"];

$tdataVendor_Details[".allSearchFields"] = array();

$tdataVendor_Details[".globSearchFields"][] = "idvendor_list";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("idvendor_list", $tdataVendor_Details[".allSearchFields"]))
{
	$tdataVendor_Details[".allSearchFields"][] = "idvendor_list";	
}
$tdataVendor_Details[".globSearchFields"][] = "Vendor Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Vendor Name", $tdataVendor_Details[".allSearchFields"]))
{
	$tdataVendor_Details[".allSearchFields"][] = "Vendor Name";	
}
$tdataVendor_Details[".globSearchFields"][] = "Web Address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Web Address", $tdataVendor_Details[".allSearchFields"]))
{
	$tdataVendor_Details[".allSearchFields"][] = "Web Address";	
}
$tdataVendor_Details[".globSearchFields"][] = "Brief About";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Brief About", $tdataVendor_Details[".allSearchFields"]))
{
	$tdataVendor_Details[".allSearchFields"][] = "Brief About";	
}
$tdataVendor_Details[".globSearchFields"][] = "Remarks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Remarks", $tdataVendor_Details[".allSearchFields"]))
{
	$tdataVendor_Details[".allSearchFields"][] = "Remarks";	
}


$tdataVendor_Details[".googleLikeFields"][] = "idvendor_list";
$tdataVendor_Details[".googleLikeFields"][] = "Vendor Name";
$tdataVendor_Details[".googleLikeFields"][] = "Web Address";
$tdataVendor_Details[".googleLikeFields"][] = "Brief About";
$tdataVendor_Details[".googleLikeFields"][] = "Remarks";



$tdataVendor_Details[".advSearchFields"][] = "idvendor_list";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("idvendor_list", $tdataVendor_Details[".allSearchFields"])) 
{
	$tdataVendor_Details[".allSearchFields"][] = "idvendor_list";	
}
$tdataVendor_Details[".advSearchFields"][] = "Vendor Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Vendor Name", $tdataVendor_Details[".allSearchFields"])) 
{
	$tdataVendor_Details[".allSearchFields"][] = "Vendor Name";	
}
$tdataVendor_Details[".advSearchFields"][] = "Web Address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Web Address", $tdataVendor_Details[".allSearchFields"])) 
{
	$tdataVendor_Details[".allSearchFields"][] = "Web Address";	
}
$tdataVendor_Details[".advSearchFields"][] = "Brief About";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Brief About", $tdataVendor_Details[".allSearchFields"])) 
{
	$tdataVendor_Details[".allSearchFields"][] = "Brief About";	
}
$tdataVendor_Details[".advSearchFields"][] = "Remarks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Remarks", $tdataVendor_Details[".allSearchFields"])) 
{
	$tdataVendor_Details[".allSearchFields"][] = "Remarks";	
}

$tdataVendor_Details[".isTableType"] = "list";


	

$tdataVendor_Details[".isDisplayLoading"] = true;

$tdataVendor_Details[".isResizeColumns"] = false;

	$tdataVendor_Details[".subQueriesSupAccess"] = true;




$tdataVendor_Details[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataVendor_Details[".strOrderBy"] = $gstrOrderBy;
	
$tdataVendor_Details[".orderindexes"] = array();

$tdataVendor_Details[".sqlHead"] = "SELECT idvendor_list,  `Vendor Name`,  `Brief About`,  `Web Address`,  Remarks";
$tdataVendor_Details[".sqlFrom"] = "FROM vendor_list";
$tdataVendor_Details[".sqlWhereExpr"] = "";
$tdataVendor_Details[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdataVendor_Details[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdataVendor_Details[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "idvendor_list";
	$tdataVendor_Details[".Keys"] = $tableKeys;

//	idvendor_list
	$fdata = array();
	$fdata["strName"] = "idvendor_list";
	$fdata["ownerTable"] = "vendor_list";
		$fdata["Label"]="Idvendor List"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "idvendor_list";
	
		$fdata["FullName"]= "idvendor_list";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataVendor_Details["idvendor_list"]=$fdata;
//	Vendor Name
	$fdata = array();
	$fdata["strName"] = "Vendor Name";
	$fdata["ownerTable"] = "vendor_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Vendor_Name";
	
		$fdata["FullName"]= "`Vendor Name`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataVendor_Details["Vendor Name"]=$fdata;
//	Brief About
	$fdata = array();
	$fdata["strName"] = "Brief About";
	$fdata["ownerTable"] = "vendor_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Brief_About";
	
		$fdata["FullName"]= "`Brief About`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=150";
		$fdata["nRows"] = 150;
			$fdata["EditParams"].= " cols=750";
		$fdata["nCols"] = 750;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataVendor_Details["Brief About"]=$fdata;
//	Web Address
	$fdata = array();
	$fdata["strName"] = "Web Address";
	$fdata["ownerTable"] = "vendor_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Hyperlink";
	
		
		
		
		
		
	$fdata["GoodName"]= "Web_Address";
	
		$fdata["FullName"]= "`Web Address`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataVendor_Details["Web Address"]=$fdata;
//	Remarks
	$fdata = array();
	$fdata["strName"] = "Remarks";
	$fdata["ownerTable"] = "vendor_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Remarks";
	
		$fdata["FullName"]= "Remarks";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=150";
		$fdata["nRows"] = 150;
			$fdata["EditParams"].= " cols=750";
		$fdata["nCols"] = 750;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataVendor_Details["Remarks"]=$fdata;

	
$tables_data["Vendor Details"]=&$tdataVendor_Details;
$field_labels["Vendor_Details"] = &$fieldLabelsVendor_Details;
$fieldToolTips["Vendor Details"] = &$fieldToolTipsVendor_Details;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["Vendor Details"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="cust_list_contact_person";
	$detailsTablesData["Vendor Details"][$dIndex] = array(
		  "dDataSourceTable"=>"Contact Details"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"Contact_Details"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT idCLCP,  Name,  `Job Title`,  `Phone- Direct`,  `Phone Extn`,  Mobile,  `E-Mail`,  Notes,  `Company Name`"	
		, "sqlFrom"=>"FROM cust_list_contact_person"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["Vendor Details"][$dIndex]["masterKeys"][]="Vendor Name";
		$detailsTablesData["Vendor Details"][$dIndex]["detailKeys"][]="Company Name";

$dIndex = 2-1;
			$strOriginalDetailsTable="lead_table";
	$detailsTablesData["Vendor Details"][$dIndex] = array(
		  "dDataSourceTable"=>"Open Leads"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"Open_Leads"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT Leadid,  Region,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Employee Name`,  `Approx Closure Date`,  `Lead Status`,  `Requirement Details`,  `Approx Value`,  `First Quote Remarks`,  `Proposed Closure Date`,  `Projected Closure QTR`,  `Proposed Solution Details`,  `Quoted Price`,  `Final Quote Remarks`,  `Discussion Highlights`,  `WIN / Lost Analysis`,  `Alligned Vendor`"	
		, "sqlFrom"=>"FROM lead_table"	
		, "sqlWhere"=>"`Lead Status` ='Suspect' OR `Lead Status` ='prospect' OR `Lead Status` ='Review' OR `Lead Status` ='Hot' OR `Lead Status` ='Commit'"
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$detailsTablesData["Vendor Details"][$dIndex]["masterKeys"][]="Vendor Name";
		$detailsTablesData["Vendor Details"][$dIndex]["detailKeys"][]="Alligned Vendor";


	
// tables which are master tables for current table (detail)
$masterTablesData["Vendor Details"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto357=array();
$proto357["m_strHead"] = "SELECT";
$proto357["m_strFieldList"] = "idvendor_list,  `Vendor Name`,  `Brief About`,  `Web Address`,  Remarks";
$proto357["m_strFrom"] = "FROM vendor_list";
$proto357["m_strWhere"] = "";
$proto357["m_strOrderBy"] = "";
$proto357["m_strTail"] = "";
$proto358=array();
$proto358["m_sql"] = "";
$proto358["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto358["m_column"]=$obj;
$proto358["m_contained"] = array();
$proto358["m_strCase"] = "";
$proto358["m_havingmode"] = "0";
$proto358["m_inBrackets"] = "0";
$proto358["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto358);

$proto357["m_where"] = $obj;
$proto360=array();
$proto360["m_sql"] = "";
$proto360["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto360["m_column"]=$obj;
$proto360["m_contained"] = array();
$proto360["m_strCase"] = "";
$proto360["m_havingmode"] = "0";
$proto360["m_inBrackets"] = "0";
$proto360["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto360);

$proto357["m_having"] = $obj;
$proto357["m_fieldlist"] = array();
						$proto362=array();
			$obj = new SQLField(array(
	"m_strName" => "idvendor_list",
	"m_strTable" => "vendor_list"
));

$proto362["m_expr"]=$obj;
$proto362["m_alias"] = "";
$obj = new SQLFieldListItem($proto362);

$proto357["m_fieldlist"][]=$obj;
						$proto364=array();
			$obj = new SQLField(array(
	"m_strName" => "Vendor Name",
	"m_strTable" => "vendor_list"
));

$proto364["m_expr"]=$obj;
$proto364["m_alias"] = "";
$obj = new SQLFieldListItem($proto364);

$proto357["m_fieldlist"][]=$obj;
						$proto366=array();
			$obj = new SQLField(array(
	"m_strName" => "Brief About",
	"m_strTable" => "vendor_list"
));

$proto366["m_expr"]=$obj;
$proto366["m_alias"] = "";
$obj = new SQLFieldListItem($proto366);

$proto357["m_fieldlist"][]=$obj;
						$proto368=array();
			$obj = new SQLField(array(
	"m_strName" => "Web Address",
	"m_strTable" => "vendor_list"
));

$proto368["m_expr"]=$obj;
$proto368["m_alias"] = "";
$obj = new SQLFieldListItem($proto368);

$proto357["m_fieldlist"][]=$obj;
						$proto370=array();
			$obj = new SQLField(array(
	"m_strName" => "Remarks",
	"m_strTable" => "vendor_list"
));

$proto370["m_expr"]=$obj;
$proto370["m_alias"] = "";
$obj = new SQLFieldListItem($proto370);

$proto357["m_fieldlist"][]=$obj;
$proto357["m_fromlist"] = array();
												$proto372=array();
$proto372["m_link"] = "SQLL_MAIN";
			$proto373=array();
$proto373["m_strName"] = "vendor_list";
$proto373["m_columns"] = array();
$proto373["m_columns"][] = "idvendor_list";
$proto373["m_columns"][] = "Vendor Name";
$proto373["m_columns"][] = "Brief About";
$proto373["m_columns"][] = "Web Address";
$proto373["m_columns"][] = "Remarks";
$obj = new SQLTable($proto373);

$proto372["m_table"] = $obj;
$proto372["m_alias"] = "";
$proto374=array();
$proto374["m_sql"] = "";
$proto374["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto374["m_column"]=$obj;
$proto374["m_contained"] = array();
$proto374["m_strCase"] = "";
$proto374["m_havingmode"] = "0";
$proto374["m_inBrackets"] = "0";
$proto374["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto374);

$proto372["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto372);

$proto357["m_fromlist"][]=$obj;
$proto357["m_groupby"] = array();
$proto357["m_orderby"] = array();
$obj = new SQLQuery($proto357);

$queryData_Vendor_Details = $obj;
$tdataVendor_Details[".sqlquery"] = $queryData_Vendor_Details;

$tableEvents["Vendor Details"] = new eventsBase;

?>
