<?php



$tdatadbw_precocalc = array();
$tdatadbw_precocalc[".searchableFields"] = array();
$tdatadbw_precocalc[".ShortName"] = "dbw_precocalc";
$tdatadbw_precocalc[".OwnerID"] = "";
$tdatadbw_precocalc[".OriginalTable"] = "tb_mcalculo";


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

//	field labels
$fieldLabelsdbw_precocalc = array();
$fieldToolTipsdbw_precocalc = array();
$pageTitlesdbw_precocalc = array();
$placeHoldersdbw_precocalc = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"] = array();
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"] = array();
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"] = array();
	$pageTitlesdbw_precocalc["Portuguese(Brazil)"] = array();
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["mcalcID"] = "Mcalc ID";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["mcalcID"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["mcalcID"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["pdtoID"] = "Pdto ID";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["pdtoID"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["pdtoID"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["data"] = "Data";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["data"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["data"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["versao"] = "Versao";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["versao"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["versao"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["componente"] = "Componente";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["componente"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["componente"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["material"] = "Material";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["material"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["material"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["consumo"] = "Consumo";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["consumo"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["consumo"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["quebra"] = "Quebra";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["quebra"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["quebra"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["tempo"] = "Tempo";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["tempo"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["tempo"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["txo"] = "Txo";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["txo"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["txo"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["divisao"] = "Divisao";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["divisao"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["divisao"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["CMO"] = "CMO";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["CMO"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["CMO"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["CMat"] = "CMat";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["CMat"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["CMat"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["vigente"] = "Vigente";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["vigente"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["vigente"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["GGF"] = "GGF";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["GGF"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["GGF"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["markup"] = "Markup";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["markup"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["markup"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["Mlucro"] = "Mlucro";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["Mlucro"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["Mlucro"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["MKP"] = "MKP";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["MKP"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["MKP"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["CBruto"] = "CBruto";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["CBruto"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["CBruto"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["PVenda"] = "PVenda";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["PVenda"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["PVenda"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["referencia"] = "Referencia";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["referencia"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["referencia"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["nome_aux"] = "Nome Aux";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["nome_aux"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["nome_aux"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["categoria"] = "Categoria";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["categoria"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["categoria"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["status"] = "Status";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["status"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["status"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["foto"] = "Foto";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["foto"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["foto"] = "";
	$fieldLabelsdbw_precocalc["Portuguese(Brazil)"]["pdtoiD1"] = "Pdtoi D1";
	$fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]["pdtoiD1"] = "";
	$placeHoldersdbw_precocalc["Portuguese(Brazil)"]["pdtoiD1"] = "";
	if (count($fieldToolTipsdbw_precocalc["Portuguese(Brazil)"]))
		$tdatadbw_precocalc[".isUseToolTips"] = true;
}


	$tdatadbw_precocalc[".NCSearch"] = true;


	$tdatadbw_precocalc[".scrollGridBody"] = true;

$tdatadbw_precocalc[".shortTableName"] = "dbw_precocalc";
$tdatadbw_precocalc[".nSecOptions"] = 0;

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

$tdatadbw_precocalc[".strOriginalTableName"] = "tb_mcalculo";

	



$tdatadbw_precocalc[".showAddInPopup"] = false;

$tdatadbw_precocalc[".showEditInPopup"] = false;

$tdatadbw_precocalc[".showViewInPopup"] = false;

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


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

	$tdatadbw_precocalc[".audit"] = false;

	$tdatadbw_precocalc[".locking"] = false;


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

if( $pages[PAGE_EDIT] ) {
	$tdatadbw_precocalc[".edit"] = true;
	$tdatadbw_precocalc[".afterEditAction"] = 0;
	$tdatadbw_precocalc[".closePopupAfterEdit"] = 1;
	$tdatadbw_precocalc[".afterEditActionDetTable"] = "Detail tables not found!";
}

if( $pages[PAGE_ADD] ) {
$tdatadbw_precocalc[".add"] = true;
$tdatadbw_precocalc[".afterAddAction"] = 0;
$tdatadbw_precocalc[".closePopupAfterAdd"] = 1;
$tdatadbw_precocalc[".afterAddActionDetTable"] = "Detail tables not found!";
}

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



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




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

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

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

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



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

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

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

$tdatadbw_precocalc[".isUseAjaxSuggest"] = true;

$tdatadbw_precocalc[".rowHighlite"] = true;





$tdatadbw_precocalc[".ajaxCodeSnippetAdded"] = false;

$tdatadbw_precocalc[".buttonsAdded"] = false;

$tdatadbw_precocalc[".addPageEvents"] = false;

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


$tdatadbw_precocalc[".badgeColor"] = "00C2C5";


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

$tdatadbw_precocalc[".googleLikeFields"] = array();
$tdatadbw_precocalc[".googleLikeFields"][] = "mcalcID";
$tdatadbw_precocalc[".googleLikeFields"][] = "pdtoID";
$tdatadbw_precocalc[".googleLikeFields"][] = "data";
$tdatadbw_precocalc[".googleLikeFields"][] = "versao";
$tdatadbw_precocalc[".googleLikeFields"][] = "componente";
$tdatadbw_precocalc[".googleLikeFields"][] = "material";
$tdatadbw_precocalc[".googleLikeFields"][] = "consumo";
$tdatadbw_precocalc[".googleLikeFields"][] = "quebra";
$tdatadbw_precocalc[".googleLikeFields"][] = "tempo";
$tdatadbw_precocalc[".googleLikeFields"][] = "txo";
$tdatadbw_precocalc[".googleLikeFields"][] = "divisao";
$tdatadbw_precocalc[".googleLikeFields"][] = "CMO";
$tdatadbw_precocalc[".googleLikeFields"][] = "CMat";
$tdatadbw_precocalc[".googleLikeFields"][] = "vigente";
$tdatadbw_precocalc[".googleLikeFields"][] = "GGF";
$tdatadbw_precocalc[".googleLikeFields"][] = "markup";
$tdatadbw_precocalc[".googleLikeFields"][] = "Mlucro";
$tdatadbw_precocalc[".googleLikeFields"][] = "MKP";
$tdatadbw_precocalc[".googleLikeFields"][] = "CBruto";
$tdatadbw_precocalc[".googleLikeFields"][] = "PVenda";
$tdatadbw_precocalc[".googleLikeFields"][] = "referencia";
$tdatadbw_precocalc[".googleLikeFields"][] = "nome_aux";
$tdatadbw_precocalc[".googleLikeFields"][] = "categoria";
$tdatadbw_precocalc[".googleLikeFields"][] = "status";
$tdatadbw_precocalc[".googleLikeFields"][] = "foto";
$tdatadbw_precocalc[".googleLikeFields"][] = "pdtoiD1";



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

$tdatadbw_precocalc[".printerPageOrientation"] = 1;
$tdatadbw_precocalc[".isPrinterPageFitToPage"] = 0;
$tdatadbw_precocalc[".nPrinterPageScale"] = 50;

$tdatadbw_precocalc[".nPrinterSplitRecords"] = 40;

$tdatadbw_precocalc[".geocodingEnabled"] = false;










$tdatadbw_precocalc[".pageSize"] = 20;

$tdatadbw_precocalc[".warnLeavingPages"] = true;



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

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

$tdatadbw_precocalc[".sqlHead"] = "SELECT tb_mcalculo.mcalcID,  tb_mcalculo.pdtoID,  tb_mcalculo.`data`,  tb_mcalculo.versao,  tb_mcalculo.componente,  tb_mcalculo.material,  tb_mcalculo.consumo,  tb_mcalculo.quebra,  tb_mcalculo.tempo,  tb_mcalculo.txo,  tb_mcalculo.divisao,  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO) AS CMO,  (tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra)) AS CMat,  tb_cotacao_material.vigente,  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)) AS GGF,  tb_mcalculo.markup,  dbw_mkps.Mlucro,  dbw_mkps.MKP,  ((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo))) AS CBruto,  ((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))*dbw_mkps.MKP AS PVenda,  tb_produtos.referencia,  tb_produtos.nome_aux,  tb_produtos.categoria,  tb_produtos.status,  tb_produtos.foto,  tb_produtos.pdtoiD AS pdtoiD1";
$tdatadbw_precocalc[".sqlFrom"] = "FROM tb_mcalculo  INNER JOIN dbw_cmmobra ON tb_mcalculo.divisao = dbw_cmmobra.custominID  INNER JOIN tb_cotacao_material ON tb_mcalculo.material = tb_cotacao_material.materialID  , dbw_cmggf  , dbw_mkps  , tb_produtos";
$tdatadbw_precocalc[".sqlWhereExpr"] = "(tb_cotacao_material.vigente =1) AND (tb_mcalculo.markup =dbw_mkps.Mlucro) AND (tb_produtos.pdtoiD =tb_mcalculo.pdtoID)";
$tdatadbw_precocalc[".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;
$tdatadbw_precocalc[".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;
$tdatadbw_precocalc[".arrGroupsPerPage"] = $arrGPP;

$tdatadbw_precocalc[".highlightSearchResults"] = true;

$tableKeysdbw_precocalc = array();
$tableKeysdbw_precocalc[] = "mcalcID";
$tdatadbw_precocalc[".Keys"] = $tableKeysdbw_precocalc;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.mcalcID";

	
	
				$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


	$tdatadbw_precocalc["mcalcID"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "mcalcID";
//	pdtoID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "pdtoID";
	$fdata["GoodName"] = "pdtoID";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","pdtoID");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.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["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


	$tdatadbw_precocalc["pdtoID"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "pdtoID";
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","data");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.`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" => "Invalid week day", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$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


	$tdatadbw_precocalc["data"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "data";
//	versao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "versao";
	$fdata["GoodName"] = "versao";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","versao");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.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["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


	$tdatadbw_precocalc["versao"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "versao";
//	componente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "componente";
	$fdata["GoodName"] = "componente";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","componente");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.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" => "Lookup wizard");

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


	
	

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

	
		
	$edata["LinkField"] = "componenteID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "componente";

	

	
	$edata["LookupOrderBy"] = "";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
		$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


	$tdatadbw_precocalc["componente"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "componente";
//	material
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "material";
	$fdata["GoodName"] = "material";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","material");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.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" => "Lookup wizard");

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


	
	

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

	
		
	$edata["LinkField"] = "materialID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "material";

	

	
	$edata["LookupOrderBy"] = "material";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
		$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


	$tdatadbw_precocalc["material"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "material";
//	consumo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "consumo";
	$fdata["GoodName"] = "consumo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","consumo");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.consumo";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 4;

	
	
	
	
	
		$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


	$tdatadbw_precocalc["consumo"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "consumo";
//	quebra
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "quebra";
	$fdata["GoodName"] = "quebra";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","quebra");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.quebra";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
	
		$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


	$tdatadbw_precocalc["quebra"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "quebra";
//	tempo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "tempo";
	$fdata["GoodName"] = "tempo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","tempo");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.tempo";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 3;

	
	
	
	
	
		$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


	$tdatadbw_precocalc["tempo"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "tempo";
//	txo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "txo";
	$fdata["GoodName"] = "txo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","txo");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.txo";

	
	
				$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["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


	$tdatadbw_precocalc["txo"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "txo";
//	divisao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "divisao";
	$fdata["GoodName"] = "divisao";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","divisao");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.divisao";

	
	
				$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"] = 2;
	$edata["LookupTable"] = "tb_custominuto";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "custominID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "divisao";

	

	
	$edata["LookupOrderBy"] = "divisao";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
		$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


	$tdatadbw_precocalc["divisao"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "divisao";
//	CMO
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "CMO";
	$fdata["GoodName"] = "CMO";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","CMO");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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


	$tdatadbw_precocalc["CMO"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "CMO";
//	CMat
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "CMat";
	$fdata["GoodName"] = "CMat";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","CMat");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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


	$tdatadbw_precocalc["CMat"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "CMat";
//	vigente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "vigente";
	$fdata["GoodName"] = "vigente";
	$fdata["ownerTable"] = "tb_cotacao_material";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","vigente");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_cotacao_material.vigente";

	
	
				$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


	$tdatadbw_precocalc["vigente"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "vigente";
//	GGF
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "GGF";
	$fdata["GoodName"] = "GGF";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","GGF");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo))";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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


	$tdatadbw_precocalc["GGF"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "GGF";
//	markup
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "markup";
	$fdata["GoodName"] = "markup";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","markup");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_mcalculo.markup";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 4;

	
	
	
	
	
		$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"] = 2;
	$edata["LookupTable"] = "dbw_mkps";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "mkpID";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "Mlucro";

	

	
	$edata["LookupOrderBy"] = "Mlucro";

	
	
	
	

	
	
		$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


	$tdatadbw_precocalc["markup"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "markup";
//	Mlucro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "Mlucro";
	$fdata["GoodName"] = "Mlucro";
	$fdata["ownerTable"] = "dbw_mkps";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","Mlucro");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_mkps.Mlucro";

	
	
				$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


	$tdatadbw_precocalc["Mlucro"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "Mlucro";
//	MKP
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "MKP";
	$fdata["GoodName"] = "MKP";
	$fdata["ownerTable"] = "dbw_mkps";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","MKP");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_mkps.MKP";

	
	
				$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


	$tdatadbw_precocalc["MKP"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "MKP";
//	CBruto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "CBruto";
	$fdata["GoodName"] = "CBruto";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","CBruto");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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


	$tdatadbw_precocalc["CBruto"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "CBruto";
//	PVenda
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 20;
	$fdata["strName"] = "PVenda";
	$fdata["GoodName"] = "PVenda";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","PVenda");
	$fdata["FieldType"] = 5;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))*dbw_mkps.MKP";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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


	$tdatadbw_precocalc["PVenda"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "PVenda";
//	referencia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 21;
	$fdata["strName"] = "referencia";
	$fdata["GoodName"] = "referencia";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","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["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


	$tdatadbw_precocalc["referencia"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "referencia";
//	nome_aux
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 22;
	$fdata["strName"] = "nome_aux";
	$fdata["GoodName"] = "nome_aux";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","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["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


	$tdatadbw_precocalc["nome_aux"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "nome_aux";
//	categoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 23;
	$fdata["strName"] = "categoria";
	$fdata["GoodName"] = "categoria";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","categoria");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_produtos.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["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


	$tdatadbw_precocalc["categoria"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "categoria";
//	status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 24;
	$fdata["strName"] = "status";
	$fdata["GoodName"] = "status";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","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" => "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


	$tdatadbw_precocalc["status"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "status";
//	foto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 25;
	$fdata["strName"] = "foto";
	$fdata["GoodName"] = "foto";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","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"] = 130;
	$vdata["ImageHeight"] = 130;

			$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


	$tdatadbw_precocalc["foto"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "foto";
//	pdtoiD1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 26;
	$fdata["strName"] = "pdtoiD1";
	$fdata["GoodName"] = "pdtoiD1";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("dbw_precocalc","pdtoiD1");
	$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


	$tdatadbw_precocalc["pdtoiD1"] = $fdata;
		$tdatadbw_precocalc[".searchableFields"][] = "pdtoiD1";


$tables_data["dbw_precocalc"]=&$tdatadbw_precocalc;
$field_labels["dbw_precocalc"] = &$fieldLabelsdbw_precocalc;
$fieldToolTips["dbw_precocalc"] = &$fieldToolTipsdbw_precocalc;
$placeHolders["dbw_precocalc"] = &$placeHoldersdbw_precocalc;
$page_titles["dbw_precocalc"] = &$pageTitlesdbw_precocalc;

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

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



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


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










function createSqlQuery_dbw_precocalc()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "tb_mcalculo.mcalcID,  tb_mcalculo.pdtoID,  tb_mcalculo.`data`,  tb_mcalculo.versao,  tb_mcalculo.componente,  tb_mcalculo.material,  tb_mcalculo.consumo,  tb_mcalculo.quebra,  tb_mcalculo.tempo,  tb_mcalculo.txo,  tb_mcalculo.divisao,  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO) AS CMO,  (tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra)) AS CMat,  tb_cotacao_material.vigente,  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)) AS GGF,  tb_mcalculo.markup,  dbw_mkps.Mlucro,  dbw_mkps.MKP,  ((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo))) AS CBruto,  ((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))*dbw_mkps.MKP AS PVenda,  tb_produtos.referencia,  tb_produtos.nome_aux,  tb_produtos.categoria,  tb_produtos.status,  tb_produtos.foto,  tb_produtos.pdtoiD AS pdtoiD1";
$proto0["m_strFrom"] = "FROM tb_mcalculo  INNER JOIN dbw_cmmobra ON tb_mcalculo.divisao = dbw_cmmobra.custominID  INNER JOIN tb_cotacao_material ON tb_mcalculo.material = tb_cotacao_material.materialID  , dbw_cmggf  , dbw_mkps  , tb_produtos";
$proto0["m_strWhere"] = "(tb_cotacao_material.vigente =1) AND (tb_mcalculo.markup =dbw_mkps.Mlucro) AND (tb_produtos.pdtoiD =tb_mcalculo.pdtoID)";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "(tb_cotacao_material.vigente =1) AND (tb_mcalculo.markup =dbw_mkps.Mlucro) AND (tb_produtos.pdtoiD =tb_mcalculo.pdtoID)";
$proto2["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "(tb_cotacao_material.vigente =1) AND (tb_mcalculo.markup =dbw_mkps.Mlucro) AND (tb_produtos.pdtoiD =tb_mcalculo.pdtoID)"
));

$proto2["m_column"]=$obj;
$proto2["m_contained"] = array();
						$proto4=array();
$proto4["m_sql"] = "tb_cotacao_material.vigente =1";
$proto4["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "vigente",
	"m_strTable" => "tb_cotacao_material",
	"m_srcTableName" => "dbw_precocalc"
));

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

			$proto2["m_contained"][]=$obj;
						$proto6=array();
$proto6["m_sql"] = "tb_mcalculo.markup =dbw_mkps.Mlucro";
$proto6["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "markup",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto6["m_column"]=$obj;
$proto6["m_contained"] = array();
$proto6["m_strCase"] = "=dbw_mkps.Mlucro";
$proto6["m_havingmode"] = false;
$proto6["m_inBrackets"] = true;
$proto6["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto6);

			$proto2["m_contained"][]=$obj;
						$proto8=array();
$proto8["m_sql"] = "tb_produtos.pdtoiD =tb_mcalculo.pdtoID";
$proto8["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "pdtoiD",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "dbw_precocalc"
));

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

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "mcalcID",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto12["m_sql"] = "tb_mcalculo.mcalcID";
$proto12["m_srcTableName"] = "dbw_precocalc";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "pdtoID",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto14["m_sql"] = "tb_mcalculo.pdtoID";
$proto14["m_srcTableName"] = "dbw_precocalc";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "data",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto16["m_sql"] = "tb_mcalculo.`data`";
$proto16["m_srcTableName"] = "dbw_precocalc";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "versao",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto18["m_sql"] = "tb_mcalculo.versao";
$proto18["m_srcTableName"] = "dbw_precocalc";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "componente",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto20["m_sql"] = "tb_mcalculo.componente";
$proto20["m_srcTableName"] = "dbw_precocalc";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "material",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto22["m_sql"] = "tb_mcalculo.material";
$proto22["m_srcTableName"] = "dbw_precocalc";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "consumo",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto24["m_sql"] = "tb_mcalculo.consumo";
$proto24["m_srcTableName"] = "dbw_precocalc";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "quebra",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto26["m_sql"] = "tb_mcalculo.quebra";
$proto26["m_srcTableName"] = "dbw_precocalc";
$proto26["m_expr"]=$obj;
$proto26["m_alias"] = "";
$obj = new SQLFieldListItem($proto26);

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "tempo",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto28["m_sql"] = "tb_mcalculo.tempo";
$proto28["m_srcTableName"] = "dbw_precocalc";
$proto28["m_expr"]=$obj;
$proto28["m_alias"] = "";
$obj = new SQLFieldListItem($proto28);

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLField(array(
	"m_strName" => "txo",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto30["m_sql"] = "tb_mcalculo.txo";
$proto30["m_srcTableName"] = "dbw_precocalc";
$proto30["m_expr"]=$obj;
$proto30["m_alias"] = "";
$obj = new SQLFieldListItem($proto30);

$proto0["m_fieldlist"][]=$obj;
						$proto32=array();
			$obj = new SQLField(array(
	"m_strName" => "divisao",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto32["m_sql"] = "tb_mcalculo.divisao";
$proto32["m_srcTableName"] = "dbw_precocalc";
$proto32["m_expr"]=$obj;
$proto32["m_alias"] = "";
$obj = new SQLFieldListItem($proto32);

$proto0["m_fieldlist"][]=$obj;
						$proto34=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)"
));

$proto34["m_sql"] = "((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)";
$proto34["m_srcTableName"] = "dbw_precocalc";
$proto34["m_expr"]=$obj;
$proto34["m_alias"] = "CMO";
$obj = new SQLFieldListItem($proto34);

$proto0["m_fieldlist"][]=$obj;
						$proto36=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))"
));

$proto36["m_sql"] = "(tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))";
$proto36["m_srcTableName"] = "dbw_precocalc";
$proto36["m_expr"]=$obj;
$proto36["m_alias"] = "CMat";
$obj = new SQLFieldListItem($proto36);

$proto0["m_fieldlist"][]=$obj;
						$proto38=array();
			$obj = new SQLField(array(
	"m_strName" => "vigente",
	"m_strTable" => "tb_cotacao_material",
	"m_srcTableName" => "dbw_precocalc"
));

$proto38["m_sql"] = "tb_cotacao_material.vigente";
$proto38["m_srcTableName"] = "dbw_precocalc";
$proto38["m_expr"]=$obj;
$proto38["m_alias"] = "";
$obj = new SQLFieldListItem($proto38);

$proto0["m_fieldlist"][]=$obj;
						$proto40=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo))"
));

$proto40["m_sql"] = "(dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo))";
$proto40["m_srcTableName"] = "dbw_precocalc";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "GGF";
$obj = new SQLFieldListItem($proto40);

$proto0["m_fieldlist"][]=$obj;
						$proto42=array();
			$obj = new SQLField(array(
	"m_strName" => "markup",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto42["m_sql"] = "tb_mcalculo.markup";
$proto42["m_srcTableName"] = "dbw_precocalc";
$proto42["m_expr"]=$obj;
$proto42["m_alias"] = "";
$obj = new SQLFieldListItem($proto42);

$proto0["m_fieldlist"][]=$obj;
						$proto44=array();
			$obj = new SQLField(array(
	"m_strName" => "Mlucro",
	"m_strTable" => "dbw_mkps",
	"m_srcTableName" => "dbw_precocalc"
));

$proto44["m_sql"] = "dbw_mkps.Mlucro";
$proto44["m_srcTableName"] = "dbw_precocalc";
$proto44["m_expr"]=$obj;
$proto44["m_alias"] = "";
$obj = new SQLFieldListItem($proto44);

$proto0["m_fieldlist"][]=$obj;
						$proto46=array();
			$obj = new SQLField(array(
	"m_strName" => "MKP",
	"m_strTable" => "dbw_mkps",
	"m_srcTableName" => "dbw_precocalc"
));

$proto46["m_sql"] = "dbw_mkps.MKP";
$proto46["m_srcTableName"] = "dbw_precocalc";
$proto46["m_expr"]=$obj;
$proto46["m_alias"] = "";
$obj = new SQLFieldListItem($proto46);

$proto0["m_fieldlist"][]=$obj;
						$proto48=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))"
));

$proto48["m_sql"] = "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))";
$proto48["m_srcTableName"] = "dbw_precocalc";
$proto48["m_expr"]=$obj;
$proto48["m_alias"] = "CBruto";
$obj = new SQLFieldListItem($proto48);

$proto0["m_fieldlist"][]=$obj;
						$proto50=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))*dbw_mkps.MKP"
));

$proto50["m_sql"] = "((tb_cotacao_material.cotacao*(tb_mcalculo.consumo*tb_mcalculo.quebra))+  ((tb_mcalculo.tempo *tb_mcalculo.txo)*dbw_cmmobra.CMMO)+  (dbw_cmggf.CMGGF*(tb_mcalculo.tempo *tb_mcalculo.txo)))*dbw_mkps.MKP";
$proto50["m_srcTableName"] = "dbw_precocalc";
$proto50["m_expr"]=$obj;
$proto50["m_alias"] = "PVenda";
$obj = new SQLFieldListItem($proto50);

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto56=array();
			$obj = new SQLField(array(
	"m_strName" => "categoria",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "dbw_precocalc"
));

$proto56["m_sql"] = "tb_produtos.categoria";
$proto56["m_srcTableName"] = "dbw_precocalc";
$proto56["m_expr"]=$obj;
$proto56["m_alias"] = "";
$obj = new SQLFieldListItem($proto56);

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto62=array();
			$obj = new SQLField(array(
	"m_strName" => "pdtoiD",
	"m_strTable" => "tb_produtos",
	"m_srcTableName" => "dbw_precocalc"
));

$proto62["m_sql"] = "tb_produtos.pdtoiD";
$proto62["m_srcTableName"] = "dbw_precocalc";
$proto62["m_expr"]=$obj;
$proto62["m_alias"] = "pdtoiD1";
$obj = new SQLFieldListItem($proto62);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto64=array();
$proto64["m_link"] = "SQLL_MAIN";
			$proto65=array();
$proto65["m_strName"] = "tb_mcalculo";
$proto65["m_srcTableName"] = "dbw_precocalc";
$proto65["m_columns"] = array();
$proto65["m_columns"][] = "mcalcID";
$proto65["m_columns"][] = "pdtoID";
$proto65["m_columns"][] = "data";
$proto65["m_columns"][] = "versao";
$proto65["m_columns"][] = "componente";
$proto65["m_columns"][] = "material";
$proto65["m_columns"][] = "consumo";
$proto65["m_columns"][] = "quebra";
$proto65["m_columns"][] = "tempo";
$proto65["m_columns"][] = "txo";
$proto65["m_columns"][] = "divisao";
$proto65["m_columns"][] = "markup";
$proto65["m_columns"][] = "Rat_modelagem";
$proto65["m_columns"][] = "vigente";
$obj = new SQLTable($proto65);

$proto64["m_table"] = $obj;
$proto64["m_sql"] = "tb_mcalculo";
$proto64["m_alias"] = "";
$proto64["m_srcTableName"] = "dbw_precocalc";
$proto66=array();
$proto66["m_sql"] = "";
$proto66["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto68=array();
$proto68["m_link"] = "SQLL_INNERJOIN";
			$proto69=array();
$proto69["m_strName"] = "dbw_cmmobra";
$proto69["m_srcTableName"] = "dbw_precocalc";
$proto69["m_columns"] = array();
$proto69["m_columns"][] = "custominID";
$proto69["m_columns"][] = "divisao";
$proto69["m_columns"][] = "salari_base";
$proto69["m_columns"][] = "encargos";
$proto69["m_columns"][] = "funcionarios";
$proto69["m_columns"][] = "custo_folha";
$proto69["m_columns"][] = "CMMO";
$proto69["m_columns"][] = "MTmes";
$proto69["m_columns"][] = "Dias_mes";
$proto69["m_columns"][] = "atualizado";
$proto69["m_columns"][] = "vigente";
$proto69["m_columns"][] = "vigente1";
$obj = new SQLTable($proto69);

$proto68["m_table"] = $obj;
$proto68["m_sql"] = "INNER JOIN dbw_cmmobra ON tb_mcalculo.divisao = dbw_cmmobra.custominID";
$proto68["m_alias"] = "";
$proto68["m_srcTableName"] = "dbw_precocalc";
$proto70=array();
$proto70["m_sql"] = "tb_mcalculo.divisao = dbw_cmmobra.custominID";
$proto70["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "divisao",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

$proto70["m_column"]=$obj;
$proto70["m_contained"] = array();
$proto70["m_strCase"] = "= dbw_cmmobra.custominID";
$proto70["m_havingmode"] = false;
$proto70["m_inBrackets"] = false;
$proto70["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto70);

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

$proto0["m_fromlist"][]=$obj;
												$proto72=array();
$proto72["m_link"] = "SQLL_INNERJOIN";
			$proto73=array();
$proto73["m_strName"] = "tb_cotacao_material";
$proto73["m_srcTableName"] = "dbw_precocalc";
$proto73["m_columns"] = array();
$proto73["m_columns"][] = "cotamatiD";
$proto73["m_columns"][] = "materialID";
$proto73["m_columns"][] = "data";
$proto73["m_columns"][] = "cotacao";
$proto73["m_columns"][] = "vigente";
$obj = new SQLTable($proto73);

$proto72["m_table"] = $obj;
$proto72["m_sql"] = "INNER JOIN tb_cotacao_material ON tb_mcalculo.material = tb_cotacao_material.materialID";
$proto72["m_alias"] = "";
$proto72["m_srcTableName"] = "dbw_precocalc";
$proto74=array();
$proto74["m_sql"] = "tb_mcalculo.material = tb_cotacao_material.materialID";
$proto74["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "material",
	"m_strTable" => "tb_mcalculo",
	"m_srcTableName" => "dbw_precocalc"
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto76=array();
$proto76["m_link"] = "SQLL_CROSSJOIN";
			$proto77=array();
$proto77["m_strName"] = "dbw_cmggf";
$proto77["m_srcTableName"] = "dbw_precocalc";
$proto77["m_columns"] = array();
$proto77["m_columns"][] = "varggfID";
$proto77["m_columns"][] = "variavel";
$proto77["m_columns"][] = "Desp_projetada";
$proto77["m_columns"][] = "data";
$proto77["m_columns"][] = "vigente";
$proto77["m_columns"][] = "dias_mes";
$proto77["m_columns"][] = "hrs_dia";
$proto77["m_columns"][] = "CMGGF";
$proto77["m_columns"][] = "vigente1";
$obj = new SQLTable($proto77);

$proto76["m_table"] = $obj;
$proto76["m_sql"] = "dbw_cmggf";
$proto76["m_alias"] = "";
$proto76["m_srcTableName"] = "dbw_precocalc";
$proto78=array();
$proto78["m_sql"] = "";
$proto78["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto80=array();
$proto80["m_link"] = "SQLL_CROSSJOIN";
			$proto81=array();
$proto81["m_strName"] = "dbw_mkps";
$proto81["m_srcTableName"] = "dbw_precocalc";
$proto81["m_columns"] = array();
$proto81["m_columns"][] = "mkpID";
$proto81["m_columns"][] = "Mlucro";
$proto81["m_columns"][] = "abilitar";
$proto81["m_columns"][] = "MKP";
$obj = new SQLTable($proto81);

$proto80["m_table"] = $obj;
$proto80["m_sql"] = "dbw_mkps";
$proto80["m_alias"] = "";
$proto80["m_srcTableName"] = "dbw_precocalc";
$proto82=array();
$proto82["m_sql"] = "";
$proto82["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto84=array();
$proto84["m_link"] = "SQLL_CROSSJOIN";
			$proto85=array();
$proto85["m_strName"] = "tb_produtos";
$proto85["m_srcTableName"] = "dbw_precocalc";
$proto85["m_columns"] = array();
$proto85["m_columns"][] = "pdtoiD";
$proto85["m_columns"][] = "clienteID";
$proto85["m_columns"][] = "referencia";
$proto85["m_columns"][] = "nome_aux";
$proto85["m_columns"][] = "categoria";
$proto85["m_columns"][] = "status";
$proto85["m_columns"][] = "foto";
$proto85["m_columns"][] = "ficha_tec";
$obj = new SQLTable($proto85);

$proto84["m_table"] = $obj;
$proto84["m_sql"] = "tb_produtos";
$proto84["m_alias"] = "";
$proto84["m_srcTableName"] = "dbw_precocalc";
$proto86=array();
$proto86["m_sql"] = "";
$proto86["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_dbw_precocalc = createSqlQuery_dbw_precocalc();


	
		;

																										

$tdatadbw_precocalc[".sqlquery"] = $queryData_dbw_precocalc;

$tableEvents["dbw_precocalc"] = new eventsBase;
$tdatadbw_precocalc[".hasEvents"] = false;

?>