<?php
$tdatapurchasing_list = array();
$tdatapurchasing_list[".searchableFields"] = array();
$tdatapurchasing_list[".ShortName"] = "purchasing_list";
$tdatapurchasing_list[".OwnerID"] = "user";
$tdatapurchasing_list[".OriginalTable"] = "purchasing";


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

//	field labels
$fieldLabelspurchasing_list = array();
$fieldToolTipspurchasing_list = array();
$pageTitlespurchasing_list = array();
$placeHolderspurchasing_list = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelspurchasing_list["English"] = array();
	$fieldToolTipspurchasing_list["English"] = array();
	$placeHolderspurchasing_list["English"] = array();
	$pageTitlespurchasing_list["English"] = array();
	$fieldLabelspurchasing_list["English"]["id"] = "Id";
	$fieldToolTipspurchasing_list["English"]["id"] = "";
	$placeHolderspurchasing_list["English"]["id"] = "";
	$fieldLabelspurchasing_list["English"]["supplier"] = "Supplier";
	$fieldToolTipspurchasing_list["English"]["supplier"] = "";
	$placeHolderspurchasing_list["English"]["supplier"] = "";
	$fieldLabelspurchasing_list["English"]["date_and_time"] = "Time";
	$fieldToolTipspurchasing_list["English"]["date_and_time"] = "";
	$placeHolderspurchasing_list["English"]["date_and_time"] = "";
	$fieldLabelspurchasing_list["English"]["tt"] = "Total";
	$fieldToolTipspurchasing_list["English"]["tt"] = "";
	$placeHolderspurchasing_list["English"]["tt"] = "";
	$fieldLabelspurchasing_list["English"]["branch_code"] = "Branch Code";
	$fieldToolTipspurchasing_list["English"]["branch_code"] = "";
	$placeHolderspurchasing_list["English"]["branch_code"] = "";
	$fieldLabelspurchasing_list["English"]["user"] = "User";
	$fieldToolTipspurchasing_list["English"]["user"] = "";
	$placeHolderspurchasing_list["English"]["user"] = "";
	$fieldLabelspurchasing_list["English"]["outlet_code"] = "";
	$fieldToolTipspurchasing_list["English"]["outlet_code"] = "";
	$placeHolderspurchasing_list["English"]["outlet_code"] = "";
	$fieldLabelspurchasing_list["English"]["payment"] = "Payment";
	$fieldToolTipspurchasing_list["English"]["payment"] = "";
	$placeHolderspurchasing_list["English"]["payment"] = "";
	$fieldLabelspurchasing_list["English"]["company_name"] = "Company Name";
	$fieldToolTipspurchasing_list["English"]["company_name"] = "";
	$placeHolderspurchasing_list["English"]["company_name"] = "";
	$fieldLabelspurchasing_list["English"]["address_line_1"] = "Address Line 1";
	$fieldToolTipspurchasing_list["English"]["address_line_1"] = "";
	$placeHolderspurchasing_list["English"]["address_line_1"] = "";
	$fieldLabelspurchasing_list["English"]["address_line_2"] = "Address Line 2";
	$fieldToolTipspurchasing_list["English"]["address_line_2"] = "";
	$placeHolderspurchasing_list["English"]["address_line_2"] = "";
	$fieldLabelspurchasing_list["English"]["Fax"] = "Fax";
	$fieldToolTipspurchasing_list["English"]["Fax"] = "";
	$placeHolderspurchasing_list["English"]["Fax"] = "";
	$fieldLabelspurchasing_list["English"]["email"] = "Email";
	$fieldToolTipspurchasing_list["English"]["email"] = "";
	$placeHolderspurchasing_list["English"]["email"] = "";
	$fieldLabelspurchasing_list["English"]["logo"] = "Logo";
	$fieldToolTipspurchasing_list["English"]["logo"] = "";
	$placeHolderspurchasing_list["English"]["logo"] = "";
	$fieldLabelspurchasing_list["English"]["header"] = "Header";
	$fieldToolTipspurchasing_list["English"]["header"] = "";
	$placeHolderspurchasing_list["English"]["header"] = "";
	$fieldLabelspurchasing_list["English"]["footer"] = "Footer";
	$fieldToolTipspurchasing_list["English"]["footer"] = "";
	$placeHolderspurchasing_list["English"]["footer"] = "";
	$fieldLabelspurchasing_list["English"]["hot_line"] = "Hot Line";
	$fieldToolTipspurchasing_list["English"]["hot_line"] = "";
	$placeHolderspurchasing_list["English"]["hot_line"] = "";
	$fieldLabelspurchasing_list["English"]["h"] = "H";
	$fieldToolTipspurchasing_list["English"]["h"] = "";
	$placeHolderspurchasing_list["English"]["h"] = "";
	$fieldLabelspurchasing_list["English"]["f"] = "F";
	$fieldToolTipspurchasing_list["English"]["f"] = "";
	$placeHolderspurchasing_list["English"]["f"] = "";
	$fieldLabelspurchasing_list["English"]["paid"] = "Paid";
	$fieldToolTipspurchasing_list["English"]["paid"] = "";
	$placeHolderspurchasing_list["English"]["paid"] = "";
	$fieldLabelspurchasing_list["English"]["advance_id"] = "Advance Id";
	$fieldToolTipspurchasing_list["English"]["advance_id"] = "";
	$placeHolderspurchasing_list["English"]["advance_id"] = "";
	$fieldLabelspurchasing_list["English"]["status"] = "Status";
	$fieldToolTipspurchasing_list["English"]["status"] = "";
	$placeHolderspurchasing_list["English"]["status"] = "";
	$fieldLabelspurchasing_list["English"]["left_advance"] = "Left Advance";
	$fieldToolTipspurchasing_list["English"]["left_advance"] = "";
	$placeHolderspurchasing_list["English"]["left_advance"] = "";
	$fieldLabelspurchasing_list["English"]["details"] = "Details";
	$fieldToolTipspurchasing_list["English"]["details"] = "";
	$placeHolderspurchasing_list["English"]["details"] = "";
	$fieldLabelspurchasing_list["English"]["supplier_id"] = "Supplier Id";
	$fieldToolTipspurchasing_list["English"]["supplier_id"] = "";
	$placeHolderspurchasing_list["English"]["supplier_id"] = "";
	$fieldLabelspurchasing_list["English"]["total_amount"] = "Total Amount";
	$fieldToolTipspurchasing_list["English"]["total_amount"] = "";
	$placeHolderspurchasing_list["English"]["total_amount"] = "";
	$fieldLabelspurchasing_list["English"]["left"] = "Left";
	$fieldToolTipspurchasing_list["English"]["left"] = "";
	$placeHolderspurchasing_list["English"]["left"] = "";
	$fieldLabelspurchasing_list["English"]["user2"] = "User2";
	$fieldToolTipspurchasing_list["English"]["user2"] = "";
	$placeHolderspurchasing_list["English"]["user2"] = "";
	if (count($fieldToolTipspurchasing_list["English"]))
		$tdatapurchasing_list[".isUseToolTips"] = true;
}


	$tdatapurchasing_list[".NCSearch"] = true;



$tdatapurchasing_list[".shortTableName"] = "purchasing_list";
$tdatapurchasing_list[".nSecOptions"] = 1;

$tdatapurchasing_list[".mainTableOwnerID"] = "user";
$tdatapurchasing_list[".entityType"] = 1;
$tdatapurchasing_list[".connId"] = "test2_at_localhost";


$tdatapurchasing_list[".strOriginalTableName"] = "purchasing";

	



$tdatapurchasing_list[".showAddInPopup"] = false;

$tdatapurchasing_list[".showEditInPopup"] = false;

$tdatapurchasing_list[".showViewInPopup"] = false;

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


	$tdatapurchasing_list[".listAjax"] = true;
//	temporary
$tdatapurchasing_list[".listAjax"] = false;

	$tdatapurchasing_list[".audit"] = true;

	$tdatapurchasing_list[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatapurchasing_list[".isUseAjaxSuggest"] = true;

$tdatapurchasing_list[".rowHighlite"] = true;



																																																			

$tdatapurchasing_list[".ajaxCodeSnippetAdded"] = false;

$tdatapurchasing_list[".buttonsAdded"] = false;

$tdatapurchasing_list[".addPageEvents"] = true;

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


$tdatapurchasing_list[".badgeColor"] = "CD853F";


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

$tdatapurchasing_list[".googleLikeFields"] = array();
$tdatapurchasing_list[".googleLikeFields"][] = "id";
$tdatapurchasing_list[".googleLikeFields"][] = "date_and_time";
$tdatapurchasing_list[".googleLikeFields"][] = "supplier";
$tdatapurchasing_list[".googleLikeFields"][] = "tt";
$tdatapurchasing_list[".googleLikeFields"][] = "branch_code";
$tdatapurchasing_list[".googleLikeFields"][] = "user";
$tdatapurchasing_list[".googleLikeFields"][] = "outlet_code";
$tdatapurchasing_list[".googleLikeFields"][] = "payment";
$tdatapurchasing_list[".googleLikeFields"][] = "h";
$tdatapurchasing_list[".googleLikeFields"][] = "company_name";
$tdatapurchasing_list[".googleLikeFields"][] = "address_line_1";
$tdatapurchasing_list[".googleLikeFields"][] = "address_line_2";
$tdatapurchasing_list[".googleLikeFields"][] = "Fax";
$tdatapurchasing_list[".googleLikeFields"][] = "email";
$tdatapurchasing_list[".googleLikeFields"][] = "logo";
$tdatapurchasing_list[".googleLikeFields"][] = "header";
$tdatapurchasing_list[".googleLikeFields"][] = "footer";
$tdatapurchasing_list[".googleLikeFields"][] = "hot_line";
$tdatapurchasing_list[".googleLikeFields"][] = "f";
$tdatapurchasing_list[".googleLikeFields"][] = "advance_id";
$tdatapurchasing_list[".googleLikeFields"][] = "status";
$tdatapurchasing_list[".googleLikeFields"][] = "left_advance";
$tdatapurchasing_list[".googleLikeFields"][] = "details";
$tdatapurchasing_list[".googleLikeFields"][] = "supplier_id";
$tdatapurchasing_list[".googleLikeFields"][] = "paid";
$tdatapurchasing_list[".googleLikeFields"][] = "total_amount";
$tdatapurchasing_list[".googleLikeFields"][] = "left";
$tdatapurchasing_list[".googleLikeFields"][] = "user2";



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

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

$tdatapurchasing_list[".nPrinterSplitRecords"] = 40;

$tdatapurchasing_list[".geocodingEnabled"] = false;





$tdatapurchasing_list[".isResizeColumns"] = true;





$tdatapurchasing_list[".pageSize"] = 20;

$tdatapurchasing_list[".warnLeavingPages"] = true;



$tstrOrderBy = "ORDER BY purchasing.id  DESC";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatapurchasing_list[".strOrderBy"] = $tstrOrderBy;

$tdatapurchasing_list[".orderindexes"] = array();
	$tdatapurchasing_list[".orderindexes"][] = array(1, (0 ? "ASC" : "DESC"), "purchasing.id");



$tdatapurchasing_list[".sqlHead"] = "SELECT purchasing.id,  purchasing.date_and_time,  purchasing.supplier,  purchasing.tt,  purchasing.branch_code,  purchasing.`user`,  purchasing.outlet_code,  purchasing.payment,  purchasing.h,  company_profile.company_name,  company_profile.address_line_1,  company_profile.address_line_2,  company_profile.Fax,  company_profile.email,  company_profile.logo,  company_profile.header,  company_profile.footer,  company_profile.hot_line,  purchasing.f,`advance_id`, `status`, `left_advance`, `details`, `supplier_id`,  (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) as \"paid\" ,  ifnull(sold.sol,0) AS \"total_amount\",  ifnull(case when (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))  < (ifnull(sold.sol,0)) then  ( (ifnull(sold.sol,0)) - (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) )end,0) as \"left\",user2";
$tdatapurchasing_list[".sqlFrom"] = "FROM purchasing    LEFT JOIN (select `pur_id`,sum(`sub_total`) as sol from purchasing_details where 1 group by `pur_id` ) as sold on purchasing.`id` = sold.`pur_id`  left join (SELECT `pur_id`,SUM(`amount`) as pur from payment_for_pur group by `pur_id`) as purch on purchasing.id = purch.pur_id    left join (SELECT pur_id ,SUM(`amount`) as pur2 from supplier_advance_cut group by pur_id) as purch2 on purchasing.id = purch2.pur_id    LEFT OUTER JOIN sys_manage ON purchasing.`user` = sys_manage.username  INNER JOIN company_profile ON sys_manage.outlet_code = company_profile.id";
$tdatapurchasing_list[".sqlWhereExpr"] = "";
$tdatapurchasing_list[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatapurchasing_list[".arrGridTabs"] = $arrGridTabs;









//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;
$tdatapurchasing_list[".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;
$tdatapurchasing_list[".arrGroupsPerPage"] = $arrGPP;

$tdatapurchasing_list[".highlightSearchResults"] = true;

$tableKeyspurchasing_list = array();
$tableKeyspurchasing_list[] = "id";
$tdatapurchasing_list[".Keys"] = $tableKeyspurchasing_list;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.id";

	
	
				$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


	$tdatapurchasing_list["id"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "id";
//	date_and_time
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "date_and_time";
	$fdata["GoodName"] = "date_and_time";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","date_and_time");
	$fdata["FieldType"] = 135;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.date_and_time";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$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" => "Invalid week day", "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();
	
		$edata["autoUpdatable"] = true;

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


	$tdatapurchasing_list["date_and_time"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "date_and_time";
//	supplier
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "supplier";
	$fdata["GoodName"] = "supplier";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","supplier");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.supplier";

	
	
				$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;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["export"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["masterlist"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["masterprint"] = $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;
	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "advances_to_supplier1";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"advance_id", 'lookupF'=>"advance_id");
	$edata["autoCompleteFields"][] = array('masterF'=>"left_advance", 'lookupF'=>"left");
	$edata["autoCompleteFields"][] = array('masterF'=>"details", 'lookupF'=>"details");
	$edata["autoCompleteFields"][] = array('masterF'=>"supplier_id", 'lookupF'=>"id");
	$edata["LCType"] = 1;

	
		
	$edata["LinkField"] = "unic_id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "supplier_name";

	

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

	
	
	
	

	
	
	
// End Lookup Settings


	
	
	
	
			$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"]["add"] = $edata;
	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

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

	
		
	$edata["LinkField"] = "unic_id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "supplier_name";

	

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

	
	
	
	

	
	
	
// End Lookup Settings


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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	//	End validation

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


	$fdata["isSeparate"] = true;




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


	$tdatapurchasing_list["supplier"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "supplier";
//	tt
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "tt";
	$fdata["GoodName"] = "tt";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","tt");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.tt";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["tt"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "tt";
//	branch_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "branch_code";
	$fdata["GoodName"] = "branch_code";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","branch_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.branch_code";

	
	
				$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();
	
		$edata["autoUpdatable"] = true;

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


	$tdatapurchasing_list["branch_code"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "branch_code";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.`user`";

	
	
				$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


	$tdatapurchasing_list["user"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "user";
//	outlet_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "outlet_code";
	$fdata["GoodName"] = "outlet_code";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","outlet_code");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.outlet_code";

	
	
				$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();
							
		$edata["autoUpdatable"] = true;

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


	$tdatapurchasing_list["outlet_code"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "outlet_code";
//	payment
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "payment";
	$fdata["GoodName"] = "payment";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","payment");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.payment";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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


	$tdatapurchasing_list["payment"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "payment";
//	h
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "h";
	$fdata["GoodName"] = "h";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","h");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.h";

	
	
				$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


	$tdatapurchasing_list["h"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "h";
//	company_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "company_name";
	$fdata["GoodName"] = "company_name";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","company_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.company_name";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["company_name"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "company_name";
//	address_line_1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "address_line_1";
	$fdata["GoodName"] = "address_line_1";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","address_line_1");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.address_line_1";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["address_line_1"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "address_line_1";
//	address_line_2
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "address_line_2";
	$fdata["GoodName"] = "address_line_2";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","address_line_2");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.address_line_2";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["address_line_2"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "address_line_2";
//	Fax
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "Fax";
	$fdata["GoodName"] = "Fax";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","Fax");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.Fax";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["Fax"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "Fax";
//	email
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "email";
	$fdata["GoodName"] = "email";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","email");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.email";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["email"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "email";
//	logo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "logo";
	$fdata["GoodName"] = "logo";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","logo");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.logo";

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

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

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

	
	
				$vdata["ImageWidth"] = 150;
	$vdata["ImageHeight"] = 75;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

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


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

	$fdata["ViewFormats"]["view"] = $vdata;
	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

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

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


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

	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

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

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


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

	$fdata["ViewFormats"]["export"] = $vdata;
	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

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

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


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

	$fdata["ViewFormats"]["masterlist"] = $vdata;
	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

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

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


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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
	$edata = array("EditFormat" => "Document upload");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	
			
	
	
	
	$fdata["EditFormats"]["add"] = $edata;
	$edata = array("EditFormat" => "Document upload");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = true;




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


	$tdatapurchasing_list["logo"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "logo";
//	header
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "header";
	$fdata["GoodName"] = "header";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","header");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.header";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["header"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "header";
//	footer
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "footer";
	$fdata["GoodName"] = "footer";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","footer");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.footer";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["footer"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "footer";
//	hot_line
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "hot_line";
	$fdata["GoodName"] = "hot_line";
	$fdata["ownerTable"] = "company_profile";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","hot_line");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "company_profile.hot_line";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapurchasing_list["hot_line"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "hot_line";
//	f
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "f";
	$fdata["GoodName"] = "f";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","f");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "purchasing.f";

	
	
				$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


	$tdatapurchasing_list["f"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "f";
//	advance_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 20;
	$fdata["strName"] = "advance_id";
	$fdata["GoodName"] = "advance_id";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","advance_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`advance_id`";

	
	
				$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


	$tdatapurchasing_list["advance_id"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "advance_id";
//	status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 21;
	$fdata["strName"] = "status";
	$fdata["GoodName"] = "status";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","status");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`status`";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "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();
	
		$edata["autoUpdatable"] = true;

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


	$tdatapurchasing_list["status"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "status";
//	left_advance
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 22;
	$fdata["strName"] = "left_advance";
	$fdata["GoodName"] = "left_advance";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","left_advance");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`left_advance`";

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


	$tdatapurchasing_list["left_advance"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "left_advance";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 23;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`details`";

	
	
				$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


	$tdatapurchasing_list["details"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "details";
//	supplier_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 24;
	$fdata["strName"] = "supplier_id";
	$fdata["GoodName"] = "supplier_id";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","supplier_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`supplier_id`";

	
	
				$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


	$tdatapurchasing_list["supplier_id"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "supplier_id";
//	paid
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 25;
	$fdata["strName"] = "paid";
	$fdata["GoodName"] = "paid";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","paid");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))";

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


	$tdatapurchasing_list["paid"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "paid";
//	total_amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 26;
	$fdata["strName"] = "total_amount";
	$fdata["GoodName"] = "total_amount";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","total_amount");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "ifnull(sold.sol,0)";

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


	$tdatapurchasing_list["total_amount"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "total_amount";
//	left
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 27;
	$fdata["strName"] = "left";
	$fdata["GoodName"] = "left";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","left");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "ifnull(case when (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))  < (ifnull(sold.sol,0)) then  ( (ifnull(sold.sol,0)) - (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) )end,0)";

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


	$tdatapurchasing_list["left"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "left";
//	user2
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 28;
	$fdata["strName"] = "user2";
	$fdata["GoodName"] = "user2";
	$fdata["ownerTable"] = "purchasing";
	$fdata["Label"] = GetFieldLabel("Purchasing_List","user2");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "user2";

	
	
				$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;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["export"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["masterlist"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["masterprint"] = $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();
	
		$edata["autoUpdatable"] = true;

	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
	$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"]["add"] = $edata;
	$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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = true;




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


	$tdatapurchasing_list["user2"] = $fdata;
		$tdatapurchasing_list[".searchableFields"][] = "user2";


$tables_data["Purchasing List"]=&$tdatapurchasing_list;
$field_labels["Purchasing_List"] = &$fieldLabelspurchasing_list;
$fieldToolTips["Purchasing_List"] = &$fieldToolTipspurchasing_list;
$placeHolders["Purchasing_List"] = &$placeHolderspurchasing_list;
$page_titles["Purchasing_List"] = &$pageTitlespurchasing_list;

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

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



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


		
	$detailsTablesData["Purchasing List"][$dIndex] = $detailsParam;

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

	$detailsTablesData["Purchasing List"][$dIndex]["masterKeys"][]="id";

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

	$detailsTablesData["Purchasing List"][$dIndex]["detailKeys"][]="pur_id";
//	supplier_advance_cut
	
	

		$dIndex = 1;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="supplier_advance_cut";
		$detailsParam["dOriginalTable"] = "supplier_advance_cut";



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


		
	$detailsTablesData["Purchasing List"][$dIndex] = $detailsParam;

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

	$detailsTablesData["Purchasing List"][$dIndex]["masterKeys"][]="id";

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

	$detailsTablesData["Purchasing List"][$dIndex]["detailKeys"][]="pur_id";
//	purchasing_details
	
	

		$dIndex = 2;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="purchasing_details";
		$detailsParam["dOriginalTable"] = "purchasing_details";



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


		
	$detailsTablesData["Purchasing List"][$dIndex] = $detailsParam;

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

	$detailsTablesData["Purchasing List"][$dIndex]["masterKeys"][]="id";

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

	$detailsTablesData["Purchasing List"][$dIndex]["detailKeys"][]="pur_id";

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



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



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











function createSqlQuery_purchasing_list()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "purchasing.id,  purchasing.date_and_time,  purchasing.supplier,  purchasing.tt,  purchasing.branch_code,  purchasing.`user`,  purchasing.outlet_code,  purchasing.payment,  purchasing.h,  company_profile.company_name,  company_profile.address_line_1,  company_profile.address_line_2,  company_profile.Fax,  company_profile.email,  company_profile.logo,  company_profile.header,  company_profile.footer,  company_profile.hot_line,  purchasing.f,`advance_id`, `status`, `left_advance`, `details`, `supplier_id`,  (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) as \"paid\" ,  ifnull(sold.sol,0) AS \"total_amount\",  ifnull(case when (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))  < (ifnull(sold.sol,0)) then  ( (ifnull(sold.sol,0)) - (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) )end,0) as \"left\",user2";
$proto0["m_strFrom"] = "FROM purchasing    LEFT JOIN (select `pur_id`,sum(`sub_total`) as sol from purchasing_details where 1 group by `pur_id` ) as sold on purchasing.`id` = sold.`pur_id`  left join (SELECT `pur_id`,SUM(`amount`) as pur from payment_for_pur group by `pur_id`) as purch on purchasing.id = purch.pur_id    left join (SELECT pur_id ,SUM(`amount`) as pur2 from supplier_advance_cut group by pur_id) as purch2 on purchasing.id = purch2.pur_id    LEFT OUTER JOIN sys_manage ON purchasing.`user` = sys_manage.username  INNER JOIN company_profile ON sys_manage.outlet_code = company_profile.id";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY purchasing.id  DESC";
	
		;
			$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" => "id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto6["m_sql"] = "purchasing.id";
$proto6["m_srcTableName"] = "Purchasing List";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "date_and_time",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto8["m_sql"] = "purchasing.date_and_time";
$proto8["m_srcTableName"] = "Purchasing List";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "supplier",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto10["m_sql"] = "purchasing.supplier";
$proto10["m_srcTableName"] = "Purchasing List";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "tt",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto12["m_sql"] = "purchasing.tt";
$proto12["m_srcTableName"] = "Purchasing List";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "branch_code",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto14["m_sql"] = "purchasing.branch_code";
$proto14["m_srcTableName"] = "Purchasing List";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "user",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto16["m_sql"] = "purchasing.`user`";
$proto16["m_srcTableName"] = "Purchasing List";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto18["m_sql"] = "purchasing.outlet_code";
$proto18["m_srcTableName"] = "Purchasing List";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "payment",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto20["m_sql"] = "purchasing.payment";
$proto20["m_srcTableName"] = "Purchasing List";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "h",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto22["m_sql"] = "purchasing.h";
$proto22["m_srcTableName"] = "Purchasing List";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "company_name",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto24["m_sql"] = "company_profile.company_name";
$proto24["m_srcTableName"] = "Purchasing List";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "address_line_1",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto26["m_sql"] = "company_profile.address_line_1";
$proto26["m_srcTableName"] = "Purchasing List";
$proto26["m_expr"]=$obj;
$proto26["m_alias"] = "";
$obj = new SQLFieldListItem($proto26);

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "address_line_2",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto28["m_sql"] = "company_profile.address_line_2";
$proto28["m_srcTableName"] = "Purchasing List";
$proto28["m_expr"]=$obj;
$proto28["m_alias"] = "";
$obj = new SQLFieldListItem($proto28);

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLField(array(
	"m_strName" => "Fax",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto30["m_sql"] = "company_profile.Fax";
$proto30["m_srcTableName"] = "Purchasing List";
$proto30["m_expr"]=$obj;
$proto30["m_alias"] = "";
$obj = new SQLFieldListItem($proto30);

$proto0["m_fieldlist"][]=$obj;
						$proto32=array();
			$obj = new SQLField(array(
	"m_strName" => "email",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto32["m_sql"] = "company_profile.email";
$proto32["m_srcTableName"] = "Purchasing List";
$proto32["m_expr"]=$obj;
$proto32["m_alias"] = "";
$obj = new SQLFieldListItem($proto32);

$proto0["m_fieldlist"][]=$obj;
						$proto34=array();
			$obj = new SQLField(array(
	"m_strName" => "logo",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto34["m_sql"] = "company_profile.logo";
$proto34["m_srcTableName"] = "Purchasing List";
$proto34["m_expr"]=$obj;
$proto34["m_alias"] = "";
$obj = new SQLFieldListItem($proto34);

$proto0["m_fieldlist"][]=$obj;
						$proto36=array();
			$obj = new SQLField(array(
	"m_strName" => "header",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto36["m_sql"] = "company_profile.header";
$proto36["m_srcTableName"] = "Purchasing List";
$proto36["m_expr"]=$obj;
$proto36["m_alias"] = "";
$obj = new SQLFieldListItem($proto36);

$proto0["m_fieldlist"][]=$obj;
						$proto38=array();
			$obj = new SQLField(array(
	"m_strName" => "footer",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto38["m_sql"] = "company_profile.footer";
$proto38["m_srcTableName"] = "Purchasing List";
$proto38["m_expr"]=$obj;
$proto38["m_alias"] = "";
$obj = new SQLFieldListItem($proto38);

$proto0["m_fieldlist"][]=$obj;
						$proto40=array();
			$obj = new SQLField(array(
	"m_strName" => "hot_line",
	"m_strTable" => "company_profile",
	"m_srcTableName" => "Purchasing List"
));

$proto40["m_sql"] = "company_profile.hot_line";
$proto40["m_srcTableName"] = "Purchasing List";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "";
$obj = new SQLFieldListItem($proto40);

$proto0["m_fieldlist"][]=$obj;
						$proto42=array();
			$obj = new SQLField(array(
	"m_strName" => "f",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto42["m_sql"] = "purchasing.f";
$proto42["m_srcTableName"] = "Purchasing List";
$proto42["m_expr"]=$obj;
$proto42["m_alias"] = "";
$obj = new SQLFieldListItem($proto42);

$proto0["m_fieldlist"][]=$obj;
						$proto44=array();
			$obj = new SQLField(array(
	"m_strName" => "advance_id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto44["m_sql"] = "`advance_id`";
$proto44["m_srcTableName"] = "Purchasing List";
$proto44["m_expr"]=$obj;
$proto44["m_alias"] = "";
$obj = new SQLFieldListItem($proto44);

$proto0["m_fieldlist"][]=$obj;
						$proto46=array();
			$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto46["m_sql"] = "`status`";
$proto46["m_srcTableName"] = "Purchasing List";
$proto46["m_expr"]=$obj;
$proto46["m_alias"] = "";
$obj = new SQLFieldListItem($proto46);

$proto0["m_fieldlist"][]=$obj;
						$proto48=array();
			$obj = new SQLField(array(
	"m_strName" => "left_advance",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto48["m_sql"] = "`left_advance`";
$proto48["m_srcTableName"] = "Purchasing List";
$proto48["m_expr"]=$obj;
$proto48["m_alias"] = "";
$obj = new SQLFieldListItem($proto48);

$proto0["m_fieldlist"][]=$obj;
						$proto50=array();
			$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto50["m_sql"] = "`details`";
$proto50["m_srcTableName"] = "Purchasing List";
$proto50["m_expr"]=$obj;
$proto50["m_alias"] = "";
$obj = new SQLFieldListItem($proto50);

$proto0["m_fieldlist"][]=$obj;
						$proto52=array();
			$obj = new SQLField(array(
	"m_strName" => "supplier_id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto52["m_sql"] = "`supplier_id`";
$proto52["m_srcTableName"] = "Purchasing List";
$proto52["m_expr"]=$obj;
$proto52["m_alias"] = "";
$obj = new SQLFieldListItem($proto52);

$proto0["m_fieldlist"][]=$obj;
						$proto54=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))"
));

$proto54["m_sql"] = "(ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))";
$proto54["m_srcTableName"] = "Purchasing List";
$proto54["m_expr"]=$obj;
$proto54["m_alias"] = "paid";
$obj = new SQLFieldListItem($proto54);

$proto0["m_fieldlist"][]=$obj;
						$proto56=array();
			$proto57=array();
$proto57["m_functiontype"] = "SQLF_CUSTOM";
$proto57["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "sold.sol"
));

$proto57["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "0"
));

$proto57["m_arguments"][]=$obj;
$proto57["m_strFunctionName"] = "ifnull";
$obj = new SQLFunctionCall($proto57);

$proto56["m_sql"] = "ifnull(sold.sol,0)";
$proto56["m_srcTableName"] = "Purchasing List";
$proto56["m_expr"]=$obj;
$proto56["m_alias"] = "total_amount";
$obj = new SQLFieldListItem($proto56);

$proto0["m_fieldlist"][]=$obj;
						$proto60=array();
			$proto61=array();
$proto61["m_functiontype"] = "SQLF_CUSTOM";
$proto61["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "case when (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))  < (ifnull(sold.sol,0)) then  ( (ifnull(sold.sol,0)) - (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) )end"
));

$proto61["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "0"
));

$proto61["m_arguments"][]=$obj;
$proto61["m_strFunctionName"] = "ifnull";
$obj = new SQLFunctionCall($proto61);

$proto60["m_sql"] = "ifnull(case when (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0))  < (ifnull(sold.sol,0)) then  ( (ifnull(sold.sol,0)) - (ifnull(purch.pur,0)+ ifnull(purch2.pur2,0)) )end,0)";
$proto60["m_srcTableName"] = "Purchasing List";
$proto60["m_expr"]=$obj;
$proto60["m_alias"] = "left";
$obj = new SQLFieldListItem($proto60);

$proto0["m_fieldlist"][]=$obj;
						$proto64=array();
			$obj = new SQLField(array(
	"m_strName" => "user2",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto64["m_sql"] = "user2";
$proto64["m_srcTableName"] = "Purchasing List";
$proto64["m_expr"]=$obj;
$proto64["m_alias"] = "";
$obj = new SQLFieldListItem($proto64);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto66=array();
$proto66["m_link"] = "SQLL_MAIN";
			$proto67=array();
$proto67["m_strName"] = "purchasing";
$proto67["m_srcTableName"] = "Purchasing List";
$proto67["m_columns"] = array();
$proto67["m_columns"][] = "id";
$proto67["m_columns"][] = "date_and_time";
$proto67["m_columns"][] = "supplier";
$proto67["m_columns"][] = "tt";
$proto67["m_columns"][] = "branch_code";
$proto67["m_columns"][] = "user";
$proto67["m_columns"][] = "outlet_code";
$proto67["m_columns"][] = "payment";
$proto67["m_columns"][] = "h";
$proto67["m_columns"][] = "f";
$proto67["m_columns"][] = "advance_id";
$proto67["m_columns"][] = "status";
$proto67["m_columns"][] = "left_advance";
$proto67["m_columns"][] = "details";
$proto67["m_columns"][] = "supplier_id";
$proto67["m_columns"][] = "paid";
$proto67["m_columns"][] = "total_amount";
$proto67["m_columns"][] = "left";
$proto67["m_columns"][] = "user2";
$obj = new SQLTable($proto67);

$proto66["m_table"] = $obj;
$proto66["m_sql"] = "purchasing";
$proto66["m_alias"] = "";
$proto66["m_srcTableName"] = "Purchasing List";
$proto68=array();
$proto68["m_sql"] = "";
$proto68["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto70=array();
$proto70["m_link"] = "SQLL_LEFTJOIN";
			$proto71=array();
$proto71["m_strHead"] = "select";
$proto71["m_strFieldList"] = "`pur_id`,sum(`sub_total`) as sol";
$proto71["m_strFrom"] = "from purchasing_details";
$proto71["m_strWhere"] = "1";
$proto71["m_strOrderBy"] = "";
	
		;
			$proto71["cipherer"] = null;
$proto73=array();
$proto73["m_sql"] = "1";
$proto73["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLNonParsed(array(
	"m_sql" => "1"
));

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

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

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

$proto71["m_having"] = $obj;
$proto71["m_fieldlist"] = array();
						$proto77=array();
			$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "purchasing_details",
	"m_srcTableName" => "Purchasing List"
));

$proto77["m_sql"] = "`pur_id`";
$proto77["m_srcTableName"] = "Purchasing List";
$proto77["m_expr"]=$obj;
$proto77["m_alias"] = "";
$obj = new SQLFieldListItem($proto77);

$proto71["m_fieldlist"][]=$obj;
						$proto79=array();
			$proto80=array();
$proto80["m_functiontype"] = "SQLF_SUM";
$proto80["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "sub_total",
	"m_strTable" => "purchasing_details",
	"m_srcTableName" => "Purchasing List"
));

$proto80["m_arguments"][]=$obj;
$proto80["m_strFunctionName"] = "sum";
$obj = new SQLFunctionCall($proto80);

$proto79["m_sql"] = "sum(`sub_total`)";
$proto79["m_srcTableName"] = "Purchasing List";
$proto79["m_expr"]=$obj;
$proto79["m_alias"] = "sol";
$obj = new SQLFieldListItem($proto79);

$proto71["m_fieldlist"][]=$obj;
$proto71["m_fromlist"] = array();
												$proto82=array();
$proto82["m_link"] = "SQLL_MAIN";
			$proto83=array();
$proto83["m_strName"] = "purchasing_details";
$proto83["m_srcTableName"] = "Purchasing List";
$proto83["m_columns"] = array();
$proto83["m_columns"][] = "id";
$proto83["m_columns"][] = "pur_id";
$proto83["m_columns"][] = "bar_code";
$proto83["m_columns"][] = "unit";
$proto83["m_columns"][] = "gross";
$proto83["m_columns"][] = "price";
$proto83["m_columns"][] = "tar";
$proto83["m_columns"][] = "net";
$proto83["m_columns"][] = "sub_total";
$proto83["m_columns"][] = "stock_rece_code";
$proto83["m_columns"][] = "stock_send_code";
$proto83["m_columns"][] = "product";
$proto83["m_columns"][] = "details";
$proto83["m_columns"][] = "package_details";
$proto83["m_columns"][] = "cstatus";
$proto83["m_columns"][] = "outlet_code";
$proto83["m_columns"][] = "user";
$obj = new SQLTable($proto83);

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

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

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

$proto71["m_fromlist"][]=$obj;
$proto71["m_groupby"] = array();
												$proto86=array();
						$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "purchasing_details",
	"m_srcTableName" => "Purchasing List"
));

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

$proto71["m_groupby"][]=$obj;
$proto71["m_orderby"] = array();
$proto71["m_srcTableName"]="Purchasing List";		
$obj = new SQLQuery($proto71);

$proto70["m_table"] = $obj;
$proto70["m_sql"] = "LEFT JOIN (select `pur_id`,sum(`sub_total`) as sol from purchasing_details where 1 group by `pur_id` ) as sold on purchasing.`id` = sold.`pur_id`";
$proto70["m_alias"] = "sold";
$proto70["m_srcTableName"] = "Purchasing List";
$proto88=array();
$proto88["m_sql"] = "purchasing.`id` = sold.`pur_id`";
$proto88["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto90=array();
$proto90["m_link"] = "SQLL_LEFTJOIN";
			$proto91=array();
$proto91["m_strHead"] = "SELECT";
$proto91["m_strFieldList"] = "`pur_id`,SUM(`amount`) as pur";
$proto91["m_strFrom"] = "from payment_for_pur";
$proto91["m_strWhere"] = "";
$proto91["m_strOrderBy"] = "";
	
		;
			$proto91["cipherer"] = null;
$proto93=array();
$proto93["m_sql"] = "";
$proto93["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto91["m_having"] = $obj;
$proto91["m_fieldlist"] = array();
						$proto97=array();
			$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "Purchasing List"
));

$proto97["m_sql"] = "`pur_id`";
$proto97["m_srcTableName"] = "Purchasing List";
$proto97["m_expr"]=$obj;
$proto97["m_alias"] = "";
$obj = new SQLFieldListItem($proto97);

$proto91["m_fieldlist"][]=$obj;
						$proto99=array();
			$proto100=array();
$proto100["m_functiontype"] = "SQLF_SUM";
$proto100["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "Purchasing List"
));

$proto100["m_arguments"][]=$obj;
$proto100["m_strFunctionName"] = "SUM";
$obj = new SQLFunctionCall($proto100);

$proto99["m_sql"] = "SUM(`amount`)";
$proto99["m_srcTableName"] = "Purchasing List";
$proto99["m_expr"]=$obj;
$proto99["m_alias"] = "pur";
$obj = new SQLFieldListItem($proto99);

$proto91["m_fieldlist"][]=$obj;
$proto91["m_fromlist"] = array();
												$proto102=array();
$proto102["m_link"] = "SQLL_MAIN";
			$proto103=array();
$proto103["m_strName"] = "payment_for_pur";
$proto103["m_srcTableName"] = "Purchasing List";
$proto103["m_columns"] = array();
$proto103["m_columns"][] = "id";
$proto103["m_columns"][] = "pur_id";
$proto103["m_columns"][] = "amount";
$proto103["m_columns"][] = "payment_type";
$proto103["m_columns"][] = "cheque_number";
$proto103["m_columns"][] = "cheque_date";
$proto103["m_columns"][] = "date_time";
$proto103["m_columns"][] = "outlet_code";
$proto103["m_columns"][] = "branch_code";
$proto103["m_columns"][] = "user";
$proto103["m_columns"][] = "details";
$proto103["m_columns"][] = "should_pay";
$proto103["m_columns"][] = "expen_code";
$proto103["m_columns"][] = "salary_advance";
$proto103["m_columns"][] = "salary";
$proto103["m_columns"][] = "acc_no";
$proto103["m_columns"][] = "loan_no";
$obj = new SQLTable($proto103);

$proto102["m_table"] = $obj;
$proto102["m_sql"] = "payment_for_pur";
$proto102["m_alias"] = "";
$proto102["m_srcTableName"] = "Purchasing List";
$proto104=array();
$proto104["m_sql"] = "";
$proto104["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto91["m_fromlist"][]=$obj;
$proto91["m_groupby"] = array();
												$proto106=array();
						$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "Purchasing List"
));

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

$proto91["m_groupby"][]=$obj;
$proto91["m_orderby"] = array();
$proto91["m_srcTableName"]="Purchasing List";		
$obj = new SQLQuery($proto91);

$proto90["m_table"] = $obj;
$proto90["m_sql"] = "left join (SELECT `pur_id`,SUM(`amount`) as pur from payment_for_pur group by `pur_id`) as purch on purchasing.id = purch.pur_id";
$proto90["m_alias"] = "purch";
$proto90["m_srcTableName"] = "Purchasing List";
$proto108=array();
$proto108["m_sql"] = "purchasing.id = purch.pur_id";
$proto108["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto108["m_column"]=$obj;
$proto108["m_contained"] = array();
$proto108["m_strCase"] = "= purch.pur_id";
$proto108["m_havingmode"] = false;
$proto108["m_inBrackets"] = false;
$proto108["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto108);

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

$proto0["m_fromlist"][]=$obj;
												$proto110=array();
$proto110["m_link"] = "SQLL_LEFTJOIN";
			$proto111=array();
$proto111["m_strHead"] = "SELECT";
$proto111["m_strFieldList"] = "pur_id ,SUM(`amount`) as pur2";
$proto111["m_strFrom"] = "from supplier_advance_cut";
$proto111["m_strWhere"] = "";
$proto111["m_strOrderBy"] = "";
	
		;
			$proto111["cipherer"] = null;
$proto113=array();
$proto113["m_sql"] = "";
$proto113["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto111["m_having"] = $obj;
$proto111["m_fieldlist"] = array();
						$proto117=array();
			$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "supplier_advance_cut",
	"m_srcTableName" => "Purchasing List"
));

$proto117["m_sql"] = "pur_id";
$proto117["m_srcTableName"] = "Purchasing List";
$proto117["m_expr"]=$obj;
$proto117["m_alias"] = "";
$obj = new SQLFieldListItem($proto117);

$proto111["m_fieldlist"][]=$obj;
						$proto119=array();
			$proto120=array();
$proto120["m_functiontype"] = "SQLF_SUM";
$proto120["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "supplier_advance_cut",
	"m_srcTableName" => "Purchasing List"
));

$proto120["m_arguments"][]=$obj;
$proto120["m_strFunctionName"] = "SUM";
$obj = new SQLFunctionCall($proto120);

$proto119["m_sql"] = "SUM(`amount`)";
$proto119["m_srcTableName"] = "Purchasing List";
$proto119["m_expr"]=$obj;
$proto119["m_alias"] = "pur2";
$obj = new SQLFieldListItem($proto119);

$proto111["m_fieldlist"][]=$obj;
$proto111["m_fromlist"] = array();
												$proto122=array();
$proto122["m_link"] = "SQLL_MAIN";
			$proto123=array();
$proto123["m_strName"] = "supplier_advance_cut";
$proto123["m_srcTableName"] = "Purchasing List";
$proto123["m_columns"] = array();
$proto123["m_columns"][] = "id";
$proto123["m_columns"][] = "advance_id";
$proto123["m_columns"][] = "amount";
$proto123["m_columns"][] = "date_time";
$proto123["m_columns"][] = "pur_id";
$proto123["m_columns"][] = "max_amount";
$obj = new SQLTable($proto123);

$proto122["m_table"] = $obj;
$proto122["m_sql"] = "supplier_advance_cut";
$proto122["m_alias"] = "";
$proto122["m_srcTableName"] = "Purchasing List";
$proto124=array();
$proto124["m_sql"] = "";
$proto124["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto111["m_fromlist"][]=$obj;
$proto111["m_groupby"] = array();
												$proto126=array();
						$obj = new SQLField(array(
	"m_strName" => "pur_id",
	"m_strTable" => "supplier_advance_cut",
	"m_srcTableName" => "Purchasing List"
));

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

$proto111["m_groupby"][]=$obj;
$proto111["m_orderby"] = array();
$proto111["m_srcTableName"]="Purchasing List";		
$obj = new SQLQuery($proto111);

$proto110["m_table"] = $obj;
$proto110["m_sql"] = "left join (SELECT pur_id ,SUM(`amount`) as pur2 from supplier_advance_cut group by pur_id) as purch2 on purchasing.id = purch2.pur_id";
$proto110["m_alias"] = "purch2";
$proto110["m_srcTableName"] = "Purchasing List";
$proto128=array();
$proto128["m_sql"] = "purchasing.id = purch2.pur_id";
$proto128["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto128["m_column"]=$obj;
$proto128["m_contained"] = array();
$proto128["m_strCase"] = "= purch2.pur_id";
$proto128["m_havingmode"] = false;
$proto128["m_inBrackets"] = false;
$proto128["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto128);

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

$proto0["m_fromlist"][]=$obj;
												$proto130=array();
$proto130["m_link"] = "SQLL_LEFTJOIN";
			$proto131=array();
$proto131["m_strName"] = "sys_manage";
$proto131["m_srcTableName"] = "Purchasing List";
$proto131["m_columns"] = array();
$proto131["m_columns"][] = "ID";
$proto131["m_columns"][] = "username";
$proto131["m_columns"][] = "password";
$proto131["m_columns"][] = "email";
$proto131["m_columns"][] = "fullname";
$proto131["m_columns"][] = "groupid";
$proto131["m_columns"][] = "active";
$proto131["m_columns"][] = "ext_security_id";
$proto131["m_columns"][] = "reset_token";
$proto131["m_columns"][] = "reset_date";
$proto131["m_columns"][] = "teliphone_number";
$proto131["m_columns"][] = "date";
$proto131["m_columns"][] = "branch_code";
$proto131["m_columns"][] = "outlet_code";
$proto131["m_columns"][] = "MyTheme";
$proto131["m_columns"][] = "MyThemeSize";
$proto131["m_columns"][] = "password2";
$obj = new SQLTable($proto131);

$proto130["m_table"] = $obj;
$proto130["m_sql"] = "LEFT OUTER JOIN sys_manage ON purchasing.`user` = sys_manage.username";
$proto130["m_alias"] = "";
$proto130["m_srcTableName"] = "Purchasing List";
$proto132=array();
$proto132["m_sql"] = "purchasing.`user` = sys_manage.username";
$proto132["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "user",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto132["m_column"]=$obj;
$proto132["m_contained"] = array();
$proto132["m_strCase"] = "= sys_manage.username";
$proto132["m_havingmode"] = false;
$proto132["m_inBrackets"] = false;
$proto132["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto132);

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

$proto0["m_fromlist"][]=$obj;
												$proto134=array();
$proto134["m_link"] = "SQLL_INNERJOIN";
			$proto135=array();
$proto135["m_strName"] = "company_profile";
$proto135["m_srcTableName"] = "Purchasing List";
$proto135["m_columns"] = array();
$proto135["m_columns"][] = "id";
$proto135["m_columns"][] = "company_name";
$proto135["m_columns"][] = "address_line_1";
$proto135["m_columns"][] = "address_line_2";
$proto135["m_columns"][] = "country";
$proto135["m_columns"][] = "provinces";
$proto135["m_columns"][] = "districts";
$proto135["m_columns"][] = "postal_code";
$proto135["m_columns"][] = "hot_line";
$proto135["m_columns"][] = "Fax";
$proto135["m_columns"][] = "email";
$proto135["m_columns"][] = "logo";
$proto135["m_columns"][] = "branch_code";
$proto135["m_columns"][] = "header";
$proto135["m_columns"][] = "footer";
$proto135["m_columns"][] = "time_calibration";
$obj = new SQLTable($proto135);

$proto134["m_table"] = $obj;
$proto134["m_sql"] = "INNER JOIN company_profile ON sys_manage.outlet_code = company_profile.id";
$proto134["m_alias"] = "";
$proto134["m_srcTableName"] = "Purchasing List";
$proto136=array();
$proto136["m_sql"] = "sys_manage.outlet_code = company_profile.id";
$proto136["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "sys_manage",
	"m_srcTableName" => "Purchasing List"
));

$proto136["m_column"]=$obj;
$proto136["m_contained"] = array();
$proto136["m_strCase"] = "= company_profile.id";
$proto136["m_havingmode"] = false;
$proto136["m_inBrackets"] = false;
$proto136["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto136);

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto138=array();
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "purchasing",
	"m_srcTableName" => "Purchasing List"
));

$proto138["m_column"]=$obj;
$proto138["m_bAsc"] = 0;
$proto138["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto138);

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="Purchasing List";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_purchasing_list = createSqlQuery_purchasing_list();


	
		;

																												

$tdatapurchasing_list[".sqlquery"] = $queryData_purchasing_list;



include_once(getabspath("include/purchasing_list_events.php"));
$tableEvents["Purchasing List"] = new eventclass_purchasing_list;
$tdatapurchasing_list[".hasEvents"] = true;

?>