<?php

/**
* getLookupMainTableSettings - tests whether the lookup link exists between the tables
*
*  returns array with ProjectSettings class for main table if the link exists in project settings.
*  returns NULL otherwise
*/
function getLookupMainTableSettings($lookupTable, $mainTableShortName, $mainField, $desiredPage = "")
{
	global $lookupTableLinks;
	if(!isset($lookupTableLinks[$lookupTable]))
		return null;
	if(!isset($lookupTableLinks[$lookupTable][$mainTableShortName.".".$mainField]))
		return null;
	$arr = &$lookupTableLinks[$lookupTable][$mainTableShortName.".".$mainField];
	$effectivePage = $desiredPage;
	if(!isset($arr[$effectivePage]))
	{
		$effectivePage = PAGE_EDIT;
		if(!isset($arr[$effectivePage]))
		{
			if($desiredPage == "" && 0 < count($arr))
			{
				$effectivePage = $arr[0];
			}
			else
				return null;
		}
	}
	return new ProjectSettings($arr[$effectivePage]["table"], $effectivePage);
}

/** 
* $lookupTableLinks array stores all lookup links between tables in the project
*/
function InitLookupLinks()
{
	global $lookupTableLinks;

	$lookupTableLinks = array();

		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["sales.customer_name"] )) {
			$lookupTableLinks["buyers"]["sales.customer_name"] = array();
		}
		$lookupTableLinks["buyers"]["sales.customer_name"]["edit"] = array("table" => "sales", "field" => "customer_name", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["sales.customer_name"] )) {
			$lookupTableLinks["buyers"]["sales.customer_name"] = array();
		}
		$lookupTableLinks["buyers"]["sales.customer_name"]["add"] = array("table" => "sales", "field" => "customer_name", "page" => "add");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["sales.customer_name"] )) {
			$lookupTableLinks["customer"]["sales.customer_name"] = array();
		}
		$lookupTableLinks["customer"]["sales.customer_name"]["search"] = array("table" => "sales", "field" => "customer_name", "page" => "search");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["sales_details.bar_code"] )) {
			$lookupTableLinks["product"]["sales_details.bar_code"] = array();
		}
		$lookupTableLinks["product"]["sales_details.bar_code"]["edit"] = array("table" => "sales_details", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["sales_details.product"] )) {
			$lookupTableLinks["product"]["sales_details.product"] = array();
		}
		$lookupTableLinks["product"]["sales_details.product"]["edit"] = array("table" => "sales_details", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["category"] ) ) {
			$lookupTableLinks["category"] = array();
		}
		if( !isset( $lookupTableLinks["category"]["product.category"] )) {
			$lookupTableLinks["category"]["product.category"] = array();
		}
		$lookupTableLinks["category"]["product.category"]["edit"] = array("table" => "product", "field" => "category", "page" => "edit");
		if( !isset( $lookupTableLinks["units"] ) ) {
			$lookupTableLinks["units"] = array();
		}
		if( !isset( $lookupTableLinks["units"]["product.unit"] )) {
			$lookupTableLinks["units"]["product.unit"] = array();
		}
		$lookupTableLinks["units"]["product.unit"]["edit"] = array("table" => "product", "field" => "unit", "page" => "edit");
		if( !isset( $lookupTableLinks["brand"] ) ) {
			$lookupTableLinks["brand"] = array();
		}
		if( !isset( $lookupTableLinks["brand"]["product.brand"] )) {
			$lookupTableLinks["brand"]["product.brand"] = array();
		}
		$lookupTableLinks["brand"]["product.brand"]["edit"] = array("table" => "product", "field" => "brand", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["sys_manage.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["sys_manage.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["sys_manage.outlet_code"]["edit"] = array("table" => "sys_manage", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["details.bar_code"] )) {
			$lookupTableLinks["product"]["details.bar_code"] = array();
		}
		$lookupTableLinks["product"]["details.bar_code"]["edit"] = array("table" => "details", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["details.product"] )) {
			$lookupTableLinks["product"]["details.product"] = array();
		}
		$lookupTableLinks["product"]["details.product"]["edit"] = array("table" => "details", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["category"] ) ) {
			$lookupTableLinks["category"] = array();
		}
		if( !isset( $lookupTableLinks["category"]["product1.category"] )) {
			$lookupTableLinks["category"]["product1.category"] = array();
		}
		$lookupTableLinks["category"]["product1.category"]["edit"] = array("table" => "product1", "field" => "category", "page" => "edit");
		if( !isset( $lookupTableLinks["units"] ) ) {
			$lookupTableLinks["units"] = array();
		}
		if( !isset( $lookupTableLinks["units"]["product1.unit"] )) {
			$lookupTableLinks["units"]["product1.unit"] = array();
		}
		$lookupTableLinks["units"]["product1.unit"]["edit"] = array("table" => "product1", "field" => "unit", "page" => "edit");
		if( !isset( $lookupTableLinks["brand"] ) ) {
			$lookupTableLinks["brand"] = array();
		}
		if( !isset( $lookupTableLinks["brand"]["product1.brand"] )) {
			$lookupTableLinks["brand"]["product1.brand"] = array();
		}
		$lookupTableLinks["brand"]["product1.brand"]["edit"] = array("table" => "product1", "field" => "brand", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["users.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["users.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["users.outlet_code"]["edit"] = array("table" => "Users", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["credit_sales"] ) ) {
			$lookupTableLinks["credit_sales"] = array();
		}
		if( !isset( $lookupTableLinks["credit_sales"]["payments.sales_id"] )) {
			$lookupTableLinks["credit_sales"]["payments.sales_id"] = array();
		}
		$lookupTableLinks["credit_sales"]["payments.sales_id"]["edit"] = array("table" => "payments", "field" => "sales_id", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"]["edit"] = array("table" => "credit_sales", "field" => "customer_name", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"]["add"] = array("table" => "credit_sales", "field" => "customer_name", "page" => "add");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["credit_sales.customer_name"]["search"] = array("table" => "credit_sales", "field" => "customer_name", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["credit_sales.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["credit_sales.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["credit_sales.outlet_code"]["add"] = array("table" => "credit_sales", "field" => "outlet_code", "page" => "add");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["credit_sales.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["credit_sales.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["credit_sales.outlet_code"]["search"] = array("table" => "credit_sales", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["purchasing.supplier"] )) {
			$lookupTableLinks["customer"]["purchasing.supplier"] = array();
		}
		$lookupTableLinks["customer"]["purchasing.supplier"]["add"] = array("table" => "purchasing", "field" => "supplier", "page" => "add");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["purchasing.supplier"] )) {
			$lookupTableLinks["customer"]["purchasing.supplier"] = array();
		}
		$lookupTableLinks["customer"]["purchasing.supplier"]["search"] = array("table" => "purchasing", "field" => "supplier", "page" => "search");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_details.product"] )) {
			$lookupTableLinks["product"]["purchasing_details.product"] = array();
		}
		$lookupTableLinks["product"]["purchasing_details.product"]["edit"] = array("table" => "purchasing_details", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"]["add"] = array("table" => "Advance_purchasing", "field" => "supplier", "page" => "add");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["advance_purchasing.supplier"]["search"] = array("table" => "Advance_purchasing", "field" => "supplier", "page" => "search");
		if( !isset( $lookupTableLinks["Advance_purchasing2"] ) ) {
			$lookupTableLinks["Advance_purchasing2"] = array();
		}
		if( !isset( $lookupTableLinks["Advance_purchasing2"]["payment_for_pur.pur_id"] )) {
			$lookupTableLinks["Advance_purchasing2"]["payment_for_pur.pur_id"] = array();
		}
		$lookupTableLinks["Advance_purchasing2"]["payment_for_pur.pur_id"]["edit"] = array("table" => "payment_for_pur", "field" => "pur_id", "page" => "edit");
		if( !isset( $lookupTableLinks["cheque_register4pay"] ) ) {
			$lookupTableLinks["cheque_register4pay"] = array();
		}
		if( !isset( $lookupTableLinks["cheque_register4pay"]["payment_for_pur.cheque_number"] )) {
			$lookupTableLinks["cheque_register4pay"]["payment_for_pur.cheque_number"] = array();
		}
		$lookupTableLinks["cheque_register4pay"]["payment_for_pur.cheque_number"]["edit"] = array("table" => "payment_for_pur", "field" => "cheque_number", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["payment_for_pur.acc_no"] )) {
			$lookupTableLinks["bank_accounts"]["payment_for_pur.acc_no"] = array();
		}
		$lookupTableLinks["bank_accounts"]["payment_for_pur.acc_no"]["search"] = array("table" => "payment_for_pur", "field" => "acc_no", "page" => "search");
		if( !isset( $lookupTableLinks["Advance_purchasing2"] ) ) {
			$lookupTableLinks["Advance_purchasing2"] = array();
		}
		if( !isset( $lookupTableLinks["Advance_purchasing2"]["payment_of_arrears.pur_id"] )) {
			$lookupTableLinks["Advance_purchasing2"]["payment_of_arrears.pur_id"] = array();
		}
		$lookupTableLinks["Advance_purchasing2"]["payment_of_arrears.pur_id"]["edit"] = array("table" => "Payment of arrears", "field" => "pur_id", "page" => "edit");
		if( !isset( $lookupTableLinks["cheque_register4pay"] ) ) {
			$lookupTableLinks["cheque_register4pay"] = array();
		}
		if( !isset( $lookupTableLinks["cheque_register4pay"]["payment_of_arrears.cheque_number"] )) {
			$lookupTableLinks["cheque_register4pay"]["payment_of_arrears.cheque_number"] = array();
		}
		$lookupTableLinks["cheque_register4pay"]["payment_of_arrears.cheque_number"]["edit"] = array("table" => "Payment of arrears", "field" => "cheque_number", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["payment_of_arrears.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["payment_of_arrears.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["payment_of_arrears.outlet_code"]["search"] = array("table" => "Payment of arrears", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["payment_of_arrears.Where purchased"] )) {
			$lookupTableLinks["company_profile"]["payment_of_arrears.Where purchased"] = array();
		}
		$lookupTableLinks["company_profile"]["payment_of_arrears.Where purchased"]["edit"] = array("table" => "Payment of arrears", "field" => "Where purchased", "page" => "edit");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["payment_of_arrears.company_name"] )) {
			$lookupTableLinks["customer"]["payment_of_arrears.company_name"] = array();
		}
		$lookupTableLinks["customer"]["payment_of_arrears.company_name"]["edit"] = array("table" => "Payment of arrears", "field" => "company_name", "page" => "edit");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["payment_of_arrears.company_name"] )) {
			$lookupTableLinks["customer"]["payment_of_arrears.company_name"] = array();
		}
		$lookupTableLinks["customer"]["payment_of_arrears.company_name"]["add"] = array("table" => "Payment of arrears", "field" => "company_name", "page" => "add");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["payment_of_arrears.company_name"] )) {
			$lookupTableLinks["customer"]["payment_of_arrears.company_name"] = array();
		}
		$lookupTableLinks["customer"]["payment_of_arrears.company_name"]["search"] = array("table" => "Payment of arrears", "field" => "company_name", "page" => "search");
		if( !isset( $lookupTableLinks["Users"] ) ) {
			$lookupTableLinks["Users"] = array();
		}
		if( !isset( $lookupTableLinks["Users"]["attendance.emp_id"] )) {
			$lookupTableLinks["Users"]["attendance.emp_id"] = array();
		}
		$lookupTableLinks["Users"]["attendance.emp_id"]["edit"] = array("table" => "attendance", "field" => "emp_id", "page" => "edit");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_voucher.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_voucher.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_voucher.emp_no"]["edit"] = array("table" => "salary_voucher", "field" => "emp_no", "page" => "edit");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_voucher.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_voucher.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_voucher.emp_no"]["add"] = array("table" => "salary_voucher", "field" => "emp_no", "page" => "add");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_voucher.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_voucher.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_voucher.emp_no"]["search"] = array("table" => "salary_voucher", "field" => "emp_no", "page" => "search");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_voucher.month"] )) {
			$lookupTableLinks["attendance"]["salary_voucher.month"] = array();
		}
		$lookupTableLinks["attendance"]["salary_voucher.month"]["add"] = array("table" => "salary_voucher", "field" => "month", "page" => "add");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_voucher.year"] )) {
			$lookupTableLinks["attendance"]["salary_voucher.year"] = array();
		}
		$lookupTableLinks["attendance"]["salary_voucher.year"]["add"] = array("table" => "salary_voucher", "field" => "year", "page" => "add");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_voucher.year"] )) {
			$lookupTableLinks["attendance"]["salary_voucher.year"] = array();
		}
		$lookupTableLinks["attendance"]["salary_voucher.year"]["search"] = array("table" => "salary_voucher", "field" => "year", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["salary_advance.out_let"] )) {
			$lookupTableLinks["company_profile"]["salary_advance.out_let"] = array();
		}
		$lookupTableLinks["company_profile"]["salary_advance.out_let"]["edit"] = array("table" => "salary_advance", "field" => "out_let", "page" => "edit");
		if( !isset( $lookupTableLinks["loans."] ) ) {
			$lookupTableLinks["loans."] = array();
		}
		if( !isset( $lookupTableLinks["loans."]["payment_of_loan_installments.loan"] )) {
			$lookupTableLinks["loans."]["payment_of_loan_installments.loan"] = array();
		}
		$lookupTableLinks["loans."]["payment_of_loan_installments.loan"]["edit"] = array("table" => "payment_of_loan_installments", "field" => "loan", "page" => "edit");
		if( !isset( $lookupTableLinks["sys_manage"] ) ) {
			$lookupTableLinks["sys_manage"] = array();
		}
		if( !isset( $lookupTableLinks["sys_manage"]["salaries_and_allowances.emp_id"] )) {
			$lookupTableLinks["sys_manage"]["salaries_and_allowances.emp_id"] = array();
		}
		$lookupTableLinks["sys_manage"]["salaries_and_allowances.emp_id"]["edit"] = array("table" => "salaries_and_allowances", "field" => "emp_id", "page" => "edit");
		if( !isset( $lookupTableLinks["Users"] ) ) {
			$lookupTableLinks["Users"] = array();
		}
		if( !isset( $lookupTableLinks["Users"]["attendance_report.emp_id"] )) {
			$lookupTableLinks["Users"]["attendance_report.emp_id"] = array();
		}
		$lookupTableLinks["Users"]["attendance_report.emp_id"]["search"] = array("table" => "attendance Report", "field" => "emp_id", "page" => "search");
		if( !isset( $lookupTableLinks["Users"] ) ) {
			$lookupTableLinks["Users"] = array();
		}
		if( !isset( $lookupTableLinks["Users"]["attendance11.emp_id"] )) {
			$lookupTableLinks["Users"]["attendance11.emp_id"] = array();
		}
		$lookupTableLinks["Users"]["attendance11.emp_id"]["edit"] = array("table" => "attendance11", "field" => "emp_id", "page" => "edit");
		if( !isset( $lookupTableLinks["loa_types"] ) ) {
			$lookupTableLinks["loa_types"] = array();
		}
		if( !isset( $lookupTableLinks["loa_types"]["loans_.loan_id"] )) {
			$lookupTableLinks["loa_types"]["loans_.loan_id"] = array();
		}
		$lookupTableLinks["loa_types"]["loans_.loan_id"]["edit"] = array("table" => "loans.", "field" => "loan_id", "page" => "edit");
		if( !isset( $lookupTableLinks["salary_slips"] ) ) {
			$lookupTableLinks["salary_slips"] = array();
		}
		if( !isset( $lookupTableLinks["salary_slips"]["salary_summary.emp_no"] )) {
			$lookupTableLinks["salary_slips"]["salary_summary.emp_no"] = array();
		}
		$lookupTableLinks["salary_slips"]["salary_summary.emp_no"]["edit"] = array("table" => "salary_summary", "field" => "emp_no", "page" => "edit");
		if( !isset( $lookupTableLinks["salary_slips"] ) ) {
			$lookupTableLinks["salary_slips"] = array();
		}
		if( !isset( $lookupTableLinks["salary_slips"]["salary_summary.month"] )) {
			$lookupTableLinks["salary_slips"]["salary_summary.month"] = array();
		}
		$lookupTableLinks["salary_slips"]["salary_summary.month"]["edit"] = array("table" => "salary_summary", "field" => "month", "page" => "edit");
		if( !isset( $lookupTableLinks["salary_slips"] ) ) {
			$lookupTableLinks["salary_slips"] = array();
		}
		if( !isset( $lookupTableLinks["salary_slips"]["salary_summary.year"] )) {
			$lookupTableLinks["salary_slips"]["salary_summary.year"] = array();
		}
		$lookupTableLinks["salary_slips"]["salary_summary.year"]["edit"] = array("table" => "salary_summary", "field" => "year", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["salary_summary.olt_let"] )) {
			$lookupTableLinks["company_profile"]["salary_summary.olt_let"] = array();
		}
		$lookupTableLinks["company_profile"]["salary_summary.olt_let"]["edit"] = array("table" => "salary_summary", "field" => "olt_let", "page" => "edit");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_slips.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_slips.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_slips.emp_no"]["edit"] = array("table" => "salary_slips", "field" => "emp_no", "page" => "edit");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_slips.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_slips.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_slips.emp_no"]["add"] = array("table" => "salary_slips", "field" => "emp_no", "page" => "add");
		if( !isset( $lookupTableLinks["attendance11"] ) ) {
			$lookupTableLinks["attendance11"] = array();
		}
		if( !isset( $lookupTableLinks["attendance11"]["salary_slips.emp_no"] )) {
			$lookupTableLinks["attendance11"]["salary_slips.emp_no"] = array();
		}
		$lookupTableLinks["attendance11"]["salary_slips.emp_no"]["search"] = array("table" => "salary_slips", "field" => "emp_no", "page" => "search");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_slips.month"] )) {
			$lookupTableLinks["attendance"]["salary_slips.month"] = array();
		}
		$lookupTableLinks["attendance"]["salary_slips.month"]["add"] = array("table" => "salary_slips", "field" => "month", "page" => "add");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_slips.year"] )) {
			$lookupTableLinks["attendance"]["salary_slips.year"] = array();
		}
		$lookupTableLinks["attendance"]["salary_slips.year"]["add"] = array("table" => "salary_slips", "field" => "year", "page" => "add");
		if( !isset( $lookupTableLinks["attendance"] ) ) {
			$lookupTableLinks["attendance"] = array();
		}
		if( !isset( $lookupTableLinks["attendance"]["salary_slips.year"] )) {
			$lookupTableLinks["attendance"]["salary_slips.year"] = array();
		}
		$lookupTableLinks["attendance"]["salary_slips.year"]["search"] = array("table" => "salary_slips", "field" => "year", "page" => "search");
		if( !isset( $lookupTableLinks["sys_manage"] ) ) {
			$lookupTableLinks["sys_manage"] = array();
		}
		if( !isset( $lookupTableLinks["sys_manage"]["loans.emp_id"] )) {
			$lookupTableLinks["sys_manage"]["loans.emp_id"] = array();
		}
		$lookupTableLinks["sys_manage"]["loans.emp_id"]["edit"] = array("table" => "loans", "field" => "emp_id", "page" => "edit");
		if( !isset( $lookupTableLinks["loa_types"] ) ) {
			$lookupTableLinks["loa_types"] = array();
		}
		if( !isset( $lookupTableLinks["loa_types"]["loans.loan_id"] )) {
			$lookupTableLinks["loa_types"]["loans.loan_id"] = array();
		}
		$lookupTableLinks["loa_types"]["loans.loan_id"]["edit"] = array("table" => "loans", "field" => "loan_id", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["bank_activity.account_number"] )) {
			$lookupTableLinks["bank_accounts"]["bank_activity.account_number"] = array();
		}
		$lookupTableLinks["bank_accounts"]["bank_activity.account_number"]["edit"] = array("table" => "bank_activity", "field" => "account_number", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___1.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___1.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___1.Account"]["edit"] = array("table" => "Account - 1", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___2.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___2.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___2.Account"]["edit"] = array("table" => "Account - 2", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___3.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___3.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___3.Account"]["edit"] = array("table" => "Account - 3", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___4.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___4.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___4.Account"]["edit"] = array("table" => "Account - 4", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___5.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___5.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___5.Account"]["edit"] = array("table" => "Account - 5", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["account___6.Account"] )) {
			$lookupTableLinks["bank_accounts"]["account___6.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["account___6.Account"]["edit"] = array("table" => "Account - 6", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["resultant_account.Account"] )) {
			$lookupTableLinks["bank_accounts"]["resultant_account.Account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["resultant_account.Account"]["edit"] = array("table" => "Resultant Account", "field" => "Account", "page" => "edit");
		if( !isset( $lookupTableLinks["loa_types"] ) ) {
			$lookupTableLinks["loa_types"] = array();
		}
		if( !isset( $lookupTableLinks["loa_types"]["loans_status.loan_id"] )) {
			$lookupTableLinks["loa_types"]["loans_status.loan_id"] = array();
		}
		$lookupTableLinks["loa_types"]["loans_status.loan_id"]["edit"] = array("table" => "loans status", "field" => "loan_id", "page" => "edit");
		if( !isset( $lookupTableLinks["expense_category"] ) ) {
			$lookupTableLinks["expense_category"] = array();
		}
		if( !isset( $lookupTableLinks["expense_category"]["expenditure_data.expense_category"] )) {
			$lookupTableLinks["expense_category"]["expenditure_data.expense_category"] = array();
		}
		$lookupTableLinks["expense_category"]["expenditure_data.expense_category"]["edit"] = array("table" => "expenditure_data", "field" => "expense_category", "page" => "edit");
		if( !isset( $lookupTableLinks["expen_source"] ) ) {
			$lookupTableLinks["expen_source"] = array();
		}
		if( !isset( $lookupTableLinks["expen_source"]["expenditure_data.details"] )) {
			$lookupTableLinks["expen_source"]["expenditure_data.details"] = array();
		}
		$lookupTableLinks["expen_source"]["expenditure_data.details"]["edit"] = array("table" => "expenditure_data", "field" => "details", "page" => "edit");
		if( !isset( $lookupTableLinks["expen_detail"] ) ) {
			$lookupTableLinks["expen_detail"] = array();
		}
		if( !isset( $lookupTableLinks["expen_detail"]["expenditure_data.details_2"] )) {
			$lookupTableLinks["expen_detail"]["expenditure_data.details_2"] = array();
		}
		$lookupTableLinks["expen_detail"]["expenditure_data.details_2"]["edit"] = array("table" => "expenditure_data", "field" => "details_2", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["cheque_register.account"] )) {
			$lookupTableLinks["bank_accounts"]["cheque_register.account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["cheque_register.account"]["edit"] = array("table" => "cheque_register", "field" => "account", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["cheque_register.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["cheque_register.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["cheque_register.outlet_code"]["edit"] = array("table" => "cheque_register", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["cheque_register_m.account"] )) {
			$lookupTableLinks["bank_accounts"]["cheque_register_m.account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["cheque_register_m.account"]["edit"] = array("table" => "cheque_register_m", "field" => "account", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["cheque_register_m.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["cheque_register_m.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["cheque_register_m.outlet_code"]["edit"] = array("table" => "cheque_register_m", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["bank_accounts"] ) ) {
			$lookupTableLinks["bank_accounts"] = array();
		}
		if( !isset( $lookupTableLinks["bank_accounts"]["cheque_register4pay.account"] )) {
			$lookupTableLinks["bank_accounts"]["cheque_register4pay.account"] = array();
		}
		$lookupTableLinks["bank_accounts"]["cheque_register4pay.account"]["edit"] = array("table" => "cheque_register4pay", "field" => "account", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["cheque_register4pay.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["cheque_register4pay.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["cheque_register4pay.outlet_code"]["edit"] = array("table" => "cheque_register4pay", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["stock_transfer.stock_sender_or_receiver"] )) {
			$lookupTableLinks["company_profile"]["stock_transfer.stock_sender_or_receiver"] = array();
		}
		$lookupTableLinks["company_profile"]["stock_transfer.stock_sender_or_receiver"]["edit"] = array("table" => "stock_transfer", "field" => "stock_sender_or_receiver", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["stock_tracnsfers.bar_code"] )) {
			$lookupTableLinks["product1"]["stock_tracnsfers.bar_code"] = array();
		}
		$lookupTableLinks["product1"]["stock_tracnsfers.bar_code"]["edit"] = array("table" => "stock_tracnsfers", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["stock_tracnsfers.product"] )) {
			$lookupTableLinks["product1"]["stock_tracnsfers.product"] = array();
		}
		$lookupTableLinks["product1"]["stock_tracnsfers.product"]["edit"] = array("table" => "stock_tracnsfers", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["stock_transfer___receiving.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["stock_transfer___receiving.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["stock_transfer___receiving.outlet_code"]["search"] = array("table" => "stock_transfer - receiving", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["stock_transfer___receiving.stock_sender_or_receiver"] )) {
			$lookupTableLinks["company_profile"]["stock_transfer___receiving.stock_sender_or_receiver"] = array();
		}
		$lookupTableLinks["company_profile"]["stock_transfer___receiving.stock_sender_or_receiver"]["search"] = array("table" => "stock_transfer - receiving", "field" => "stock_sender_or_receiver", "page" => "search");
		if( !isset( $lookupTableLinks["stock_transfer"] ) ) {
			$lookupTableLinks["stock_transfer"] = array();
		}
		if( !isset( $lookupTableLinks["stock_transfer"]["stock_transfer___receiving.id2"] )) {
			$lookupTableLinks["stock_transfer"]["stock_transfer___receiving.id2"] = array();
		}
		$lookupTableLinks["stock_transfer"]["stock_transfer___receiving.id2"]["edit"] = array("table" => "stock_transfer - receiving", "field" => "id2", "page" => "edit");
		if( !isset( $lookupTableLinks["stk_tra_dat_4_recev"] ) ) {
			$lookupTableLinks["stk_tra_dat_4_recev"] = array();
		}
		if( !isset( $lookupTableLinks["stk_tra_dat_4_recev"]["stock_receiving.stock_send_code"] )) {
			$lookupTableLinks["stk_tra_dat_4_recev"]["stock_receiving.stock_send_code"] = array();
		}
		$lookupTableLinks["stk_tra_dat_4_recev"]["stock_receiving.stock_send_code"]["edit"] = array("table" => "stock receiving", "field" => "stock_send_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["stk_tra_dat_4_recev.bar_code"] )) {
			$lookupTableLinks["product1"]["stk_tra_dat_4_recev.bar_code"] = array();
		}
		$lookupTableLinks["product1"]["stk_tra_dat_4_recev.bar_code"]["edit"] = array("table" => "stk_tra_dat_4_recev", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["stk_tra_dat_4_recev.product"] )) {
			$lookupTableLinks["product1"]["stk_tra_dat_4_recev.product"] = array();
		}
		$lookupTableLinks["product1"]["stk_tra_dat_4_recev.product"]["edit"] = array("table" => "stk_tra_dat_4_recev", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["expen_detail"] ) ) {
			$lookupTableLinks["expen_detail"] = array();
		}
		if( !isset( $lookupTableLinks["expen_detail"]["expen_detail.detail"] )) {
			$lookupTableLinks["expen_detail"]["expen_detail.detail"] = array();
		}
		$lookupTableLinks["expen_detail"]["expen_detail.detail"]["edit"] = array("table" => "expen_detail", "field" => "detail", "page" => "edit");
		if( !isset( $lookupTableLinks["expense_category"] ) ) {
			$lookupTableLinks["expense_category"] = array();
		}
		if( !isset( $lookupTableLinks["expense_category"]["expen_detail.expen_catagory"] )) {
			$lookupTableLinks["expense_category"]["expen_detail.expen_catagory"] = array();
		}
		$lookupTableLinks["expense_category"]["expen_detail.expen_catagory"]["edit"] = array("table" => "expen_detail", "field" => "expen_catagory", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_summary.bar_code"] )) {
			$lookupTableLinks["product"]["purchasing_summary.bar_code"] = array();
		}
		$lookupTableLinks["product"]["purchasing_summary.bar_code"]["edit"] = array("table" => "purchasing_summary", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_summary.product"] )) {
			$lookupTableLinks["product"]["purchasing_summary.product"] = array();
		}
		$lookupTableLinks["product"]["purchasing_summary.product"]["edit"] = array("table" => "purchasing_summary", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["purchasing_summary.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["purchasing_summary.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["purchasing_summary.outlet_code"]["edit"] = array("table" => "purchasing_summary", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_data.bar_code"] )) {
			$lookupTableLinks["product"]["purchasing_data.bar_code"] = array();
		}
		$lookupTableLinks["product"]["purchasing_data.bar_code"]["edit"] = array("table" => "purchasing data", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_data.product"] )) {
			$lookupTableLinks["product"]["purchasing_data.product"] = array();
		}
		$lookupTableLinks["product"]["purchasing_data.product"]["edit"] = array("table" => "purchasing data", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["purchasing_data.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["purchasing_data.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["purchasing_data.outlet_code"]["edit"] = array("table" => "purchasing data", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["customer1"] ) ) {
			$lookupTableLinks["customer1"] = array();
		}
		if( !isset( $lookupTableLinks["customer1"]["purchasing_data.supplier"] )) {
			$lookupTableLinks["customer1"]["purchasing_data.supplier"] = array();
		}
		$lookupTableLinks["customer1"]["purchasing_data.supplier"]["edit"] = array("table" => "purchasing data", "field" => "supplier", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["sales_detail.bar_code"] )) {
			$lookupTableLinks["product1"]["sales_detail.bar_code"] = array();
		}
		$lookupTableLinks["product1"]["sales_detail.bar_code"]["edit"] = array("table" => "sales_detail", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product1"] ) ) {
			$lookupTableLinks["product1"] = array();
		}
		if( !isset( $lookupTableLinks["product1"]["sales_detail.product"] )) {
			$lookupTableLinks["product1"]["sales_detail.product"] = array();
		}
		$lookupTableLinks["product1"]["sales_detail.product"]["edit"] = array("table" => "sales_detail", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["sales_detail.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["sales_detail.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["sales_detail.outlet_code"]["edit"] = array("table" => "sales_detail", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["customer1"] ) ) {
			$lookupTableLinks["customer1"] = array();
		}
		if( !isset( $lookupTableLinks["customer1"]["purchasing_control.supplier"] )) {
			$lookupTableLinks["customer1"]["purchasing_control.supplier"] = array();
		}
		$lookupTableLinks["customer1"]["purchasing_control.supplier"]["edit"] = array("table" => "purchasing_Control", "field" => "supplier", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["purchasing_control.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["purchasing_control.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["purchasing_control.outlet_code"]["edit"] = array("table" => "purchasing_Control", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["sales_bill.customer_name"] )) {
			$lookupTableLinks["buyers"]["sales_bill.customer_name"] = array();
		}
		$lookupTableLinks["buyers"]["sales_bill.customer_name"]["edit"] = array("table" => "sales Bill", "field" => "customer_name", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["sales_bill.customer_name"] )) {
			$lookupTableLinks["buyers"]["sales_bill.customer_name"] = array();
		}
		$lookupTableLinks["buyers"]["sales_bill.customer_name"]["add"] = array("table" => "sales Bill", "field" => "customer_name", "page" => "add");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["sales_bill.customer_name"] )) {
			$lookupTableLinks["customer"]["sales_bill.customer_name"] = array();
		}
		$lookupTableLinks["customer"]["sales_bill.customer_name"]["search"] = array("table" => "sales Bill", "field" => "customer_name", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["sales_bill.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["sales_bill.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["sales_bill.outlet_code"]["edit"] = array("table" => "sales Bill", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["sales_details__.bar_code"] )) {
			$lookupTableLinks["product"]["sales_details__.bar_code"] = array();
		}
		$lookupTableLinks["product"]["sales_details__.bar_code"]["edit"] = array("table" => "sales_details..", "field" => "bar_code", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["sales_details__.product"] )) {
			$lookupTableLinks["product"]["sales_details__.product"] = array();
		}
		$lookupTableLinks["product"]["sales_details__.product"]["edit"] = array("table" => "sales_details..", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["cheque_register4pay"] ) ) {
			$lookupTableLinks["cheque_register4pay"] = array();
		}
		if( !isset( $lookupTableLinks["cheque_register4pay"]["payment_for_purchasing.cheque_number"] )) {
			$lookupTableLinks["cheque_register4pay"]["payment_for_purchasing.cheque_number"] = array();
		}
		$lookupTableLinks["cheque_register4pay"]["payment_for_purchasing.cheque_number"]["edit"] = array("table" => "Payment for purchasing", "field" => "cheque_number", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["buyers_advance.buyer_id"] )) {
			$lookupTableLinks["buyers"]["buyers_advance.buyer_id"] = array();
		}
		$lookupTableLinks["buyers"]["buyers_advance.buyer_id"]["edit"] = array("table" => "buyers_advance", "field" => "buyer_id", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers"] ) ) {
			$lookupTableLinks["buyers"] = array();
		}
		if( !isset( $lookupTableLinks["buyers"]["buyers_advance.buyer_name"] )) {
			$lookupTableLinks["buyers"]["buyers_advance.buyer_name"] = array();
		}
		$lookupTableLinks["buyers"]["buyers_advance.buyer_name"]["edit"] = array("table" => "buyers_advance", "field" => "buyer_name", "page" => "edit");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["advances_to_supplier.supplier_name"] )) {
			$lookupTableLinks["customer"]["advances_to_supplier.supplier_name"] = array();
		}
		$lookupTableLinks["customer"]["advances_to_supplier.supplier_name"]["edit"] = array("table" => "advances_to_supplier", "field" => "supplier_name", "page" => "edit");
		if( !isset( $lookupTableLinks["credit_sales"] ) ) {
			$lookupTableLinks["credit_sales"] = array();
		}
		if( !isset( $lookupTableLinks["credit_sales"]["opening_balance_details.sales_id"] )) {
			$lookupTableLinks["credit_sales"]["opening_balance_details.sales_id"] = array();
		}
		$lookupTableLinks["credit_sales"]["opening_balance_details.sales_id"]["edit"] = array("table" => "opening_balance_details", "field" => "sales_id", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["opening_balance_details.outlet"] )) {
			$lookupTableLinks["company_profile"]["opening_balance_details.outlet"] = array();
		}
		$lookupTableLinks["company_profile"]["opening_balance_details.outlet"]["edit"] = array("table" => "opening_balance_details", "field" => "outlet", "page" => "edit");
		if( !isset( $lookupTableLinks["credit_sales11"] ) ) {
			$lookupTableLinks["credit_sales11"] = array();
		}
		if( !isset( $lookupTableLinks["credit_sales11"]["recovery_of_arrears.sales_id"] )) {
			$lookupTableLinks["credit_sales11"]["recovery_of_arrears.sales_id"] = array();
		}
		$lookupTableLinks["credit_sales11"]["recovery_of_arrears.sales_id"]["edit"] = array("table" => "recovery of arrears", "field" => "sales_id", "page" => "edit");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["recovery_of_arrears.outlet"] )) {
			$lookupTableLinks["company_profile"]["recovery_of_arrears.outlet"] = array();
		}
		$lookupTableLinks["company_profile"]["recovery_of_arrears.outlet"]["search"] = array("table" => "recovery of arrears", "field" => "outlet", "page" => "search");
		if( !isset( $lookupTableLinks["Advance_purchasing2"] ) ) {
			$lookupTableLinks["Advance_purchasing2"] = array();
		}
		if( !isset( $lookupTableLinks["Advance_purchasing2"]["payment_report_admin.pur_id"] )) {
			$lookupTableLinks["Advance_purchasing2"]["payment_report_admin.pur_id"] = array();
		}
		$lookupTableLinks["Advance_purchasing2"]["payment_report_admin.pur_id"]["search"] = array("table" => "payment_Report_admin", "field" => "pur_id", "page" => "search");
		if( !isset( $lookupTableLinks["cheque_register4pay"] ) ) {
			$lookupTableLinks["cheque_register4pay"] = array();
		}
		if( !isset( $lookupTableLinks["cheque_register4pay"]["payment_report_admin.cheque_number"] )) {
			$lookupTableLinks["cheque_register4pay"]["payment_report_admin.cheque_number"] = array();
		}
		$lookupTableLinks["cheque_register4pay"]["payment_report_admin.cheque_number"]["search"] = array("table" => "payment_Report_admin", "field" => "cheque_number", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["payment_report_admin.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["payment_report_admin.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["payment_report_admin.outlet_code"]["search"] = array("table" => "payment_Report_admin", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["customer"] ) ) {
			$lookupTableLinks["customer"] = array();
		}
		if( !isset( $lookupTableLinks["customer"]["quick_purchasing.supplier"] )) {
			$lookupTableLinks["customer"]["quick_purchasing.supplier"] = array();
		}
		$lookupTableLinks["customer"]["quick_purchasing.supplier"]["add"] = array("table" => "quick_purchasing", "field" => "supplier", "page" => "add");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["quick_purchasing.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["quick_purchasing.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["quick_purchasing.supplier"]["search"] = array("table" => "quick_purchasing", "field" => "supplier", "page" => "search");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_details1.product"] )) {
			$lookupTableLinks["product"]["purchasing_details1.product"] = array();
		}
		$lookupTableLinks["product"]["purchasing_details1.product"]["edit"] = array("table" => "purchasing_details1", "field" => "product", "page" => "edit");
		if( !isset( $lookupTableLinks["Advance_purchasing2"] ) ) {
			$lookupTableLinks["Advance_purchasing2"] = array();
		}
		if( !isset( $lookupTableLinks["Advance_purchasing2"]["payment_r_4_xprinter.pur_id"] )) {
			$lookupTableLinks["Advance_purchasing2"]["payment_r_4_xprinter.pur_id"] = array();
		}
		$lookupTableLinks["Advance_purchasing2"]["payment_r_4_xprinter.pur_id"]["search"] = array("table" => "Payment_r_4_xprinter", "field" => "pur_id", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["payment_r_4_xprinter.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["payment_r_4_xprinter.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["payment_r_4_xprinter.outlet_code"]["search"] = array("table" => "Payment_r_4_xprinter", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["units"] ) ) {
			$lookupTableLinks["units"] = array();
		}
		if( !isset( $lookupTableLinks["units"]["stock_balance.unit"] )) {
			$lookupTableLinks["units"]["stock_balance.unit"] = array();
		}
		$lookupTableLinks["units"]["stock_balance.unit"]["edit"] = array("table" => "stock_balance", "field" => "unit", "page" => "edit");
		if( !isset( $lookupTableLinks["product"] ) ) {
			$lookupTableLinks["product"] = array();
		}
		if( !isset( $lookupTableLinks["product"]["purchasing_details_report.product"] )) {
			$lookupTableLinks["product"]["purchasing_details_report.product"] = array();
		}
		$lookupTableLinks["product"]["purchasing_details_report.product"]["search"] = array("table" => "purchasing_details Report", "field" => "product", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["purchasing_details_report.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["purchasing_details_report.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["purchasing_details_report.outlet_code"]["search"] = array("table" => "purchasing_details Report", "field" => "outlet_code", "page" => "search");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["sales_history.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["sales_history.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["sales_history.customer_name"]["edit"] = array("table" => "sales_history", "field" => "customer_name", "page" => "edit");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["sales_history.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["sales_history.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["sales_history.customer_name"]["add"] = array("table" => "sales_history", "field" => "customer_name", "page" => "add");
		if( !isset( $lookupTableLinks["buyers1advance"] ) ) {
			$lookupTableLinks["buyers1advance"] = array();
		}
		if( !isset( $lookupTableLinks["buyers1advance"]["sales_history.customer_name"] )) {
			$lookupTableLinks["buyers1advance"]["sales_history.customer_name"] = array();
		}
		$lookupTableLinks["buyers1advance"]["sales_history.customer_name"]["search"] = array("table" => "sales_history", "field" => "customer_name", "page" => "search");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"]["add"] = array("table" => "Purchasing List", "field" => "supplier", "page" => "add");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["purchasing_list.supplier"]["search"] = array("table" => "Purchasing List", "field" => "supplier", "page" => "search");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"]["add"] = array("table" => "purchasing_list2", "field" => "supplier", "page" => "add");
		if( !isset( $lookupTableLinks["advances_to_supplier1"] ) ) {
			$lookupTableLinks["advances_to_supplier1"] = array();
		}
		if( !isset( $lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"] )) {
			$lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"] = array();
		}
		$lookupTableLinks["advances_to_supplier1"]["purchasing_list2.supplier"]["search"] = array("table" => "purchasing_list2", "field" => "supplier", "page" => "search");
		if( !isset( $lookupTableLinks["company_profile"] ) ) {
			$lookupTableLinks["company_profile"] = array();
		}
		if( !isset( $lookupTableLinks["company_profile"]["profile.outlet_code"] )) {
			$lookupTableLinks["company_profile"]["profile.outlet_code"] = array();
		}
		$lookupTableLinks["company_profile"]["profile.outlet_code"]["edit"] = array("table" => "Profile", "field" => "outlet_code", "page" => "edit");
		if( !isset( $lookupTableLinks["theme_list"] ) ) {
			$lookupTableLinks["theme_list"] = array();
		}
		if( !isset( $lookupTableLinks["theme_list"]["profile.MyTheme"] )) {
			$lookupTableLinks["theme_list"]["profile.MyTheme"] = array();
		}
		$lookupTableLinks["theme_list"]["profile.MyTheme"]["edit"] = array("table" => "Profile", "field" => "MyTheme", "page" => "edit");
}

?>