<?php



$tdatadbw_markups = array();
$tdatadbw_markups[".searchableFields"] = array();
$tdatadbw_markups[".ShortName"] = "dbw_markups";
$tdatadbw_markups[".OwnerID"] = "";
$tdatadbw_markups[".OriginalTable"] = "tb_margemlucro";


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

//	field labels
$fieldLabelsdbw_markups = array();
$fieldToolTipsdbw_markups = array();
$pageTitlesdbw_markups = array();
$placeHoldersdbw_markups = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelsdbw_markups["Portuguese(Brazil)"] = array();
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"] = array();
	$placeHoldersdbw_markups["Portuguese(Brazil)"] = array();
	$pageTitlesdbw_markups["Portuguese(Brazil)"] = array();
	$fieldLabelsdbw_markups["Portuguese(Brazil)"]["mkpID"] = "Mkp ID";
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"]["mkpID"] = "";
	$placeHoldersdbw_markups["Portuguese(Brazil)"]["mkpID"] = "";
	$fieldLabelsdbw_markups["Portuguese(Brazil)"]["Mlucro"] = "Mlucro";
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"]["Mlucro"] = "";
	$placeHoldersdbw_markups["Portuguese(Brazil)"]["Mlucro"] = "";
	$fieldLabelsdbw_markups["Portuguese(Brazil)"]["abilitar"] = "Abilitar";
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"]["abilitar"] = "";
	$placeHoldersdbw_markups["Portuguese(Brazil)"]["abilitar"] = "";
	$fieldLabelsdbw_markups["Portuguese(Brazil)"]["OF"] = "OF";
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"]["OF"] = "";
	$placeHoldersdbw_markups["Portuguese(Brazil)"]["OF"] = "";
	$fieldLabelsdbw_markups["Portuguese(Brazil)"]["MKP"] = "MKP";
	$fieldToolTipsdbw_markups["Portuguese(Brazil)"]["MKP"] = "";
	$placeHoldersdbw_markups["Portuguese(Brazil)"]["MKP"] = "";
	if (count($fieldToolTipsdbw_markups["Portuguese(Brazil)"]))
		$tdatadbw_markups[".isUseToolTips"] = true;
}


	$tdatadbw_markups[".NCSearch"] = true;


	$tdatadbw_markups[".scrollGridBody"] = true;

$tdatadbw_markups[".shortTableName"] = "dbw_markups";
$tdatadbw_markups[".nSecOptions"] = 0;

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

$tdatadbw_markups[".strOriginalTableName"] = "tb_margemlucro";

	



$tdatadbw_markups[".showAddInPopup"] = false;

$tdatadbw_markups[".showEditInPopup"] = false;

$tdatadbw_markups[".showViewInPopup"] = false;

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


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

	$tdatadbw_markups[".audit"] = false;

	$tdatadbw_markups[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatadbw_markups[".isUseAjaxSuggest"] = true;

$tdatadbw_markups[".rowHighlite"] = true;





$tdatadbw_markups[".ajaxCodeSnippetAdded"] = false;

$tdatadbw_markups[".buttonsAdded"] = false;

$tdatadbw_markups[".addPageEvents"] = false;

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


$tdatadbw_markups[".badgeColor"] = "D2AF80";


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

$tdatadbw_markups[".googleLikeFields"] = array();
$tdatadbw_markups[".googleLikeFields"][] = "mkpID";
$tdatadbw_markups[".googleLikeFields"][] = "Mlucro";
$tdatadbw_markups[".googleLikeFields"][] = "abilitar";
$tdatadbw_markups[".googleLikeFields"][] = "OF";
$tdatadbw_markups[".googleLikeFields"][] = "MKP";



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

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

$tdatadbw_markups[".nPrinterSplitRecords"] = 40;

$tdatadbw_markups[".geocodingEnabled"] = false;










$tdatadbw_markups[".pageSize"] = 20;

$tdatadbw_markups[".warnLeavingPages"] = true;



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

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

$tdatadbw_markups[".sqlHead"] = "SELECT tb_margemlucro.mkpID,  tb_margemlucro.Mlucro,  tb_margemlucro.abilitar,  dbw_oftotal.`OF`,  ((tb_margemlucro.Mlucro+dbw_oftotal.`OF`)/(100-(tb_margemlucro.Mlucro+dbw_oftotal.`OF`)))+1 as MKP";
$tdatadbw_markups[".sqlFrom"] = "FROM tb_margemlucro  , dbw_oftotal";
$tdatadbw_markups[".sqlWhereExpr"] = "";
$tdatadbw_markups[".sqlTail"] = "";










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

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

$tdatadbw_markups[".highlightSearchResults"] = true;

$tableKeysdbw_markups = array();
$tableKeysdbw_markups[] = "mkpID";
$tdatadbw_markups[".Keys"] = $tableKeysdbw_markups;


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




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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_margemlucro.mkpID";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadbw_markups["mkpID"] = $fdata;
		$tdatadbw_markups[".searchableFields"][] = "mkpID";
//	Mlucro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Mlucro";
	$fdata["GoodName"] = "Mlucro";
	$fdata["ownerTable"] = "tb_margemlucro";
	$fdata["Label"] = GetFieldLabel("dbw_markups","Mlucro");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_margemlucro.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["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadbw_markups["Mlucro"] = $fdata;
		$tdatadbw_markups[".searchableFields"][] = "Mlucro";
//	abilitar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "abilitar";
	$fdata["GoodName"] = "abilitar";
	$fdata["ownerTable"] = "tb_margemlucro";
	$fdata["Label"] = GetFieldLabel("dbw_markups","abilitar");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "tb_margemlucro.abilitar";

	
	
				$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


	$tdatadbw_markups["abilitar"] = $fdata;
		$tdatadbw_markups[".searchableFields"][] = "abilitar";
//	OF
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "OF";
	$fdata["GoodName"] = "OF";
	$fdata["ownerTable"] = "dbw_oftotal";
	$fdata["Label"] = GetFieldLabel("dbw_markups","OF");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "dbw_oftotal.`OF`";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadbw_markups["OF"] = $fdata;
		$tdatadbw_markups[".searchableFields"][] = "OF";
//	MKP
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "MKP";
	$fdata["GoodName"] = "MKP";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("dbw_markups","MKP");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "((tb_margemlucro.Mlucro+dbw_oftotal.`OF`)/(100-(tb_margemlucro.Mlucro+dbw_oftotal.`OF`)))+1";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadbw_markups["MKP"] = $fdata;
		$tdatadbw_markups[".searchableFields"][] = "MKP";


$tables_data["dbw_markups"]=&$tdatadbw_markups;
$field_labels["dbw_markups"] = &$fieldLabelsdbw_markups;
$fieldToolTips["dbw_markups"] = &$fieldToolTipsdbw_markups;
$placeHolders["dbw_markups"] = &$placeHoldersdbw_markups;
$page_titles["dbw_markups"] = &$pageTitlesdbw_markups;

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

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



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


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










function createSqlQuery_dbw_markups()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "tb_margemlucro.mkpID,  tb_margemlucro.Mlucro,  tb_margemlucro.abilitar,  dbw_oftotal.`OF`,  ((tb_margemlucro.Mlucro+dbw_oftotal.`OF`)/(100-(tb_margemlucro.Mlucro+dbw_oftotal.`OF`)))+1 as MKP";
$proto0["m_strFrom"] = "FROM tb_margemlucro  , dbw_oftotal";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "mkpID",
	"m_strTable" => "tb_margemlucro",
	"m_srcTableName" => "dbw_markups"
));

$proto6["m_sql"] = "tb_margemlucro.mkpID";
$proto6["m_srcTableName"] = "dbw_markups";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "Mlucro",
	"m_strTable" => "tb_margemlucro",
	"m_srcTableName" => "dbw_markups"
));

$proto8["m_sql"] = "tb_margemlucro.Mlucro";
$proto8["m_srcTableName"] = "dbw_markups";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "abilitar",
	"m_strTable" => "tb_margemlucro",
	"m_srcTableName" => "dbw_markups"
));

$proto10["m_sql"] = "tb_margemlucro.abilitar";
$proto10["m_srcTableName"] = "dbw_markups";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "OF",
	"m_strTable" => "dbw_oftotal",
	"m_srcTableName" => "dbw_markups"
));

$proto12["m_sql"] = "dbw_oftotal.`OF`";
$proto12["m_srcTableName"] = "dbw_markups";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "((tb_margemlucro.Mlucro+dbw_oftotal.`OF`)/(100-(tb_margemlucro.Mlucro+dbw_oftotal.`OF`)))+1"
));

$proto14["m_sql"] = "((tb_margemlucro.Mlucro+dbw_oftotal.`OF`)/(100-(tb_margemlucro.Mlucro+dbw_oftotal.`OF`)))+1";
$proto14["m_srcTableName"] = "dbw_markups";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "MKP";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto16=array();
$proto16["m_link"] = "SQLL_MAIN";
			$proto17=array();
$proto17["m_strName"] = "tb_margemlucro";
$proto17["m_srcTableName"] = "dbw_markups";
$proto17["m_columns"] = array();
$proto17["m_columns"][] = "mkpID";
$proto17["m_columns"][] = "Mlucro";
$proto17["m_columns"][] = "abilitar";
$obj = new SQLTable($proto17);

$proto16["m_table"] = $obj;
$proto16["m_sql"] = "tb_margemlucro";
$proto16["m_alias"] = "";
$proto16["m_srcTableName"] = "dbw_markups";
$proto18=array();
$proto18["m_sql"] = "";
$proto18["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto20=array();
$proto20["m_link"] = "SQLL_CROSSJOIN";
			$proto21=array();
$proto21["m_strName"] = "dbw_oftotal";
$proto21["m_srcTableName"] = "dbw_markups";
$proto21["m_columns"] = array();
$proto21["m_columns"][] = "obrigFiscalID";
$proto21["m_columns"][] = "obrifacao";
$proto21["m_columns"][] = "OF";
$proto21["m_columns"][] = "incluir";
$obj = new SQLTable($proto21);

$proto20["m_table"] = $obj;
$proto20["m_sql"] = "dbw_oftotal";
$proto20["m_alias"] = "";
$proto20["m_srcTableName"] = "dbw_markups";
$proto22=array();
$proto22["m_sql"] = "";
$proto22["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
												$proto24=array();
						$obj = new SQLField(array(
	"m_strName" => "mkpID",
	"m_strTable" => "tb_margemlucro",
	"m_srcTableName" => "dbw_markups"
));

$proto24["m_column"]=$obj;
$obj = new SQLGroupByItem($proto24);

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

	return $obj;
}
$queryData_dbw_markups = createSqlQuery_dbw_markups();


	
		;

					

$tdatadbw_markups[".sqlquery"] = $queryData_dbw_markups;

$tableEvents["dbw_markups"] = new eventsBase;
$tdatadbw_markups[".hasEvents"] = false;

?>