<?php



$tdataw_faturados = array();
$tdataw_faturados[".searchableFields"] = array();
$tdataw_faturados[".ShortName"] = "w_faturados";
$tdataw_faturados[".OwnerID"] = "";
$tdataw_faturados[".OriginalTable"] = "tb_peditens";


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

//	field labels
$fieldLabelsw_faturados = array();
$fieldToolTipsw_faturados = array();
$pageTitlesw_faturados = array();
$placeHoldersw_faturados = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelsw_faturados["Portuguese(Brazil)"] = array();
	$fieldToolTipsw_faturados["Portuguese(Brazil)"] = array();
	$placeHoldersw_faturados["Portuguese(Brazil)"] = array();
	$pageTitlesw_faturados["Portuguese(Brazil)"] = array();
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["itemID"] = "Item ID";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["itemID"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["itemID"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["pedID"] = "Ped ID";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["pedID"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["pedID"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["pdtoID"] = "Pdto ID";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["pdtoID"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["pdtoID"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["v_unit"] = "V Unit";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["v_unit"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["v_unit"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["entrega"] = "Entrega";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["entrega"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["entrega"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["incluir"] = "Incluir";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["incluir"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["incluir"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t0"] = "T0";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t0"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t0"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t1"] = "T1";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t1"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t1"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t2"] = "T2";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t2"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t2"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t3"] = "T3";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t3"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t3"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t4"] = "T4";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t4"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t4"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["t5"] = "T5";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["t5"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["t5"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["qtd"] = "Qtd";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["qtd"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["qtd"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["Subtotal"] = "Subtotal";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["Subtotal"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["Subtotal"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["Faturamento"] = "Faturamento";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["Faturamento"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["Faturamento"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["cota_a"] = "Cota A";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["cota_a"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["cota_a"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["cota_b"] = "Cota B";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["cota_b"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["cota_b"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["cota_c"] = "Cota C";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["cota_c"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["cota_c"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["cota_d"] = "Cota D";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["cota_d"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["cota_d"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["categoria"] = "Categoria";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["categoria"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["categoria"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["componente"] = "Componente";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["componente"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["componente"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["status_item"] = "Status Item";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["status_item"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["status_item"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["faturado"] = "Faturado";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["faturado"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["faturado"] = "";
	$fieldLabelsw_faturados["Portuguese(Brazil)"]["data_fatura"] = "Data Fatura";
	$fieldToolTipsw_faturados["Portuguese(Brazil)"]["data_fatura"] = "";
	$placeHoldersw_faturados["Portuguese(Brazil)"]["data_fatura"] = "";
	if (count($fieldToolTipsw_faturados["Portuguese(Brazil)"]))
		$tdataw_faturados[".isUseToolTips"] = true;
}


	$tdataw_faturados[".NCSearch"] = true;


	$tdataw_faturados[".scrollGridBody"] = true;

$tdataw_faturados[".shortTableName"] = "w_faturados";
$tdataw_faturados[".nSecOptions"] = 0;

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

$tdataw_faturados[".strOriginalTableName"] = "tb_peditens";

	



$tdataw_faturados[".showAddInPopup"] = false;

$tdataw_faturados[".showEditInPopup"] = false;

$tdataw_faturados[".showViewInPopup"] = false;

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


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

	$tdataw_faturados[".audit"] = false;

	$tdataw_faturados[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataw_faturados[".isUseAjaxSuggest"] = true;

$tdataw_faturados[".rowHighlite"] = true;





$tdataw_faturados[".ajaxCodeSnippetAdded"] = false;

$tdataw_faturados[".buttonsAdded"] = false;

$tdataw_faturados[".addPageEvents"] = false;

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


$tdataw_faturados[".badgeColor"] = "E07878";


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

$tdataw_faturados[".googleLikeFields"] = array();
$tdataw_faturados[".googleLikeFields"][] = "itemID";
$tdataw_faturados[".googleLikeFields"][] = "pedID";
$tdataw_faturados[".googleLikeFields"][] = "pdtoID";
$tdataw_faturados[".googleLikeFields"][] = "v_unit";
$tdataw_faturados[".googleLikeFields"][] = "entrega";
$tdataw_faturados[".googleLikeFields"][] = "incluir";
$tdataw_faturados[".googleLikeFields"][] = "t0";
$tdataw_faturados[".googleLikeFields"][] = "t1";
$tdataw_faturados[".googleLikeFields"][] = "t2";
$tdataw_faturados[".googleLikeFields"][] = "t3";
$tdataw_faturados[".googleLikeFields"][] = "t4";
$tdataw_faturados[".googleLikeFields"][] = "t5";
$tdataw_faturados[".googleLikeFields"][] = "qtd";
$tdataw_faturados[".googleLikeFields"][] = "Subtotal";
$tdataw_faturados[".googleLikeFields"][] = "Faturamento";
$tdataw_faturados[".googleLikeFields"][] = "cota_a";
$tdataw_faturados[".googleLikeFields"][] = "cota_b";
$tdataw_faturados[".googleLikeFields"][] = "cota_c";
$tdataw_faturados[".googleLikeFields"][] = "cota_d";
$tdataw_faturados[".googleLikeFields"][] = "categoria";
$tdataw_faturados[".googleLikeFields"][] = "componente";
$tdataw_faturados[".googleLikeFields"][] = "status_item";
$tdataw_faturados[".googleLikeFields"][] = "faturado";
$tdataw_faturados[".googleLikeFields"][] = "data_fatura";



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

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

$tdataw_faturados[".nPrinterSplitRecords"] = 40;

$tdataw_faturados[".geocodingEnabled"] = false;










$tdataw_faturados[".pageSize"] = 20;

$tdataw_faturados[".warnLeavingPages"] = true;



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

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

$tdataw_faturados[".sqlHead"] = "SELECT tb_peditens.itemID,  tb_peditens.pedID,  tb_peditens.pdtoID,  tb_peditens.v_unit,  tb_peditens.entrega,  tb_peditens.incluir,  tb_peditens.t0,  tb_peditens.t1,  tb_peditens.t2,  tb_peditens.t3,  tb_peditens.t4,  tb_peditens.t5,  (t0+t1+t2+t3+t4+t5) AS qtd,  (t0+t1+t2+t3+t4+t5)*v_unit AS Subtotal,  ((t0+t1+t2+t3+t4+t5)*v_unit) as Faturamento,  tb_peditens.cota_a,  tb_peditens.cota_b,  tb_peditens.cota_c,  tb_peditens.cota_d,  tb_produtos.categoria,  tb_componentes.componente,  tb_peditens.status_item,  tb_peditens.faturado,  tb_peditens.data_fatura";
$tdataw_faturados[".sqlFrom"] = "FROM tb_peditens  INNER JOIN tb_produtos ON tb_peditens.pdtoID = tb_produtos.pdtoiD  INNER JOIN tb_componentes ON tb_produtos.categoria = tb_componentes.componenteID";
$tdataw_faturados[".sqlWhereExpr"] = "tb_peditens.faturado=1";
$tdataw_faturados[".sqlTail"] = "";










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

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

$tdataw_faturados[".highlightSearchResults"] = true;

$tableKeysw_faturados = array();
$tableKeysw_faturados[] = "itemID";
$tdataw_faturados[".Keys"] = $tableKeysw_faturados;


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




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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.itemID";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["itemID"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "itemID";
//	pedID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "pedID";
	$fdata["GoodName"] = "pedID";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","pedID");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.pedID";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["pedID"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "pedID";
//	pdtoID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "pdtoID";
	$fdata["GoodName"] = "pdtoID";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","pdtoID");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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


	
	

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

	
		
	$edata["LinkField"] = "pdtoiD";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "referencia";

	

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

	
	
	
	
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "v_unit";

	
	
	
// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["pdtoID"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "pdtoID";
//	v_unit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "v_unit";
	$fdata["GoodName"] = "v_unit";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","v_unit");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.v_unit";

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

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


	
	

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

	
		
	$edata["LinkField"] = "pv_negociado";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "pv_negociado";

				$edata["LookupWhereCode"] = true;


	
	$edata["LookupOrderBy"] = "";

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "pdtoID", "lookup" => "pdtoID" );

		$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


	$tdataw_faturados["v_unit"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "v_unit";
//	entrega
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "entrega";
	$fdata["GoodName"] = "entrega";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","entrega");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.entrega";

	
	
				$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"] = 1;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["entrega"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "entrega";
//	incluir
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "incluir";
	$fdata["GoodName"] = "incluir";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","incluir");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.incluir";

	
	
				$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


	$tdataw_faturados["incluir"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "incluir";
//	t0
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "t0";
	$fdata["GoodName"] = "t0";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t0");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t0";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t0"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t0";
//	t1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "t1";
	$fdata["GoodName"] = "t1";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t1");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t1";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t1"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t1";
//	t2
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "t2";
	$fdata["GoodName"] = "t2";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t2");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t2";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t2"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t2";
//	t3
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "t3";
	$fdata["GoodName"] = "t3";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t3");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t3";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t3"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t3";
//	t4
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "t4";
	$fdata["GoodName"] = "t4";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t4");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t4";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t4"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t4";
//	t5
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "t5";
	$fdata["GoodName"] = "t5";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","t5");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.t5";

	
	
				$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"] = "number";

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["t5"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "t5";
//	qtd
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "qtd";
	$fdata["GoodName"] = "qtd";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("w_faturados","qtd");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(t0+t1+t2+t3+t4+t5)";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["qtd"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "qtd";
//	Subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "Subtotal";
	$fdata["GoodName"] = "Subtotal";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("w_faturados","Subtotal");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(t0+t1+t2+t3+t4+t5)*v_unit";

	
	
				$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


	$tdataw_faturados["Subtotal"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "Subtotal";
//	Faturamento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "Faturamento";
	$fdata["GoodName"] = "Faturamento";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("w_faturados","Faturamento");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "((t0+t1+t2+t3+t4+t5)*v_unit)";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["Faturamento"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "Faturamento";
//	cota_a
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "cota_a";
	$fdata["GoodName"] = "cota_a";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","cota_a");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.cota_a";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 1;

	
	
	
	
	
		$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"] = "number";

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["cota_a"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "cota_a";
//	cota_b
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "cota_b";
	$fdata["GoodName"] = "cota_b";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","cota_b");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.cota_b";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 1;

	
	
	
	
	
		$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"] = "number";

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["cota_b"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "cota_b";
//	cota_c
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "cota_c";
	$fdata["GoodName"] = "cota_c";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","cota_c");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.cota_c";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 1;

	
	
	
	
	
		$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"] = "number";

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["cota_c"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "cota_c";
//	cota_d
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "cota_d";
	$fdata["GoodName"] = "cota_d";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","cota_d");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.cota_d";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 1;

	
	
	
	
	
		$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"] = "number";

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


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


	$tdataw_faturados["categoria"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "categoria";
//	componente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 21;
	$fdata["strName"] = "componente";
	$fdata["GoodName"] = "componente";
	$fdata["ownerTable"] = "tb_componentes";
	$fdata["Label"] = GetFieldLabel("w_faturados","componente");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["componente"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "componente";
//	status_item
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 22;
	$fdata["strName"] = "status_item";
	$fdata["GoodName"] = "status_item";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","status_item");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.status_item";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

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

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Programado";
	$edata["LookupValues"][] = "Processo";
	$edata["LookupValues"][] = "Expedição ";
	$edata["LookupValues"][] = "Entregue";
	$edata["LookupValues"][] = "Cancelado";
	$edata["LookupValues"][] = "Estoque";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["status_item"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "status_item";
//	faturado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 23;
	$fdata["strName"] = "faturado";
	$fdata["GoodName"] = "faturado";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","faturado");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.faturado";

	
	
				$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


	$tdataw_faturados["faturado"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "faturado";
//	data_fatura
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 24;
	$fdata["strName"] = "data_fatura";
	$fdata["GoodName"] = "data_fatura";
	$fdata["ownerTable"] = "tb_peditens";
	$fdata["Label"] = GetFieldLabel("w_faturados","data_fatura");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_peditens.data_fatura";

	
	
				$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["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$edata["InitialYearFactor"] = 1;
	$edata["LastYearFactor"] = 10;

	
	
	
		$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("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, NOT_EMPTY );
// the end of search options settings


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataw_faturados["data_fatura"] = $fdata;
		$tdataw_faturados[".searchableFields"][] = "data_fatura";


$tables_data["w_faturados"]=&$tdataw_faturados;
$field_labels["w_faturados"] = &$fieldLabelsw_faturados;
$fieldToolTips["w_faturados"] = &$fieldToolTipsw_faturados;
$placeHolders["w_faturados"] = &$placeHoldersw_faturados;
$page_titles["w_faturados"] = &$pageTitlesw_faturados;

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

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



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


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










function createSqlQuery_w_faturados()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "tb_peditens.itemID,  tb_peditens.pedID,  tb_peditens.pdtoID,  tb_peditens.v_unit,  tb_peditens.entrega,  tb_peditens.incluir,  tb_peditens.t0,  tb_peditens.t1,  tb_peditens.t2,  tb_peditens.t3,  tb_peditens.t4,  tb_peditens.t5,  (t0+t1+t2+t3+t4+t5) AS qtd,  (t0+t1+t2+t3+t4+t5)*v_unit AS Subtotal,  ((t0+t1+t2+t3+t4+t5)*v_unit) as Faturamento,  tb_peditens.cota_a,  tb_peditens.cota_b,  tb_peditens.cota_c,  tb_peditens.cota_d,  tb_produtos.categoria,  tb_componentes.componente,  tb_peditens.status_item,  tb_peditens.faturado,  tb_peditens.data_fatura";
$proto0["m_strFrom"] = "FROM tb_peditens  INNER JOIN tb_produtos ON tb_peditens.pdtoID = tb_produtos.pdtoiD  INNER JOIN tb_componentes ON tb_produtos.categoria = tb_componentes.componenteID";
$proto0["m_strWhere"] = "tb_peditens.faturado=1";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "tb_peditens.faturado=1";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "faturado",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "itemID",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto6["m_sql"] = "tb_peditens.itemID";
$proto6["m_srcTableName"] = "w_faturados";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "pedID",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto8["m_sql"] = "tb_peditens.pedID";
$proto8["m_srcTableName"] = "w_faturados";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "pdtoID",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto10["m_sql"] = "tb_peditens.pdtoID";
$proto10["m_srcTableName"] = "w_faturados";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "v_unit",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto12["m_sql"] = "tb_peditens.v_unit";
$proto12["m_srcTableName"] = "w_faturados";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "entrega",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto14["m_sql"] = "tb_peditens.entrega";
$proto14["m_srcTableName"] = "w_faturados";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "incluir",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto16["m_sql"] = "tb_peditens.incluir";
$proto16["m_srcTableName"] = "w_faturados";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "t0",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto18["m_sql"] = "tb_peditens.t0";
$proto18["m_srcTableName"] = "w_faturados";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "t1",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto20["m_sql"] = "tb_peditens.t1";
$proto20["m_srcTableName"] = "w_faturados";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "t2",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto22["m_sql"] = "tb_peditens.t2";
$proto22["m_srcTableName"] = "w_faturados";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "t3",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto24["m_sql"] = "tb_peditens.t3";
$proto24["m_srcTableName"] = "w_faturados";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "t4",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto26["m_sql"] = "tb_peditens.t4";
$proto26["m_srcTableName"] = "w_faturados";
$proto26["m_expr"]=$obj;
$proto26["m_alias"] = "";
$obj = new SQLFieldListItem($proto26);

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "t5",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto28["m_sql"] = "tb_peditens.t5";
$proto28["m_srcTableName"] = "w_faturados";
$proto28["m_expr"]=$obj;
$proto28["m_alias"] = "";
$obj = new SQLFieldListItem($proto28);

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(t0+t1+t2+t3+t4+t5)"
));

$proto30["m_sql"] = "(t0+t1+t2+t3+t4+t5)";
$proto30["m_srcTableName"] = "w_faturados";
$proto30["m_expr"]=$obj;
$proto30["m_alias"] = "qtd";
$obj = new SQLFieldListItem($proto30);

$proto0["m_fieldlist"][]=$obj;
						$proto32=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(t0+t1+t2+t3+t4+t5)*v_unit"
));

$proto32["m_sql"] = "(t0+t1+t2+t3+t4+t5)*v_unit";
$proto32["m_srcTableName"] = "w_faturados";
$proto32["m_expr"]=$obj;
$proto32["m_alias"] = "Subtotal";
$obj = new SQLFieldListItem($proto32);

$proto0["m_fieldlist"][]=$obj;
						$proto34=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "((t0+t1+t2+t3+t4+t5)*v_unit)"
));

$proto34["m_sql"] = "((t0+t1+t2+t3+t4+t5)*v_unit)";
$proto34["m_srcTableName"] = "w_faturados";
$proto34["m_expr"]=$obj;
$proto34["m_alias"] = "Faturamento";
$obj = new SQLFieldListItem($proto34);

$proto0["m_fieldlist"][]=$obj;
						$proto36=array();
			$obj = new SQLField(array(
	"m_strName" => "cota_a",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto36["m_sql"] = "tb_peditens.cota_a";
$proto36["m_srcTableName"] = "w_faturados";
$proto36["m_expr"]=$obj;
$proto36["m_alias"] = "";
$obj = new SQLFieldListItem($proto36);

$proto0["m_fieldlist"][]=$obj;
						$proto38=array();
			$obj = new SQLField(array(
	"m_strName" => "cota_b",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto38["m_sql"] = "tb_peditens.cota_b";
$proto38["m_srcTableName"] = "w_faturados";
$proto38["m_expr"]=$obj;
$proto38["m_alias"] = "";
$obj = new SQLFieldListItem($proto38);

$proto0["m_fieldlist"][]=$obj;
						$proto40=array();
			$obj = new SQLField(array(
	"m_strName" => "cota_c",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto40["m_sql"] = "tb_peditens.cota_c";
$proto40["m_srcTableName"] = "w_faturados";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "";
$obj = new SQLFieldListItem($proto40);

$proto0["m_fieldlist"][]=$obj;
						$proto42=array();
			$obj = new SQLField(array(
	"m_strName" => "cota_d",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto42["m_sql"] = "tb_peditens.cota_d";
$proto42["m_srcTableName"] = "w_faturados";
$proto42["m_expr"]=$obj;
$proto42["m_alias"] = "";
$obj = new SQLFieldListItem($proto42);

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto48=array();
			$obj = new SQLField(array(
	"m_strName" => "status_item",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto48["m_sql"] = "tb_peditens.status_item";
$proto48["m_srcTableName"] = "w_faturados";
$proto48["m_expr"]=$obj;
$proto48["m_alias"] = "";
$obj = new SQLFieldListItem($proto48);

$proto0["m_fieldlist"][]=$obj;
						$proto50=array();
			$obj = new SQLField(array(
	"m_strName" => "faturado",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto50["m_sql"] = "tb_peditens.faturado";
$proto50["m_srcTableName"] = "w_faturados";
$proto50["m_expr"]=$obj;
$proto50["m_alias"] = "";
$obj = new SQLFieldListItem($proto50);

$proto0["m_fieldlist"][]=$obj;
						$proto52=array();
			$obj = new SQLField(array(
	"m_strName" => "data_fatura",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

$proto52["m_sql"] = "tb_peditens.data_fatura";
$proto52["m_srcTableName"] = "w_faturados";
$proto52["m_expr"]=$obj;
$proto52["m_alias"] = "";
$obj = new SQLFieldListItem($proto52);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto54=array();
$proto54["m_link"] = "SQLL_MAIN";
			$proto55=array();
$proto55["m_strName"] = "tb_peditens";
$proto55["m_srcTableName"] = "w_faturados";
$proto55["m_columns"] = array();
$proto55["m_columns"][] = "itemID";
$proto55["m_columns"][] = "pedID";
$proto55["m_columns"][] = "pdtoID";
$proto55["m_columns"][] = "componenteID";
$proto55["m_columns"][] = "v_unit";
$proto55["m_columns"][] = "entrega";
$proto55["m_columns"][] = "incluir";
$proto55["m_columns"][] = "t0";
$proto55["m_columns"][] = "t1";
$proto55["m_columns"][] = "t2";
$proto55["m_columns"][] = "t3";
$proto55["m_columns"][] = "t4";
$proto55["m_columns"][] = "t5";
$proto55["m_columns"][] = "cota_a";
$proto55["m_columns"][] = "cota_b";
$proto55["m_columns"][] = "cota_c";
$proto55["m_columns"][] = "cota_d";
$proto55["m_columns"][] = "status_item";
$proto55["m_columns"][] = "faturado";
$proto55["m_columns"][] = "data_fatura";
$obj = new SQLTable($proto55);

$proto54["m_table"] = $obj;
$proto54["m_sql"] = "tb_peditens";
$proto54["m_alias"] = "";
$proto54["m_srcTableName"] = "w_faturados";
$proto56=array();
$proto56["m_sql"] = "";
$proto56["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto58=array();
$proto58["m_link"] = "SQLL_INNERJOIN";
			$proto59=array();
$proto59["m_strName"] = "tb_produtos";
$proto59["m_srcTableName"] = "w_faturados";
$proto59["m_columns"] = array();
$proto59["m_columns"][] = "pdtoiD";
$proto59["m_columns"][] = "clienteID";
$proto59["m_columns"][] = "referencia";
$proto59["m_columns"][] = "nome_aux";
$proto59["m_columns"][] = "categoria";
$proto59["m_columns"][] = "status";
$proto59["m_columns"][] = "foto";
$proto59["m_columns"][] = "ficha_tec";
$obj = new SQLTable($proto59);

$proto58["m_table"] = $obj;
$proto58["m_sql"] = "INNER JOIN tb_produtos ON tb_peditens.pdtoID = tb_produtos.pdtoiD";
$proto58["m_alias"] = "";
$proto58["m_srcTableName"] = "w_faturados";
$proto60=array();
$proto60["m_sql"] = "tb_peditens.pdtoID = tb_produtos.pdtoiD";
$proto60["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "pdtoID",
	"m_strTable" => "tb_peditens",
	"m_srcTableName" => "w_faturados"
));

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

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

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

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

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

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

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

	return $obj;
}
$queryData_w_faturados = createSqlQuery_w_faturados();


	
		;

																								

$tdataw_faturados[".sqlquery"] = $queryData_w_faturados;

$tableEvents["w_faturados"] = new eventsBase;
$tdataw_faturados[".hasEvents"] = false;

?>