<?php



$tdataw_cotacao_pdto = array();
$tdataw_cotacao_pdto[".searchableFields"] = array();
$tdataw_cotacao_pdto[".ShortName"] = "w_cotacao_pdto";
$tdataw_cotacao_pdto[".OwnerID"] = "";
$tdataw_cotacao_pdto[".OriginalTable"] = "tb_produtos";


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

//	field labels
$fieldLabelsw_cotacao_pdto = array();
$fieldToolTipsw_cotacao_pdto = array();
$pageTitlesw_cotacao_pdto = array();
$placeHoldersw_cotacao_pdto = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"] = array();
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"] = array();
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"] = array();
	$pageTitlesw_cotacao_pdto["Portuguese(Brazil)"] = array();
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["pdtoiD"] = "Pdtoi D";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["pdtoiD"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["pdtoiD"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["clienteID"] = "Cliente ID";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["clienteID"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["clienteID"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["referencia"] = "Referencia";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["referencia"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["referencia"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["nome_aux"] = "Nome Aux";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["nome_aux"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["nome_aux"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["status"] = "Status";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["status"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["status"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["foto"] = "Foto";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["foto"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["foto"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["ficha_tec"] = "Ficha Tec";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["ficha_tec"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["ficha_tec"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["data"] = "Data";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["data"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["data"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["versao"] = "Versao";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["versao"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["versao"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["PVenda"] = "PVenda";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["PVenda"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["PVenda"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["CBruto"] = "CBruto";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["CBruto"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["CBruto"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["foto1"] = "Foto1";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["foto1"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["foto1"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["status1"] = "Status1";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["status1"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["status1"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["categoria1"] = "Categoria1";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["categoria1"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["categoria1"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["componente"] = "Componente";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["componente"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["componente"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["material"] = "Material";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["material"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["material"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["cliente"] = "Cliente";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["cliente"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["cliente"] = "";
	$fieldLabelsw_cotacao_pdto["Portuguese(Brazil)"]["empresa"] = "Empresa";
	$fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]["empresa"] = "";
	$placeHoldersw_cotacao_pdto["Portuguese(Brazil)"]["empresa"] = "";
	if (count($fieldToolTipsw_cotacao_pdto["Portuguese(Brazil)"]))
		$tdataw_cotacao_pdto[".isUseToolTips"] = true;
}


	$tdataw_cotacao_pdto[".NCSearch"] = true;


	$tdataw_cotacao_pdto[".scrollGridBody"] = true;

$tdataw_cotacao_pdto[".shortTableName"] = "w_cotacao_pdto";
$tdataw_cotacao_pdto[".nSecOptions"] = 0;

$tdataw_cotacao_pdto[".mainTableOwnerID"] = "";
$tdataw_cotacao_pdto[".entityType"] = 1;

$tdataw_cotacao_pdto[".strOriginalTableName"] = "tb_produtos";

	



$tdataw_cotacao_pdto[".showAddInPopup"] = false;

$tdataw_cotacao_pdto[".showEditInPopup"] = false;

$tdataw_cotacao_pdto[".showViewInPopup"] = false;

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


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

	$tdataw_cotacao_pdto[".audit"] = false;

	$tdataw_cotacao_pdto[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataw_cotacao_pdto[".isUseAjaxSuggest"] = true;

$tdataw_cotacao_pdto[".rowHighlite"] = true;





$tdataw_cotacao_pdto[".ajaxCodeSnippetAdded"] = false;

$tdataw_cotacao_pdto[".buttonsAdded"] = false;

$tdataw_cotacao_pdto[".addPageEvents"] = false;

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


$tdataw_cotacao_pdto[".badgeColor"] = "9ACD32";


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

$tdataw_cotacao_pdto[".googleLikeFields"] = array();
$tdataw_cotacao_pdto[".googleLikeFields"][] = "pdtoiD";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "clienteID";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "referencia";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "nome_aux";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "status";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "foto";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "ficha_tec";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "data";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "versao";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "PVenda";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "CBruto";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "foto1";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "status1";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "categoria1";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "componente";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "material";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "cliente";
$tdataw_cotacao_pdto[".googleLikeFields"][] = "empresa";



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

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

$tdataw_cotacao_pdto[".nPrinterSplitRecords"] = 40;

$tdataw_cotacao_pdto[".geocodingEnabled"] = false;










$tdataw_cotacao_pdto[".pageSize"] = 20;

$tdataw_cotacao_pdto[".warnLeavingPages"] = true;



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

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

$tdataw_cotacao_pdto[".sqlHead"] = "SELECT tb_produtos.pdtoiD,  tb_produtos.clienteID,  tb_produtos.referencia,  tb_produtos.nome_aux,  tb_produtos.status,  tb_produtos.foto,  tb_produtos.ficha_tec,  dbw_calcpdto.`data`,  dbw_calcpdto.versao,  dbw_calcpdto.PVenda,  dbw_calcpdto.CBruto,  dbw_calcpdto.foto AS foto1,  dbw_calcpdto.status AS status1,  tb_categpdtos.categoria AS categoria1,  tb_componentes.componente,  tb_materiais.material,  tb_clientes.cliente,  tb_clientes.empresa";
$tdataw_cotacao_pdto[".sqlFrom"] = "FROM tb_produtos  INNER JOIN dbw_calcpdto ON tb_produtos.pdtoiD = dbw_calcpdto.pdtoID  INNER JOIN tb_categpdtos ON tb_produtos.categoria = tb_categpdtos.categpdtoID  INNER JOIN tb_componentes ON dbw_calcpdto.componente = tb_componentes.componenteID  INNER JOIN tb_materiais ON dbw_calcpdto.material = tb_materiais.materialID  INNER JOIN tb_clientes ON tb_produtos.clienteID = tb_clientes.clienteID";
$tdataw_cotacao_pdto[".sqlWhereExpr"] = "";
$tdataw_cotacao_pdto[".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;
$tdataw_cotacao_pdto[".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;
$tdataw_cotacao_pdto[".arrGroupsPerPage"] = $arrGPP;

$tdataw_cotacao_pdto[".highlightSearchResults"] = true;

$tableKeysw_cotacao_pdto = array();
$tableKeysw_cotacao_pdto[] = "pdtoiD";
$tdataw_cotacao_pdto[".Keys"] = $tableKeysw_cotacao_pdto;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.pdtoiD";

	
	
				$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


	$tdataw_cotacao_pdto["pdtoiD"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "pdtoiD";
//	clienteID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "clienteID";
	$fdata["GoodName"] = "clienteID";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","clienteID");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.clienteID";

	
	
				$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();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
	//	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


	$tdataw_cotacao_pdto["clienteID"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "clienteID";
//	referencia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "referencia";
	$fdata["GoodName"] = "referencia";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","referencia");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.referencia";

	
	
				$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


	$tdataw_cotacao_pdto["referencia"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "referencia";
//	nome_aux
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "nome_aux";
	$fdata["GoodName"] = "nome_aux";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","nome_aux");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.nome_aux";

	
	
				$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


	$tdataw_cotacao_pdto["nome_aux"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "nome_aux";
//	status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "status";
	$fdata["GoodName"] = "status";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","status");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.status";

	
	
				$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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
		$edata["LookupType"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Prototipo";
	$edata["LookupValues"][] = "Amostra";
	$edata["LookupValues"][] = "Teste Produção";
	$edata["LookupValues"][] = "Aprovado";
	$edata["LookupValues"][] = "Cancelado";
	$edata["LookupValues"][] = "Fora de Linha";
	$edata["LookupValues"][] = "Indefinido";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_cotacao_pdto["status"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "status";
//	foto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "foto";
	$fdata["GoodName"] = "foto";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","foto");
	$fdata["FieldType"] = 201;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.foto";

	
	
				$fdata["UploadFolder"] = "uploads\\foto_pdto";

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

	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ShowThumbnail"] = true;
	$vdata["ThumbWidth"] = 72;
	$vdata["ThumbHeight"] = 72;
	$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 3;
	$vdata["maxImages"] = 0;

			$vdata["showGallery"] = true;
	$vdata["galleryMode"] = 2;
	$vdata["captionMode"] = 2;
	$vdata["captionField"] = "";

	$vdata["imageBorder"] = 1;
	$vdata["imageFullWidth"] = 1;


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

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

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

	$edata = array("EditFormat" => "Document upload");

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


	
	



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

		$edata["maxNumberOfFiles"] = 0;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

		$edata["CreateThumbnail"] = true;
	$edata["StrThumbnail"] = "th";
			$edata["ThumbnailSize"] = 600;

			
	
	
	
	$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


	$tdataw_cotacao_pdto["foto"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "foto";
//	ficha_tec
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "ficha_tec";
	$fdata["GoodName"] = "ficha_tec";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","ficha_tec");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.ficha_tec";

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

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

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

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

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

	$edata = array("EditFormat" => "Document upload");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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


	$tdataw_cotacao_pdto["ficha_tec"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "ficha_tec";
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","data");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.`data`";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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" => "Date");

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 13;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// the default search options list
				$fdata["searchOptionsList"] = array("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, 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


	$tdataw_cotacao_pdto["data"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "data";
//	versao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "versao";
	$fdata["GoodName"] = "versao";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","versao");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.versao";

	
	
				$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


	$tdataw_cotacao_pdto["versao"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "versao";
//	PVenda
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "PVenda";
	$fdata["GoodName"] = "PVenda";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","PVenda");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.PVenda";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$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


	$tdataw_cotacao_pdto["PVenda"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "PVenda";
//	CBruto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "CBruto";
	$fdata["GoodName"] = "CBruto";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","CBruto");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.CBruto";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$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


	$tdataw_cotacao_pdto["CBruto"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "CBruto";
//	foto1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "foto1";
	$fdata["GoodName"] = "foto1";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","foto1");
	$fdata["FieldType"] = 201;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.foto";

	
	
				$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 area");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
				$edata["nRows"] = 100;
			$edata["nCols"] = 200;

	
	
		$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


	$tdataw_cotacao_pdto["foto1"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "foto1";
//	status1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "status1";
	$fdata["GoodName"] = "status1";
	$fdata["ownerTable"] = "dbw_calcpdto";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","status1");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_calcpdto.status";

	
	
				$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


	$tdataw_cotacao_pdto["status1"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "status1";
//	categoria1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "categoria1";
	$fdata["GoodName"] = "categoria1";
	$fdata["ownerTable"] = "tb_categpdtos";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","categoria1");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_categpdtos.categoria";

	
	
				$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


	$tdataw_cotacao_pdto["categoria1"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "categoria1";
//	componente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "componente";
	$fdata["GoodName"] = "componente";
	$fdata["ownerTable"] = "tb_componentes";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","componente");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_componentes.componente";

	
	
				$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


	$tdataw_cotacao_pdto["componente"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "componente";
//	material
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "material";
	$fdata["GoodName"] = "material";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","material");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_materiais.material";

	
	
				$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


	$tdataw_cotacao_pdto["material"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "material";
//	cliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "cliente";
	$fdata["GoodName"] = "cliente";
	$fdata["ownerTable"] = "tb_clientes";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","cliente");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_clientes.cliente";

	
	
				$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


	$tdataw_cotacao_pdto["cliente"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "cliente";
//	empresa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "empresa";
	$fdata["GoodName"] = "empresa";
	$fdata["ownerTable"] = "tb_clientes";
	$fdata["Label"] = GetFieldLabel("w_cotacao_pdto","empresa");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_clientes.empresa";

	
	
				$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


	$tdataw_cotacao_pdto["empresa"] = $fdata;
		$tdataw_cotacao_pdto[".searchableFields"][] = "empresa";


$tables_data["w_cotacao_pdto"]=&$tdataw_cotacao_pdto;
$field_labels["w_cotacao_pdto"] = &$fieldLabelsw_cotacao_pdto;
$fieldToolTips["w_cotacao_pdto"] = &$fieldToolTipsw_cotacao_pdto;
$placeHolders["w_cotacao_pdto"] = &$placeHoldersw_cotacao_pdto;
$page_titles["w_cotacao_pdto"] = &$pageTitlesw_cotacao_pdto;

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

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



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


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










function createSqlQuery_w_cotacao_pdto()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "tb_produtos.pdtoiD,  tb_produtos.clienteID,  tb_produtos.referencia,  tb_produtos.nome_aux,  tb_produtos.status,  tb_produtos.foto,  tb_produtos.ficha_tec,  dbw_calcpdto.`data`,  dbw_calcpdto.versao,  dbw_calcpdto.PVenda,  dbw_calcpdto.CBruto,  dbw_calcpdto.foto AS foto1,  dbw_calcpdto.status AS status1,  tb_categpdtos.categoria AS categoria1,  tb_componentes.componente,  tb_materiais.material,  tb_clientes.cliente,  tb_clientes.empresa";
$proto0["m_strFrom"] = "FROM tb_produtos  INNER JOIN dbw_calcpdto ON tb_produtos.pdtoiD = dbw_calcpdto.pdtoID  INNER JOIN tb_categpdtos ON tb_produtos.categoria = tb_categpdtos.categpdtoID  INNER JOIN tb_componentes ON dbw_calcpdto.componente = tb_componentes.componenteID  INNER JOIN tb_materiais ON dbw_calcpdto.material = tb_materiais.materialID  INNER JOIN tb_clientes ON tb_produtos.clienteID = tb_clientes.clienteID";
$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" => "pdtoiD",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto6["m_sql"] = "tb_produtos.pdtoiD";
$proto6["m_srcTableName"] = "w_cotacao_pdto";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "clienteID",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto8["m_sql"] = "tb_produtos.clienteID";
$proto8["m_srcTableName"] = "w_cotacao_pdto";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "referencia",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto10["m_sql"] = "tb_produtos.referencia";
$proto10["m_srcTableName"] = "w_cotacao_pdto";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "nome_aux",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto12["m_sql"] = "tb_produtos.nome_aux";
$proto12["m_srcTableName"] = "w_cotacao_pdto";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto14["m_sql"] = "tb_produtos.status";
$proto14["m_srcTableName"] = "w_cotacao_pdto";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "foto",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto16["m_sql"] = "tb_produtos.foto";
$proto16["m_srcTableName"] = "w_cotacao_pdto";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "ficha_tec",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto18["m_sql"] = "tb_produtos.ficha_tec";
$proto18["m_srcTableName"] = "w_cotacao_pdto";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "data",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto20["m_sql"] = "dbw_calcpdto.`data`";
$proto20["m_srcTableName"] = "w_cotacao_pdto";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "versao",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto22["m_sql"] = "dbw_calcpdto.versao";
$proto22["m_srcTableName"] = "w_cotacao_pdto";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "PVenda",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto24["m_sql"] = "dbw_calcpdto.PVenda";
$proto24["m_srcTableName"] = "w_cotacao_pdto";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "CBruto",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto26["m_sql"] = "dbw_calcpdto.CBruto";
$proto26["m_srcTableName"] = "w_cotacao_pdto";
$proto26["m_expr"]=$obj;
$proto26["m_alias"] = "";
$obj = new SQLFieldListItem($proto26);

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "foto",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto28["m_sql"] = "dbw_calcpdto.foto";
$proto28["m_srcTableName"] = "w_cotacao_pdto";
$proto28["m_expr"]=$obj;
$proto28["m_alias"] = "foto1";
$obj = new SQLFieldListItem($proto28);

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto30["m_sql"] = "dbw_calcpdto.status";
$proto30["m_srcTableName"] = "w_cotacao_pdto";
$proto30["m_expr"]=$obj;
$proto30["m_alias"] = "status1";
$obj = new SQLFieldListItem($proto30);

$proto0["m_fieldlist"][]=$obj;
						$proto32=array();
			$obj = new SQLField(array(
	"m_strName" => "categoria",
	"m_strTable" => "tb_categpdtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto32["m_sql"] = "tb_categpdtos.categoria";
$proto32["m_srcTableName"] = "w_cotacao_pdto";
$proto32["m_expr"]=$obj;
$proto32["m_alias"] = "categoria1";
$obj = new SQLFieldListItem($proto32);

$proto0["m_fieldlist"][]=$obj;
						$proto34=array();
			$obj = new SQLField(array(
	"m_strName" => "componente",
	"m_strTable" => "tb_componentes",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto34["m_sql"] = "tb_componentes.componente";
$proto34["m_srcTableName"] = "w_cotacao_pdto";
$proto34["m_expr"]=$obj;
$proto34["m_alias"] = "";
$obj = new SQLFieldListItem($proto34);

$proto0["m_fieldlist"][]=$obj;
						$proto36=array();
			$obj = new SQLField(array(
	"m_strName" => "material",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto36["m_sql"] = "tb_materiais.material";
$proto36["m_srcTableName"] = "w_cotacao_pdto";
$proto36["m_expr"]=$obj;
$proto36["m_alias"] = "";
$obj = new SQLFieldListItem($proto36);

$proto0["m_fieldlist"][]=$obj;
						$proto38=array();
			$obj = new SQLField(array(
	"m_strName" => "cliente",
	"m_strTable" => "tb_clientes",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto38["m_sql"] = "tb_clientes.cliente";
$proto38["m_srcTableName"] = "w_cotacao_pdto";
$proto38["m_expr"]=$obj;
$proto38["m_alias"] = "";
$obj = new SQLFieldListItem($proto38);

$proto0["m_fieldlist"][]=$obj;
						$proto40=array();
			$obj = new SQLField(array(
	"m_strName" => "empresa",
	"m_strTable" => "tb_clientes",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto40["m_sql"] = "tb_clientes.empresa";
$proto40["m_srcTableName"] = "w_cotacao_pdto";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "";
$obj = new SQLFieldListItem($proto40);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto42=array();
$proto42["m_link"] = "SQLL_MAIN";
			$proto43=array();
$proto43["m_strName"] = "tb_produtos";
$proto43["m_srcTableName"] = "w_cotacao_pdto";
$proto43["m_columns"] = array();
$proto43["m_columns"][] = "pdtoiD";
$proto43["m_columns"][] = "clienteID";
$proto43["m_columns"][] = "referencia";
$proto43["m_columns"][] = "nome_aux";
$proto43["m_columns"][] = "categoria";
$proto43["m_columns"][] = "status";
$proto43["m_columns"][] = "foto";
$proto43["m_columns"][] = "ficha_tec";
$obj = new SQLTable($proto43);

$proto42["m_table"] = $obj;
$proto42["m_sql"] = "tb_produtos";
$proto42["m_alias"] = "";
$proto42["m_srcTableName"] = "w_cotacao_pdto";
$proto44=array();
$proto44["m_sql"] = "";
$proto44["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto46=array();
$proto46["m_link"] = "SQLL_INNERJOIN";
			$proto47=array();
$proto47["m_strName"] = "dbw_calcpdto";
$proto47["m_srcTableName"] = "w_cotacao_pdto";
$proto47["m_columns"] = array();
$proto47["m_columns"][] = "mcalcID";
$proto47["m_columns"][] = "pdtoID";
$proto47["m_columns"][] = "data";
$proto47["m_columns"][] = "versao";
$proto47["m_columns"][] = "componente";
$proto47["m_columns"][] = "material";
$proto47["m_columns"][] = "consumo";
$proto47["m_columns"][] = "quebra";
$proto47["m_columns"][] = "tempo";
$proto47["m_columns"][] = "txo";
$proto47["m_columns"][] = "divisao";
$proto47["m_columns"][] = "CMO";
$proto47["m_columns"][] = "CMat";
$proto47["m_columns"][] = "vigente";
$proto47["m_columns"][] = "GGF";
$proto47["m_columns"][] = "markup";
$proto47["m_columns"][] = "Mlucro";
$proto47["m_columns"][] = "MKP";
$proto47["m_columns"][] = "CBruto";
$proto47["m_columns"][] = "PVenda";
$proto47["m_columns"][] = "referencia";
$proto47["m_columns"][] = "nome_aux";
$proto47["m_columns"][] = "categoria";
$proto47["m_columns"][] = "status";
$proto47["m_columns"][] = "foto";
$proto47["m_columns"][] = "pdtoiD1";
$obj = new SQLTable($proto47);

$proto46["m_table"] = $obj;
$proto46["m_sql"] = "INNER JOIN dbw_calcpdto ON tb_produtos.pdtoiD = dbw_calcpdto.pdtoID";
$proto46["m_alias"] = "";
$proto46["m_srcTableName"] = "w_cotacao_pdto";
$proto48=array();
$proto48["m_sql"] = "tb_produtos.pdtoiD = dbw_calcpdto.pdtoID";
$proto48["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "pdtoiD",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto48["m_column"]=$obj;
$proto48["m_contained"] = array();
$proto48["m_strCase"] = "= dbw_calcpdto.pdtoID";
$proto48["m_havingmode"] = false;
$proto48["m_inBrackets"] = false;
$proto48["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto48);

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

$proto0["m_fromlist"][]=$obj;
												$proto50=array();
$proto50["m_link"] = "SQLL_INNERJOIN";
			$proto51=array();
$proto51["m_strName"] = "tb_categpdtos";
$proto51["m_srcTableName"] = "w_cotacao_pdto";
$proto51["m_columns"] = array();
$proto51["m_columns"][] = "categpdtoID";
$proto51["m_columns"][] = "categoria";
$proto51["m_columns"][] = "ativar";
$obj = new SQLTable($proto51);

$proto50["m_table"] = $obj;
$proto50["m_sql"] = "INNER JOIN tb_categpdtos ON tb_produtos.categoria = tb_categpdtos.categpdtoID";
$proto50["m_alias"] = "";
$proto50["m_srcTableName"] = "w_cotacao_pdto";
$proto52=array();
$proto52["m_sql"] = "tb_produtos.categoria = tb_categpdtos.categpdtoID";
$proto52["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "categoria",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto52["m_column"]=$obj;
$proto52["m_contained"] = array();
$proto52["m_strCase"] = "= tb_categpdtos.categpdtoID";
$proto52["m_havingmode"] = false;
$proto52["m_inBrackets"] = false;
$proto52["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto52);

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

$proto0["m_fromlist"][]=$obj;
												$proto54=array();
$proto54["m_link"] = "SQLL_INNERJOIN";
			$proto55=array();
$proto55["m_strName"] = "tb_componentes";
$proto55["m_srcTableName"] = "w_cotacao_pdto";
$proto55["m_columns"] = array();
$proto55["m_columns"][] = "componenteID";
$proto55["m_columns"][] = "componente";
$proto55["m_columns"][] = "material";
$proto55["m_columns"][] = "metrica";
$proto55["m_columns"][] = "ativar";
$obj = new SQLTable($proto55);

$proto54["m_table"] = $obj;
$proto54["m_sql"] = "INNER JOIN tb_componentes ON dbw_calcpdto.componente = tb_componentes.componenteID";
$proto54["m_alias"] = "";
$proto54["m_srcTableName"] = "w_cotacao_pdto";
$proto56=array();
$proto56["m_sql"] = "dbw_calcpdto.componente = tb_componentes.componenteID";
$proto56["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "componente",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto56["m_column"]=$obj;
$proto56["m_contained"] = array();
$proto56["m_strCase"] = "= tb_componentes.componenteID";
$proto56["m_havingmode"] = false;
$proto56["m_inBrackets"] = false;
$proto56["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto56);

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

$proto0["m_fromlist"][]=$obj;
												$proto58=array();
$proto58["m_link"] = "SQLL_INNERJOIN";
			$proto59=array();
$proto59["m_strName"] = "tb_materiais";
$proto59["m_srcTableName"] = "w_cotacao_pdto";
$proto59["m_columns"] = array();
$proto59["m_columns"][] = "materialID";
$proto59["m_columns"][] = "material";
$proto59["m_columns"][] = "fornecedor";
$proto59["m_columns"][] = "metrica";
$proto59["m_columns"][] = "ativar";
$obj = new SQLTable($proto59);

$proto58["m_table"] = $obj;
$proto58["m_sql"] = "INNER JOIN tb_materiais ON dbw_calcpdto.material = tb_materiais.materialID";
$proto58["m_alias"] = "";
$proto58["m_srcTableName"] = "w_cotacao_pdto";
$proto60=array();
$proto60["m_sql"] = "dbw_calcpdto.material = tb_materiais.materialID";
$proto60["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "material",
	"m_strTable" => "dbw_calcpdto",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto60["m_column"]=$obj;
$proto60["m_contained"] = array();
$proto60["m_strCase"] = "= tb_materiais.materialID";
$proto60["m_havingmode"] = false;
$proto60["m_inBrackets"] = false;
$proto60["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto60);

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

$proto0["m_fromlist"][]=$obj;
												$proto62=array();
$proto62["m_link"] = "SQLL_INNERJOIN";
			$proto63=array();
$proto63["m_strName"] = "tb_clientes";
$proto63["m_srcTableName"] = "w_cotacao_pdto";
$proto63["m_columns"] = array();
$proto63["m_columns"][] = "clienteID";
$proto63["m_columns"][] = "cliente";
$proto63["m_columns"][] = "empresa";
$proto63["m_columns"][] = "data_cadastro";
$proto63["m_columns"][] = "whats";
$proto63["m_columns"][] = "email";
$proto63["m_columns"][] = "ativar";
$obj = new SQLTable($proto63);

$proto62["m_table"] = $obj;
$proto62["m_sql"] = "INNER JOIN tb_clientes ON tb_produtos.clienteID = tb_clientes.clienteID";
$proto62["m_alias"] = "";
$proto62["m_srcTableName"] = "w_cotacao_pdto";
$proto64=array();
$proto64["m_sql"] = "tb_produtos.clienteID = tb_clientes.clienteID";
$proto64["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "clienteID",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "w_cotacao_pdto"
));

$proto64["m_column"]=$obj;
$proto64["m_contained"] = array();
$proto64["m_strCase"] = "= tb_clientes.clienteID";
$proto64["m_havingmode"] = false;
$proto64["m_inBrackets"] = false;
$proto64["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto64);

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

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

	return $obj;
}
$queryData_w_cotacao_pdto = createSqlQuery_w_cotacao_pdto();


	
		;

																		

$tdataw_cotacao_pdto[".sqlquery"] = $queryData_w_cotacao_pdto;

$tableEvents["w_cotacao_pdto"] = new eventsBase;
$tdataw_cotacao_pdto[".hasEvents"] = false;

?>