<?php
$tdataproduct_purchasing = array();
$tdataproduct_purchasing[".searchableFields"] = array();
$tdataproduct_purchasing[".ShortName"] = "product_purchasing";
$tdataproduct_purchasing[".OwnerID"] = "";
$tdataproduct_purchasing[".OriginalTable"] = "product";


$tdataproduct_purchasing[".pagesByType"] = my_json_decode( "{\"list\":[\"list\"],\"search\":[\"search\"]}" );
$tdataproduct_purchasing[".originalPagesByType"] = $tdataproduct_purchasing[".pagesByType"];
$tdataproduct_purchasing[".pages"] = types2pages( my_json_decode( "{\"list\":[\"list\"],\"search\":[\"search\"]}" ) );
$tdataproduct_purchasing[".originalPages"] = $tdataproduct_purchasing[".pages"];
$tdataproduct_purchasing[".defaultPages"] = my_json_decode( "{\"list\":\"list\",\"search\":\"search\"}" );
$tdataproduct_purchasing[".originalDefaultPages"] = $tdataproduct_purchasing[".defaultPages"];

//	field labels
$fieldLabelsproduct_purchasing = array();
$fieldToolTipsproduct_purchasing = array();
$pageTitlesproduct_purchasing = array();
$placeHoldersproduct_purchasing = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsproduct_purchasing["English"] = array();
	$fieldToolTipsproduct_purchasing["English"] = array();
	$placeHoldersproduct_purchasing["English"] = array();
	$pageTitlesproduct_purchasing["English"] = array();
	$fieldLabelsproduct_purchasing["English"]["id"] = "Id";
	$fieldToolTipsproduct_purchasing["English"]["id"] = "";
	$placeHoldersproduct_purchasing["English"]["id"] = "";
	$fieldLabelsproduct_purchasing["English"]["unit"] = "Unit";
	$fieldToolTipsproduct_purchasing["English"]["unit"] = "";
	$placeHoldersproduct_purchasing["English"]["unit"] = "";
	$fieldLabelsproduct_purchasing["English"]["hide"] = "Hide";
	$fieldToolTipsproduct_purchasing["English"]["hide"] = "";
	$placeHoldersproduct_purchasing["English"]["hide"] = "";
	$fieldLabelsproduct_purchasing["English"]["product"] = "Product";
	$fieldToolTipsproduct_purchasing["English"]["product"] = "";
	$placeHoldersproduct_purchasing["English"]["product"] = "";
	if (count($fieldToolTipsproduct_purchasing["English"]))
		$tdataproduct_purchasing[".isUseToolTips"] = true;
}


	$tdataproduct_purchasing[".NCSearch"] = true;



$tdataproduct_purchasing[".shortTableName"] = "product_purchasing";
$tdataproduct_purchasing[".nSecOptions"] = 0;

$tdataproduct_purchasing[".mainTableOwnerID"] = "";
$tdataproduct_purchasing[".entityType"] = 1;
$tdataproduct_purchasing[".connId"] = "test2_at_localhost";


$tdataproduct_purchasing[".strOriginalTableName"] = "product";

	



$tdataproduct_purchasing[".showAddInPopup"] = false;

$tdataproduct_purchasing[".showEditInPopup"] = false;

$tdataproduct_purchasing[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdataproduct_purchasing[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


$tdataproduct_purchasing[".listAjax"] = false;
//	temporary
$tdataproduct_purchasing[".listAjax"] = false;

	$tdataproduct_purchasing[".audit"] = true;

	$tdataproduct_purchasing[".locking"] = false;


$pages = $tdataproduct_purchasing[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdataproduct_purchasing[".edit"] = true;
	$tdataproduct_purchasing[".afterEditAction"] = 1;
	$tdataproduct_purchasing[".closePopupAfterEdit"] = 1;
	$tdataproduct_purchasing[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdataproduct_purchasing[".add"] = true;
$tdataproduct_purchasing[".afterAddAction"] = 1;
$tdataproduct_purchasing[".closePopupAfterAdd"] = 1;
$tdataproduct_purchasing[".afterAddActionDetTable"] = "";
}

if( $pages[PAGE_LIST] ) {
	$tdataproduct_purchasing[".list"] = true;
}



$tdataproduct_purchasing[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdataproduct_purchasing[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdataproduct_purchasing[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdataproduct_purchasing[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdataproduct_purchasing[".printFriendly"] = true;
}



$tdataproduct_purchasing[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdataproduct_purchasing[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdataproduct_purchasing[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdataproduct_purchasing[".isUseAjaxSuggest"] = true;

$tdataproduct_purchasing[".rowHighlite"] = true;



																																																			

$tdataproduct_purchasing[".ajaxCodeSnippetAdded"] = false;

$tdataproduct_purchasing[".buttonsAdded"] = false;

$tdataproduct_purchasing[".addPageEvents"] = false;

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


$tdataproduct_purchasing[".badgeColor"] = "1E90FF";


$tdataproduct_purchasing[".allSearchFields"] = array();
$tdataproduct_purchasing[".filterFields"] = array();
$tdataproduct_purchasing[".requiredSearchFields"] = array();

$tdataproduct_purchasing[".googleLikeFields"] = array();
$tdataproduct_purchasing[".googleLikeFields"][] = "id";
$tdataproduct_purchasing[".googleLikeFields"][] = "product";
$tdataproduct_purchasing[".googleLikeFields"][] = "unit";
$tdataproduct_purchasing[".googleLikeFields"][] = "hide";



$tdataproduct_purchasing[".tableType"] = "list";

$tdataproduct_purchasing[".printerPageOrientation"] = 0;
$tdataproduct_purchasing[".nPrinterPageScale"] = 100;

$tdataproduct_purchasing[".nPrinterSplitRecords"] = 40;

$tdataproduct_purchasing[".geocodingEnabled"] = false;










$tdataproduct_purchasing[".pageSize"] = 20;

$tdataproduct_purchasing[".warnLeavingPages"] = true;



$tstrOrderBy = "";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdataproduct_purchasing[".strOrderBy"] = $tstrOrderBy;

$tdataproduct_purchasing[".orderindexes"] = array();


$tdataproduct_purchasing[".sqlHead"] = "SELECT id,  CONCAT( bar_code,\"-\",  product_name) AS product ,  unit,  hide";
$tdataproduct_purchasing[".sqlFrom"] = "FROM product";
$tdataproduct_purchasing[".sqlWhereExpr"] = "";
$tdataproduct_purchasing[".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;
$tdataproduct_purchasing[".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;
$tdataproduct_purchasing[".arrGroupsPerPage"] = $arrGPP;

$tdataproduct_purchasing[".highlightSearchResults"] = true;

$tableKeysproduct_purchasing = array();
$tableKeysproduct_purchasing[] = "id";
$tdataproduct_purchasing[".Keys"] = $tableKeysproduct_purchasing;


$tdataproduct_purchasing[".hideMobileList"] = array();




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "product";
	$fdata["Label"] = GetFieldLabel("product_purchasing","id");
	$fdata["FieldType"] = 3;

	
		$fdata["AutoInc"] = true;

	
			

		$fdata["strField"] = "id";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "id";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataproduct_purchasing["id"] = $fdata;
		$tdataproduct_purchasing[".searchableFields"][] = "id";
//	product
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "product";
	$fdata["GoodName"] = "product";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("product_purchasing","product");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "product";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT( bar_code,\"-\",  product_name)";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataproduct_purchasing["product"] = $fdata;
		$tdataproduct_purchasing[".searchableFields"][] = "product";
//	unit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "unit";
	$fdata["GoodName"] = "unit";
	$fdata["ownerTable"] = "product";
	$fdata["Label"] = GetFieldLabel("product_purchasing","unit");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "unit";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "unit";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataproduct_purchasing["unit"] = $fdata;
		$tdataproduct_purchasing[".searchableFields"][] = "unit";
//	hide
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "hide";
	$fdata["GoodName"] = "hide";
	$fdata["ownerTable"] = "product";
	$fdata["Label"] = GetFieldLabel("product_purchasing","hide");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "hide";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "hide";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataproduct_purchasing["hide"] = $fdata;
		$tdataproduct_purchasing[".searchableFields"][] = "hide";


$tables_data["product_purchasing"]=&$tdataproduct_purchasing;
$field_labels["product_purchasing"] = &$fieldLabelsproduct_purchasing;
$fieldToolTips["product_purchasing"] = &$fieldToolTipsproduct_purchasing;
$placeHolders["product_purchasing"] = &$placeHoldersproduct_purchasing;
$page_titles["product_purchasing"] = &$pageTitlesproduct_purchasing;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["product_purchasing"] = array();

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



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



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











function createSqlQuery_product_purchasing()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  CONCAT( bar_code,\"-\",  product_name) AS product ,  unit,  hide";
$proto0["m_strFrom"] = "FROM product";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "product",
	"m_srcTableName" => "product_purchasing"
));

$proto6["m_sql"] = "id";
$proto6["m_srcTableName"] = "product_purchasing";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$proto9=array();
$proto9["m_functiontype"] = "SQLF_CUSTOM";
$proto9["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "bar_code"
));

$proto9["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "\"-\""
));

$proto9["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "product_name"
));

$proto9["m_arguments"][]=$obj;
$proto9["m_strFunctionName"] = "CONCAT";
$obj = new SQLFunctionCall($proto9);

$proto8["m_sql"] = "CONCAT( bar_code,\"-\",  product_name)";
$proto8["m_srcTableName"] = "product_purchasing";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "product";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "unit",
	"m_strTable" => "product",
	"m_srcTableName" => "product_purchasing"
));

$proto13["m_sql"] = "unit";
$proto13["m_srcTableName"] = "product_purchasing";
$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "hide",
	"m_strTable" => "product",
	"m_srcTableName" => "product_purchasing"
));

$proto15["m_sql"] = "hide";
$proto15["m_srcTableName"] = "product_purchasing";
$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto17=array();
$proto17["m_link"] = "SQLL_MAIN";
			$proto18=array();
$proto18["m_strName"] = "product";
$proto18["m_srcTableName"] = "product_purchasing";
$proto18["m_columns"] = array();
$proto18["m_columns"][] = "id";
$proto18["m_columns"][] = "bar_code";
$proto18["m_columns"][] = "product_name";
$proto18["m_columns"][] = "price";
$proto18["m_columns"][] = "discount";
$proto18["m_columns"][] = "category";
$proto18["m_columns"][] = "cost";
$proto18["m_columns"][] = "unit";
$proto18["m_columns"][] = "reorder_level";
$proto18["m_columns"][] = "brand";
$proto18["m_columns"][] = "image";
$proto18["m_columns"][] = "tax";
$proto18["m_columns"][] = "hide";
$proto18["m_columns"][] = "branch_code";
$obj = new SQLTable($proto18);

$proto17["m_table"] = $obj;
$proto17["m_sql"] = "product";
$proto17["m_alias"] = "";
$proto17["m_srcTableName"] = "product_purchasing";
$proto19=array();
$proto19["m_sql"] = "";
$proto19["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$proto0["m_srcTableName"]="product_purchasing";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_product_purchasing = createSqlQuery_product_purchasing();


	
		;

				

$tdataproduct_purchasing[".sqlquery"] = $queryData_product_purchasing;



$tableEvents["product_purchasing"] = new eventsBase;
$tdataproduct_purchasing[".hasEvents"] = false;

?>