<?php



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


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

//	field labels
$fieldLabelstb_mcalculo = array();
$fieldToolTipstb_mcalculo = array();
$pageTitlestb_mcalculo = array();
$placeHolderstb_mcalculo = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"] = array();
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"] = array();
	$placeHolderstb_mcalculo["Portuguese(Brazil)"] = array();
	$pageTitlestb_mcalculo["Portuguese(Brazil)"] = array();
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["mcalcID"] = "Mcalc ID";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["mcalcID"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["mcalcID"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["pdtoID"] = "Pdto ID";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["pdtoID"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["pdtoID"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["data"] = "Data";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["data"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["data"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["versao"] = "Versao";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["versao"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["versao"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["componente"] = "Componente";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["componente"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["componente"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["material"] = "Material";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["material"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["material"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["consumo"] = "Consumo";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["consumo"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["consumo"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["quebra"] = "Quebra";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["quebra"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["quebra"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["tempo"] = "Tempo";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["tempo"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["tempo"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["txo"] = "Txo";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["txo"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["txo"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["divisao"] = "Divisao";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["divisao"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["divisao"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["CMO"] = "CMO";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["CMO"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["CMO"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["CMat"] = "CMat";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["CMat"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["CMat"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["vigente"] = "Vigente";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["vigente"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["vigente"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["GGF"] = "GGF";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["GGF"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["GGF"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["RModel"] = "RModel";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["RModel"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["RModel"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["Lucro"] = "Lucro";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["Lucro"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["Lucro"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["Mlucro"] = "Mlucro";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["Mlucro"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["Mlucro"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["MKP"] = "MKP";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["MKP"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["MKP"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["CBruto"] = "CBruto";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["CBruto"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["CBruto"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["PVenda"] = "PVenda";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["PVenda"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["PVenda"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["referencia"] = "Referencia";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["referencia"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["referencia"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["nome_aux"] = "Nome Aux";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["nome_aux"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["nome_aux"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["categoria"] = "Categoria";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["categoria"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["categoria"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["status"] = "Status";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["status"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["status"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["foto"] = "Foto";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["foto"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["foto"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["pdtoiD1"] = "Pdtoi D1";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["pdtoiD1"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["pdtoiD1"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["Rat_modelagem"] = "Rat Modelagem";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["Rat_modelagem"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["Rat_modelagem"] = "";
	$fieldLabelstb_mcalculo["Portuguese(Brazil)"]["vigente1"] = "Vigente1";
	$fieldToolTipstb_mcalculo["Portuguese(Brazil)"]["vigente1"] = "";
	$placeHolderstb_mcalculo["Portuguese(Brazil)"]["vigente1"] = "";
	if (count($fieldToolTipstb_mcalculo["Portuguese(Brazil)"]))
		$tdatatb_mcalculo[".isUseToolTips"] = true;
}


	$tdatatb_mcalculo[".NCSearch"] = true;


	$tdatatb_mcalculo[".scrollGridBody"] = true;

$tdatatb_mcalculo[".shortTableName"] = "tb_mcalculo";
$tdatatb_mcalculo[".nSecOptions"] = 0;

$tdatatb_mcalculo[".mainTableOwnerID"] = "";
$tdatatb_mcalculo[".entityType"] = 0;

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

	



$tdatatb_mcalculo[".showAddInPopup"] = false;

$tdatatb_mcalculo[".showEditInPopup"] = false;

$tdatatb_mcalculo[".showViewInPopup"] = false;

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


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

	$tdatatb_mcalculo[".audit"] = false;

	$tdatatb_mcalculo[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatatb_mcalculo[".isUseAjaxSuggest"] = true;

$tdatatb_mcalculo[".rowHighlite"] = true;





$tdatatb_mcalculo[".ajaxCodeSnippetAdded"] = false;

$tdatatb_mcalculo[".buttonsAdded"] = false;

$tdatatb_mcalculo[".addPageEvents"] = false;

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


$tdatatb_mcalculo[".badgeColor"] = "d2691e";


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

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



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

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

$tdatatb_mcalculo[".nPrinterSplitRecords"] = 40;

$tdatatb_mcalculo[".geocodingEnabled"] = false;










$tdatatb_mcalculo[".pageSize"] = 20;

$tdatatb_mcalculo[".warnLeavingPages"] = true;



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

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

$tdatatb_mcalculo[".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.Rat_modelagem*dbw_cmmobra.CMMO) AS RModel,  tb_mcalculo.markup  as Lucro,  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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO)) 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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))*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,  tb_mcalculo.Rat_modelagem,  tb_mcalculo.vigente AS vigente1";
$tdatatb_mcalculo[".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";
$tdatatb_mcalculo[".sqlWhereExpr"] = "(tb_cotacao_material.vigente =1) AND (tb_mcalculo.markup =dbw_mkps.Mlucro) AND (tb_produtos.pdtoiD =tb_mcalculo.pdtoID)";
$tdatatb_mcalculo[".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;
$tdatatb_mcalculo[".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;
$tdatatb_mcalculo[".arrGroupsPerPage"] = $arrGPP;

$tdatatb_mcalculo[".highlightSearchResults"] = true;

$tableKeystb_mcalculo = array();
$tableKeystb_mcalculo[] = "mcalcID";
$tdatatb_mcalculo[".Keys"] = $tableKeystb_mcalculo;


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




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

	
	
	
			

		$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


	$tdatatb_mcalculo["mcalcID"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "mcalcID";
//	pdtoID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "pdtoID";
	$fdata["GoodName"] = "pdtoID";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["pdtoID"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "pdtoID";
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["data"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "data";
//	versao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "versao";
	$fdata["GoodName"] = "versao";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["versao"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "versao";
//	componente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "componente";
	$fdata["GoodName"] = "componente";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["componente"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "componente";
//	material
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "material";
	$fdata["GoodName"] = "material";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["material"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "material";
//	consumo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "consumo";
	$fdata["GoodName"] = "consumo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["consumo"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "consumo";
//	quebra
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "quebra";
	$fdata["GoodName"] = "quebra";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["quebra"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "quebra";
//	tempo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "tempo";
	$fdata["GoodName"] = "tempo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["tempo"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "tempo";
//	txo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "txo";
	$fdata["GoodName"] = "txo";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["txo"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "txo";
//	divisao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "divisao";
	$fdata["GoodName"] = "divisao";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["divisao"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "divisao";
//	CMO
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "CMO";
	$fdata["GoodName"] = "CMO";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["CMO"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "CMO";
//	CMat
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "CMat";
	$fdata["GoodName"] = "CMat";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["CMat"] = $fdata;
		$tdatatb_mcalculo[".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("tb_mcalculo","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


	$tdatatb_mcalculo["vigente"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "vigente";
//	GGF
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "GGF";
	$fdata["GoodName"] = "GGF";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["GGF"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "GGF";
//	RModel
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "RModel";
	$fdata["GoodName"] = "RModel";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","RModel");
	$fdata["FieldType"] = 5;

	
	
	
			

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

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


	$tdatatb_mcalculo["RModel"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "RModel";
//	Lucro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "Lucro";
	$fdata["GoodName"] = "Lucro";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","Lucro");
	$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"] = 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" => "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"] = 0;
	$edata["DisplayField"] = "Mlucro";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$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


	$tdatatb_mcalculo["Lucro"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "Lucro";
//	Mlucro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "Mlucro";
	$fdata["GoodName"] = "Mlucro";
	$fdata["ownerTable"] = "dbw_mkps";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["Mlucro"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "Mlucro";
//	MKP
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "MKP";
	$fdata["GoodName"] = "MKP";
	$fdata["ownerTable"] = "dbw_mkps";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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


	$tdatatb_mcalculo["MKP"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "MKP";
//	CBruto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 20;
	$fdata["strName"] = "CBruto";
	$fdata["GoodName"] = "CBruto";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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))+(tb_mcalculo.Rat_modelagem*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


	$tdatatb_mcalculo["CBruto"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "CBruto";
//	PVenda
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 21;
	$fdata["strName"] = "PVenda";
	$fdata["GoodName"] = "PVenda";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))*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


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


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


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


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


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


	$tdatatb_mcalculo["foto"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "foto";
//	pdtoiD1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 27;
	$fdata["strName"] = "pdtoiD1";
	$fdata["GoodName"] = "pdtoiD1";
	$fdata["ownerTable"] = "tb_produtos";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","pdtoiD1");
	$fdata["FieldType"] = 3;

	
	
	
			

		$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


	$tdatatb_mcalculo["pdtoiD1"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "pdtoiD1";
//	Rat_modelagem
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 28;
	$fdata["strName"] = "Rat_modelagem";
	$fdata["GoodName"] = "Rat_modelagem";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","Rat_modelagem");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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


	$tdatatb_mcalculo["Rat_modelagem"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "Rat_modelagem";
//	vigente1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 29;
	$fdata["strName"] = "vigente1";
	$fdata["GoodName"] = "vigente1";
	$fdata["ownerTable"] = "tb_mcalculo";
	$fdata["Label"] = GetFieldLabel("tb_mcalculo","vigente1");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

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

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

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

	$edata = array("EditFormat" => "Checkbox");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "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


	$tdatatb_mcalculo["vigente1"] = $fdata;
		$tdatatb_mcalculo[".searchableFields"][] = "vigente1";


$tables_data["tb_mcalculo"]=&$tdatatb_mcalculo;
$field_labels["tb_mcalculo"] = &$fieldLabelstb_mcalculo;
$fieldToolTips["tb_mcalculo"] = &$fieldToolTipstb_mcalculo;
$placeHolders["tb_mcalculo"] = &$placeHolderstb_mcalculo;
$page_titles["tb_mcalculo"] = &$pageTitlestb_mcalculo;

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

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="tb_negociado";
		$detailsParam["dOriginalTable"] = "tb_negociado";



				$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "tb_negociado";
	$detailsParam["dCaptionTable"] = GetTableCaption("tb_negociado");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["tb_mcalculo"][$dIndex] = $detailsParam;

	
		$detailsTablesData["tb_mcalculo"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["tb_mcalculo"][$dIndex]["masterKeys"][]="mcalcID";

	$detailsTablesData["tb_mcalculo"][$dIndex]["masterKeys"][]="pdtoID";

				$detailsTablesData["tb_mcalculo"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["tb_mcalculo"][$dIndex]["detailKeys"][]="mciD";

		
	$detailsTablesData["tb_mcalculo"][$dIndex]["detailKeys"][]="pdtoID";

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



	
				$strOriginalDetailsTable="tb_produtos";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="tb_produtos";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "tb_produtos";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["tb_mcalculo"][0] = $masterParams;
				$masterTablesData["tb_mcalculo"][0]["masterKeys"] = array();
	$masterTablesData["tb_mcalculo"][0]["masterKeys"][]="pdtoiD";
				$masterTablesData["tb_mcalculo"][0]["detailKeys"] = array();
	$masterTablesData["tb_mcalculo"][0]["detailKeys"][]="pdtoID";
		
// -----------------end  prepare master-details data arrays ------------------------------//


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










function createSqlQuery_tb_mcalculo()
{
$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.Rat_modelagem*dbw_cmmobra.CMMO) AS RModel,  tb_mcalculo.markup  as Lucro,  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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO)) 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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))*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,  tb_mcalculo.Rat_modelagem,  tb_mcalculo.vigente AS vigente1";
$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" => "tb_mcalculo"
));

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

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

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

$proto12["m_sql"] = "tb_mcalculo.mcalcID";
$proto12["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto14["m_sql"] = "tb_mcalculo.pdtoID";
$proto14["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto16["m_sql"] = "tb_mcalculo.`data`";
$proto16["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto18["m_sql"] = "tb_mcalculo.versao";
$proto18["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto20["m_sql"] = "tb_mcalculo.componente";
$proto20["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto22["m_sql"] = "tb_mcalculo.material";
$proto22["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto24["m_sql"] = "tb_mcalculo.consumo";
$proto24["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto26["m_sql"] = "tb_mcalculo.quebra";
$proto26["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto28["m_sql"] = "tb_mcalculo.tempo";
$proto28["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto30["m_sql"] = "tb_mcalculo.txo";
$proto30["m_srcTableName"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto32["m_sql"] = "tb_mcalculo.divisao";
$proto32["m_srcTableName"] = "tb_mcalculo";
$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"] = "tb_mcalculo";
$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"] = "tb_mcalculo";
$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" => "tb_mcalculo"
));

$proto38["m_sql"] = "tb_cotacao_material.vigente";
$proto38["m_srcTableName"] = "tb_mcalculo";
$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"] = "tb_mcalculo";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "GGF";
$obj = new SQLFieldListItem($proto40);

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

$proto42["m_sql"] = "(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO)";
$proto42["m_srcTableName"] = "tb_mcalculo";
$proto42["m_expr"]=$obj;
$proto42["m_alias"] = "RModel";
$obj = new SQLFieldListItem($proto42);

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

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

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

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

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

$proto48["m_sql"] = "dbw_mkps.MKP";
$proto48["m_srcTableName"] = "tb_mcalculo";
$proto48["m_expr"]=$obj;
$proto48["m_alias"] = "";
$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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))"
));

$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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))";
$proto50["m_srcTableName"] = "tb_mcalculo";
$proto50["m_expr"]=$obj;
$proto50["m_alias"] = "CBruto";
$obj = new SQLFieldListItem($proto50);

$proto0["m_fieldlist"][]=$obj;
						$proto52=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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))*dbw_mkps.MKP"
));

$proto52["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))+(tb_mcalculo.Rat_modelagem*dbw_cmmobra.CMMO))*dbw_mkps.MKP";
$proto52["m_srcTableName"] = "tb_mcalculo";
$proto52["m_expr"]=$obj;
$proto52["m_alias"] = "PVenda";
$obj = new SQLFieldListItem($proto52);

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto66["m_sql"] = "tb_mcalculo.Rat_modelagem";
$proto66["m_srcTableName"] = "tb_mcalculo";
$proto66["m_expr"]=$obj;
$proto66["m_alias"] = "";
$obj = new SQLFieldListItem($proto66);

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

$proto68["m_sql"] = "tb_mcalculo.vigente";
$proto68["m_srcTableName"] = "tb_mcalculo";
$proto68["m_expr"]=$obj;
$proto68["m_alias"] = "vigente1";
$obj = new SQLFieldListItem($proto68);

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto82["m_table"] = $obj;
$proto82["m_sql"] = "dbw_cmggf";
$proto82["m_alias"] = "";
$proto82["m_srcTableName"] = "tb_mcalculo";
$proto84=array();
$proto84["m_sql"] = "";
$proto84["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto86["m_table"] = $obj;
$proto86["m_sql"] = "dbw_mkps";
$proto86["m_alias"] = "";
$proto86["m_srcTableName"] = "tb_mcalculo";
$proto88=array();
$proto88["m_sql"] = "";
$proto88["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto90["m_table"] = $obj;
$proto90["m_sql"] = "tb_produtos";
$proto90["m_alias"] = "";
$proto90["m_srcTableName"] = "tb_mcalculo";
$proto92=array();
$proto92["m_sql"] = "";
$proto92["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_tb_mcalculo = createSqlQuery_tb_mcalculo();


	
		;

																													

$tdatatb_mcalculo[".sqlquery"] = $queryData_tb_mcalculo;

$tableEvents["tb_mcalculo"] = new eventsBase;
$tdatatb_mcalculo[".hasEvents"] = false;

?>