<?php
$tdatadaily_report___3 = array();
$tdatadaily_report___3[".searchableFields"] = array();
$tdatadaily_report___3[".ShortName"] = "daily_report___3";
$tdatadaily_report___3[".OwnerID"] = "";
$tdatadaily_report___3[".OriginalTable"] = "daily_report";


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

//	field labels
$fieldLabelsdaily_report___3 = array();
$fieldToolTipsdaily_report___3 = array();
$pageTitlesdaily_report___3 = array();
$placeHoldersdaily_report___3 = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsdaily_report___3["English"] = array();
	$fieldToolTipsdaily_report___3["English"] = array();
	$placeHoldersdaily_report___3["English"] = array();
	$pageTitlesdaily_report___3["English"] = array();
	$fieldLabelsdaily_report___3["English"]["id"] = "Id";
	$fieldToolTipsdaily_report___3["English"]["id"] = "";
	$placeHoldersdaily_report___3["English"]["id"] = "";
	$fieldLabelsdaily_report___3["English"]["Date"] = "Date";
	$fieldToolTipsdaily_report___3["English"]["Date"] = "";
	$placeHoldersdaily_report___3["English"]["Date"] = "";
	$fieldLabelsdaily_report___3["English"]["purchasing_cash_payment"] = "purchasing cash payment";
	$fieldToolTipsdaily_report___3["English"]["purchasing_cash_payment"] = "";
	$placeHoldersdaily_report___3["English"]["purchasing_cash_payment"] = "";
	$fieldLabelsdaily_report___3["English"]["purchasing_Cheque_payment"] = "purchasing Cheque payment";
	$fieldToolTipsdaily_report___3["English"]["purchasing_Cheque_payment"] = "";
	$placeHoldersdaily_report___3["English"]["purchasing_Cheque_payment"] = "";
	$fieldLabelsdaily_report___3["English"]["purchasing_Cheque_payment_for_arrears"] = "purchasing Cheque payment for arrears";
	$fieldToolTipsdaily_report___3["English"]["purchasing_Cheque_payment_for_arrears"] = "";
	$placeHoldersdaily_report___3["English"]["purchasing_Cheque_payment_for_arrears"] = "";
	$fieldLabelsdaily_report___3["English"]["Cash_payment_for_expenses"] = "Cash payment for expenses";
	$fieldToolTipsdaily_report___3["English"]["Cash_payment_for_expenses"] = "";
	$placeHoldersdaily_report___3["English"]["Cash_payment_for_expenses"] = "";
	$fieldLabelsdaily_report___3["English"]["purchasing_cash_payment__for_arrears"] = "purchasing cash payment  for arrears";
	$fieldToolTipsdaily_report___3["English"]["purchasing_cash_payment__for_arrears"] = "";
	$placeHoldersdaily_report___3["English"]["purchasing_cash_payment__for_arrears"] = "";
	$fieldLabelsdaily_report___3["English"]["Salary_advance"] = "Salary Advance";
	$fieldToolTipsdaily_report___3["English"]["Salary_advance"] = "";
	$placeHoldersdaily_report___3["English"]["Salary_advance"] = "";
	$fieldLabelsdaily_report___3["English"]["salary"] = "Salary";
	$fieldToolTipsdaily_report___3["English"]["salary"] = "";
	$placeHoldersdaily_report___3["English"]["salary"] = "";
	$fieldLabelsdaily_report___3["English"]["total_cash_out"] = "total cash out";
	$fieldToolTipsdaily_report___3["English"]["total_cash_out"] = "";
	$placeHoldersdaily_report___3["English"]["total_cash_out"] = "";
	$fieldLabelsdaily_report___3["English"]["total_cheque_amount"] = "total cheque amount";
	$fieldToolTipsdaily_report___3["English"]["total_cheque_amount"] = "";
	$placeHoldersdaily_report___3["English"]["total_cheque_amount"] = "";
	$fieldLabelsdaily_report___3["English"]["total_out"] = "Total Out";
	$fieldToolTipsdaily_report___3["English"]["total_out"] = "";
	$placeHoldersdaily_report___3["English"]["total_out"] = "";
	$fieldLabelsdaily_report___3["English"]["sales_income_arrears_by_Cheque"] = "sales income arrears by Cheque";
	$fieldToolTipsdaily_report___3["English"]["sales_income_arrears_by_Cheque"] = "";
	$placeHoldersdaily_report___3["English"]["sales_income_arrears_by_Cheque"] = "";
	$fieldLabelsdaily_report___3["English"]["sale_income_arrears_by_Cash"] = "sale income arrears by Cash";
	$fieldToolTipsdaily_report___3["English"]["sale_income_arrears_by_Cash"] = "";
	$placeHoldersdaily_report___3["English"]["sale_income_arrears_by_Cash"] = "";
	$fieldLabelsdaily_report___3["English"]["sales_income_by_Cheque"] = "sales income by Cheque";
	$fieldToolTipsdaily_report___3["English"]["sales_income_by_Cheque"] = "";
	$placeHoldersdaily_report___3["English"]["sales_income_by_Cheque"] = "";
	$fieldLabelsdaily_report___3["English"]["sale_income_by_Cash"] = "sale income by Cash";
	$fieldToolTipsdaily_report___3["English"]["sale_income_by_Cash"] = "";
	$placeHoldersdaily_report___3["English"]["sale_income_by_Cash"] = "";
	$fieldLabelsdaily_report___3["English"]["Opaning_balance"] = "Opaning Balance";
	$fieldToolTipsdaily_report___3["English"]["Opaning_balance"] = "";
	$placeHoldersdaily_report___3["English"]["Opaning_balance"] = "";
	$fieldLabelsdaily_report___3["English"]["total_Cash_in"] = "total Cash in";
	$fieldToolTipsdaily_report___3["English"]["total_Cash_in"] = "";
	$placeHoldersdaily_report___3["English"]["total_Cash_in"] = "";
	$fieldLabelsdaily_report___3["English"]["total_Cheque_in"] = "total Cheque in";
	$fieldToolTipsdaily_report___3["English"]["total_Cheque_in"] = "";
	$placeHoldersdaily_report___3["English"]["total_Cheque_in"] = "";
	$fieldLabelsdaily_report___3["English"]["total_in"] = "Total In";
	$fieldToolTipsdaily_report___3["English"]["total_in"] = "";
	$placeHoldersdaily_report___3["English"]["total_in"] = "";
	$fieldLabelsdaily_report___3["English"]["cash_balance"] = "Cash Balance";
	$fieldToolTipsdaily_report___3["English"]["cash_balance"] = "";
	$placeHoldersdaily_report___3["English"]["cash_balance"] = "";
	$fieldLabelsdaily_report___3["English"]["Bank_Diposit"] = "Bank Diposit";
	$fieldToolTipsdaily_report___3["English"]["Bank_Diposit"] = "";
	$placeHoldersdaily_report___3["English"]["Bank_Diposit"] = "";
	$fieldLabelsdaily_report___3["English"]["Loan"] = "Loan";
	$fieldToolTipsdaily_report___3["English"]["Loan"] = "";
	$placeHoldersdaily_report___3["English"]["Loan"] = "";
	if (count($fieldToolTipsdaily_report___3["English"]))
		$tdatadaily_report___3[".isUseToolTips"] = true;
}


	$tdatadaily_report___3[".NCSearch"] = true;



$tdatadaily_report___3[".shortTableName"] = "daily_report___3";
$tdatadaily_report___3[".nSecOptions"] = 0;

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


$tdatadaily_report___3[".strOriginalTableName"] = "daily_report";

	



$tdatadaily_report___3[".showAddInPopup"] = false;

$tdatadaily_report___3[".showEditInPopup"] = false;

$tdatadaily_report___3[".showViewInPopup"] = false;

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


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

	$tdatadaily_report___3[".audit"] = true;

	$tdatadaily_report___3[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatadaily_report___3[".isUseAjaxSuggest"] = true;

$tdatadaily_report___3[".rowHighlite"] = true;



																																																			

$tdatadaily_report___3[".ajaxCodeSnippetAdded"] = false;

$tdatadaily_report___3[".buttonsAdded"] = false;

$tdatadaily_report___3[".addPageEvents"] = false;

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


$tdatadaily_report___3[".badgeColor"] = "E67349";


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

$tdatadaily_report___3[".googleLikeFields"] = array();
$tdatadaily_report___3[".googleLikeFields"][] = "id";
$tdatadaily_report___3[".googleLikeFields"][] = "Date";
$tdatadaily_report___3[".googleLikeFields"][] = "purchasing cash payment  for arrears";
$tdatadaily_report___3[".googleLikeFields"][] = "purchasing cash payment";
$tdatadaily_report___3[".googleLikeFields"][] = "purchasing Cheque payment";
$tdatadaily_report___3[".googleLikeFields"][] = "purchasing Cheque payment for arrears";
$tdatadaily_report___3[".googleLikeFields"][] = "Cash payment for expenses";
$tdatadaily_report___3[".googleLikeFields"][] = "Salary advance";
$tdatadaily_report___3[".googleLikeFields"][] = "salary";
$tdatadaily_report___3[".googleLikeFields"][] = "Bank Diposit";
$tdatadaily_report___3[".googleLikeFields"][] = "Loan";
$tdatadaily_report___3[".googleLikeFields"][] = "total cash out";
$tdatadaily_report___3[".googleLikeFields"][] = "total cheque amount";
$tdatadaily_report___3[".googleLikeFields"][] = "total out";
$tdatadaily_report___3[".googleLikeFields"][] = "sales income arrears by Cheque";
$tdatadaily_report___3[".googleLikeFields"][] = "sale income arrears by Cash";
$tdatadaily_report___3[".googleLikeFields"][] = "sales income by Cheque";
$tdatadaily_report___3[".googleLikeFields"][] = "sale income by Cash";
$tdatadaily_report___3[".googleLikeFields"][] = "Opaning balance";
$tdatadaily_report___3[".googleLikeFields"][] = "total Cash in";
$tdatadaily_report___3[".googleLikeFields"][] = "total Cheque in";
$tdatadaily_report___3[".googleLikeFields"][] = "total in";
$tdatadaily_report___3[".googleLikeFields"][] = "cash balance";



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

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

$tdatadaily_report___3[".nPrinterSplitRecords"] = 40;

$tdatadaily_report___3[".geocodingEnabled"] = false;










$tdatadaily_report___3[".pageSize"] = 20;

$tdatadaily_report___3[".warnLeavingPages"] = true;



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

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



$tdatadaily_report___3[".sqlHead"] = "SELECT id,DATE(`date`) AS \"Date\",  IFNULL(pur34.st34, 0) AS \"purchasing cash payment  for arrears\",  IFNULL(pur35.st35, 0) AS \"purchasing cash payment\",  IFNULL(pur36.st36, 0) AS \"purchasing Cheque payment\",  IFNULL(pur37.st37, 0) AS \"purchasing Cheque payment for arrears\",  IFNULL(pur40.st40, 0) AS \"Cash payment for expenses\" ,  IFNULL(pur38.st38, 0) AS \"Salary advance\",  IFNULL(pur39.st39, 0) AS \"salary\",  IFNULL(pur49.st49, 0) AS \"Bank Diposit\",  IFNULL(pur50.st50, 0) AS \"Loan\",  IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0)+IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0) as \"total cash out\",  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0) as \"total cheque amount\",  IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) +  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)+ IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0) as \"total out\",  IFNULL(pur41.st41, 0) AS \"sales income arrears by Cheque\",  IFNULL(pur42.st42, 0) AS \"sale income arrears by Cash\",  IFNULL(pur43.st43, 0) AS \"sales income by Cheque\",  IFNULL(pur44.st44, 0) AS \"sale income by Cash\",  IFNULL(pur45.st45, 0) AS \"Opaning balance\",  IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) as \"total Cash in\",  IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0) as \"total Cheque in\",  IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) + IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0) as \"total in\",  (IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)) - (IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) + IFNULL(pur49.st49, 0) + IFNULL(pur50.st50, 0)) as \"cash balance\"";
$tdatadaily_report___3[".sqlFrom"] = "FROM daily_report  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st49 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur49 ON daily_report.DATE = pur49.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st50 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur50 ON daily_report.DATE = pur50.KKK    LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st34 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur34 ON daily_report.DATE = pur34.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st35 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur35 ON daily_report.DATE = pur35.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st36 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur36 ON daily_report.DATE = pur36.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st37 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur37 ON daily_report.DATE = pur37.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st40 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur40 ON daily_report.DATE = pur40.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st38 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur38 ON daily_report.DATE = pur38.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st39 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur39 ON daily_report.DATE = pur39.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st41 FROM `payments` WHERE `status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3 GROUP BY DATE(`date_time`)) AS pur41 ON daily_report.DATE = pur41.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st42 FROM `payments` WHERE `status`=\"sales arrears\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur42 ON daily_report.DATE = pur42.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st43 FROM `payments` WHERE `status`=\"sales\" and type=\"Cheque\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur43 ON daily_report.DATE = pur43.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st44 FROM `payments` WHERE `status`=\"sales\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur44 ON daily_report.DATE = pur44.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st45 FROM `payments` WHERE `status`=\"opening balance\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur45 ON daily_report.DATE = pur45.KK2";
$tdatadaily_report___3[".sqlWhereExpr"] = "";
$tdatadaily_report___3[".sqlTail"] = "";










//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatadaily_report___3[".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;
$tdatadaily_report___3[".arrGroupsPerPage"] = $arrGPP;

$tdatadaily_report___3[".highlightSearchResults"] = true;

$tableKeysdaily_report___3 = array();
$tableKeysdaily_report___3[] = "id";
$tdatadaily_report___3[".Keys"] = $tableKeysdaily_report___3;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "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


	$tdatadaily_report___3["id"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "id";
//	Date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Date";
	$fdata["GoodName"] = "Date";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Date");
	$fdata["FieldType"] = 135;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DATE(`date`)";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Value %value% already exists", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$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


	$tdatadaily_report___3["Date"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Date";
//	purchasing cash payment  for arrears
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "purchasing cash payment  for arrears";
	$fdata["GoodName"] = "purchasing_cash_payment__for_arrears";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","purchasing_cash_payment__for_arrears");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "purchasing cash payment  for arrears";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur34.st34, 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" => "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


	$tdatadaily_report___3["purchasing cash payment  for arrears"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "purchasing cash payment  for arrears";
//	purchasing cash payment
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "purchasing cash payment";
	$fdata["GoodName"] = "purchasing_cash_payment";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","purchasing_cash_payment");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur35.st35, 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" => "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


	$tdatadaily_report___3["purchasing cash payment"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "purchasing cash payment";
//	purchasing Cheque payment
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "purchasing Cheque payment";
	$fdata["GoodName"] = "purchasing_Cheque_payment";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","purchasing_Cheque_payment");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur36.st36, 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" => "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


	$tdatadaily_report___3["purchasing Cheque payment"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "purchasing Cheque payment";
//	purchasing Cheque payment for arrears
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "purchasing Cheque payment for arrears";
	$fdata["GoodName"] = "purchasing_Cheque_payment_for_arrears";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","purchasing_Cheque_payment_for_arrears");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "purchasing Cheque payment for arrears";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur37.st37, 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" => "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


	$tdatadaily_report___3["purchasing Cheque payment for arrears"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "purchasing Cheque payment for arrears";
//	Cash payment for expenses
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Cash payment for expenses";
	$fdata["GoodName"] = "Cash_payment_for_expenses";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Cash_payment_for_expenses");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "Cash payment for expenses";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur40.st40, 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" => "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


	$tdatadaily_report___3["Cash payment for expenses"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Cash payment for expenses";
//	Salary advance
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Salary advance";
	$fdata["GoodName"] = "Salary_advance";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Salary_advance");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "Salary advance";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur38.st38, 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" => "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


	$tdatadaily_report___3["Salary advance"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Salary advance";
//	salary
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "salary";
	$fdata["GoodName"] = "salary";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","salary");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur39.st39, 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" => "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


	$tdatadaily_report___3["salary"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "salary";
//	Bank Diposit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "Bank Diposit";
	$fdata["GoodName"] = "Bank_Diposit";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Bank_Diposit");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "Bank Diposit";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur49.st49, 0)";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadaily_report___3["Bank Diposit"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Bank Diposit";
//	Loan
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "Loan";
	$fdata["GoodName"] = "Loan";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Loan");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur50.st50, 0)";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatadaily_report___3["Loan"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Loan";
//	total cash out
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "total cash out";
	$fdata["GoodName"] = "total_cash_out";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_cash_out");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total cash out";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0)+IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 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" => "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


	$tdatadaily_report___3["total cash out"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total cash out";
//	total cheque amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "total cheque amount";
	$fdata["GoodName"] = "total_cheque_amount";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_cheque_amount");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total cheque amount";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 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" => "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


	$tdatadaily_report___3["total cheque amount"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total cheque amount";
//	total out
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "total out";
	$fdata["GoodName"] = "total_out";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_out");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total out";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) +  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)+ IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 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" => "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


	$tdatadaily_report___3["total out"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total out";
//	sales income arrears by Cheque
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "sales income arrears by Cheque";
	$fdata["GoodName"] = "sales_income_arrears_by_Cheque";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","sales_income_arrears_by_Cheque");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "sales income arrears by Cheque";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur41.st41, 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" => "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


	$tdatadaily_report___3["sales income arrears by Cheque"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "sales income arrears by Cheque";
//	sale income arrears by Cash
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "sale income arrears by Cash";
	$fdata["GoodName"] = "sale_income_arrears_by_Cash";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","sale_income_arrears_by_Cash");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "sale income arrears by Cash";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur42.st42, 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" => "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


	$tdatadaily_report___3["sale income arrears by Cash"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "sale income arrears by Cash";
//	sales income by Cheque
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "sales income by Cheque";
	$fdata["GoodName"] = "sales_income_by_Cheque";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","sales_income_by_Cheque");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "sales income by Cheque";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur43.st43, 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" => "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


	$tdatadaily_report___3["sales income by Cheque"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "sales income by Cheque";
//	sale income by Cash
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "sale income by Cash";
	$fdata["GoodName"] = "sale_income_by_Cash";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","sale_income_by_Cash");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "sale income by Cash";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur44.st44, 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" => "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


	$tdatadaily_report___3["sale income by Cash"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "sale income by Cash";
//	Opaning balance
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "Opaning balance";
	$fdata["GoodName"] = "Opaning_balance";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","Opaning_balance");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "Opaning balance";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur45.st45, 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" => "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


	$tdatadaily_report___3["Opaning balance"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "Opaning balance";
//	total Cash in
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 20;
	$fdata["strName"] = "total Cash in";
	$fdata["GoodName"] = "total_Cash_in";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_Cash_in");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total Cash in";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 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" => "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


	$tdatadaily_report___3["total Cash in"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total Cash in";
//	total Cheque in
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 21;
	$fdata["strName"] = "total Cheque in";
	$fdata["GoodName"] = "total_Cheque_in";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_Cheque_in");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total Cheque in";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 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" => "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


	$tdatadaily_report___3["total Cheque in"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total Cheque in";
//	total in
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 22;
	$fdata["strName"] = "total in";
	$fdata["GoodName"] = "total_in";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","total_in");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "total in";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) + IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 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" => "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


	$tdatadaily_report___3["total in"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "total in";
//	cash balance
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 23;
	$fdata["strName"] = "cash balance";
	$fdata["GoodName"] = "cash_balance";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("daily_report___3","cash_balance");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "cash balance";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)) - (IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) + IFNULL(pur49.st49, 0) + IFNULL(pur50.st50, 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" => "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


	$tdatadaily_report___3["cash balance"] = $fdata;
		$tdatadaily_report___3[".searchableFields"][] = "cash balance";


$tables_data["daily_report - 3"]=&$tdatadaily_report___3;
$field_labels["daily_report___3"] = &$fieldLabelsdaily_report___3;
$fieldToolTips["daily_report___3"] = &$fieldToolTipsdaily_report___3;
$placeHolders["daily_report___3"] = &$placeHoldersdaily_report___3;
$page_titles["daily_report___3"] = &$pageTitlesdaily_report___3;

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

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



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



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











function createSqlQuery_daily_report___3()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,DATE(`date`) AS \"Date\",  IFNULL(pur34.st34, 0) AS \"purchasing cash payment  for arrears\",  IFNULL(pur35.st35, 0) AS \"purchasing cash payment\",  IFNULL(pur36.st36, 0) AS \"purchasing Cheque payment\",  IFNULL(pur37.st37, 0) AS \"purchasing Cheque payment for arrears\",  IFNULL(pur40.st40, 0) AS \"Cash payment for expenses\" ,  IFNULL(pur38.st38, 0) AS \"Salary advance\",  IFNULL(pur39.st39, 0) AS \"salary\",  IFNULL(pur49.st49, 0) AS \"Bank Diposit\",  IFNULL(pur50.st50, 0) AS \"Loan\",  IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0)+IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0) as \"total cash out\",  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0) as \"total cheque amount\",  IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) +  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)+ IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0) as \"total out\",  IFNULL(pur41.st41, 0) AS \"sales income arrears by Cheque\",  IFNULL(pur42.st42, 0) AS \"sale income arrears by Cash\",  IFNULL(pur43.st43, 0) AS \"sales income by Cheque\",  IFNULL(pur44.st44, 0) AS \"sale income by Cash\",  IFNULL(pur45.st45, 0) AS \"Opaning balance\",  IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) as \"total Cash in\",  IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0) as \"total Cheque in\",  IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) + IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0) as \"total in\",  (IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)) - (IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) + IFNULL(pur49.st49, 0) + IFNULL(pur50.st50, 0)) as \"cash balance\"";
$proto0["m_strFrom"] = "FROM daily_report  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st49 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur49 ON daily_report.DATE = pur49.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st50 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur50 ON daily_report.DATE = pur50.KKK    LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st34 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur34 ON daily_report.DATE = pur34.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st35 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur35 ON daily_report.DATE = pur35.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st36 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur36 ON daily_report.DATE = pur36.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st37 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur37 ON daily_report.DATE = pur37.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st40 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur40 ON daily_report.DATE = pur40.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st38 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur38 ON daily_report.DATE = pur38.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st39 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur39 ON daily_report.DATE = pur39.KKK  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st41 FROM `payments` WHERE `status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3 GROUP BY DATE(`date_time`)) AS pur41 ON daily_report.DATE = pur41.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st42 FROM `payments` WHERE `status`=\"sales arrears\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur42 ON daily_report.DATE = pur42.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st43 FROM `payments` WHERE `status`=\"sales\" and type=\"Cheque\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur43 ON daily_report.DATE = pur43.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st44 FROM `payments` WHERE `status`=\"sales\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur44 ON daily_report.DATE = pur44.KK2  LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st45 FROM `payments` WHERE `status`=\"opening balance\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur45 ON daily_report.DATE = pur45.KK2";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY  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" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto6["m_sql"] = "id";
$proto6["m_srcTableName"] = "daily_report - 3";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$proto9=array();
$proto9["m_functiontype"] = "SQLF_CUSTOM";
$proto9["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date`"
));

$proto9["m_arguments"][]=$obj;
$proto9["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto9);

$proto8["m_sql"] = "DATE(`date`)";
$proto8["m_srcTableName"] = "daily_report - 3";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "Date";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$proto12=array();
$proto12["m_functiontype"] = "SQLF_CUSTOM";
$proto12["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur34.st34"
));

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

$proto12["m_arguments"][]=$obj;
$proto12["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto12);

$proto11["m_sql"] = "IFNULL(pur34.st34, 0)";
$proto11["m_srcTableName"] = "daily_report - 3";
$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "purchasing cash payment  for arrears";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$proto16=array();
$proto16["m_functiontype"] = "SQLF_CUSTOM";
$proto16["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur35.st35"
));

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

$proto16["m_arguments"][]=$obj;
$proto16["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto16);

$proto15["m_sql"] = "IFNULL(pur35.st35, 0)";
$proto15["m_srcTableName"] = "daily_report - 3";
$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "purchasing cash payment";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$proto20=array();
$proto20["m_functiontype"] = "SQLF_CUSTOM";
$proto20["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur36.st36"
));

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

$proto20["m_arguments"][]=$obj;
$proto20["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto20);

$proto19["m_sql"] = "IFNULL(pur36.st36, 0)";
$proto19["m_srcTableName"] = "daily_report - 3";
$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "purchasing Cheque payment";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
						$proto23=array();
			$proto24=array();
$proto24["m_functiontype"] = "SQLF_CUSTOM";
$proto24["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur37.st37"
));

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

$proto24["m_arguments"][]=$obj;
$proto24["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto24);

$proto23["m_sql"] = "IFNULL(pur37.st37, 0)";
$proto23["m_srcTableName"] = "daily_report - 3";
$proto23["m_expr"]=$obj;
$proto23["m_alias"] = "purchasing Cheque payment for arrears";
$obj = new SQLFieldListItem($proto23);

$proto0["m_fieldlist"][]=$obj;
						$proto27=array();
			$proto28=array();
$proto28["m_functiontype"] = "SQLF_CUSTOM";
$proto28["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur40.st40"
));

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

$proto28["m_arguments"][]=$obj;
$proto28["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto28);

$proto27["m_sql"] = "IFNULL(pur40.st40, 0)";
$proto27["m_srcTableName"] = "daily_report - 3";
$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "Cash payment for expenses";
$obj = new SQLFieldListItem($proto27);

$proto0["m_fieldlist"][]=$obj;
						$proto31=array();
			$proto32=array();
$proto32["m_functiontype"] = "SQLF_CUSTOM";
$proto32["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur38.st38"
));

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

$proto32["m_arguments"][]=$obj;
$proto32["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto32);

$proto31["m_sql"] = "IFNULL(pur38.st38, 0)";
$proto31["m_srcTableName"] = "daily_report - 3";
$proto31["m_expr"]=$obj;
$proto31["m_alias"] = "Salary advance";
$obj = new SQLFieldListItem($proto31);

$proto0["m_fieldlist"][]=$obj;
						$proto35=array();
			$proto36=array();
$proto36["m_functiontype"] = "SQLF_CUSTOM";
$proto36["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur39.st39"
));

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

$proto36["m_arguments"][]=$obj;
$proto36["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto36);

$proto35["m_sql"] = "IFNULL(pur39.st39, 0)";
$proto35["m_srcTableName"] = "daily_report - 3";
$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "salary";
$obj = new SQLFieldListItem($proto35);

$proto0["m_fieldlist"][]=$obj;
						$proto39=array();
			$proto40=array();
$proto40["m_functiontype"] = "SQLF_CUSTOM";
$proto40["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur49.st49"
));

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

$proto40["m_arguments"][]=$obj;
$proto40["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto40);

$proto39["m_sql"] = "IFNULL(pur49.st49, 0)";
$proto39["m_srcTableName"] = "daily_report - 3";
$proto39["m_expr"]=$obj;
$proto39["m_alias"] = "Bank Diposit";
$obj = new SQLFieldListItem($proto39);

$proto0["m_fieldlist"][]=$obj;
						$proto43=array();
			$proto44=array();
$proto44["m_functiontype"] = "SQLF_CUSTOM";
$proto44["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur50.st50"
));

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

$proto44["m_arguments"][]=$obj;
$proto44["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto44);

$proto43["m_sql"] = "IFNULL(pur50.st50, 0)";
$proto43["m_srcTableName"] = "daily_report - 3";
$proto43["m_expr"]=$obj;
$proto43["m_alias"] = "Loan";
$obj = new SQLFieldListItem($proto43);

$proto0["m_fieldlist"][]=$obj;
						$proto47=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0)+IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0)"
));

$proto47["m_sql"] = "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0)+IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0)";
$proto47["m_srcTableName"] = "daily_report - 3";
$proto47["m_expr"]=$obj;
$proto47["m_alias"] = "total cash out";
$obj = new SQLFieldListItem($proto47);

$proto0["m_fieldlist"][]=$obj;
						$proto49=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)"
));

$proto49["m_sql"] = "IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)";
$proto49["m_srcTableName"] = "daily_report - 3";
$proto49["m_expr"]=$obj;
$proto49["m_alias"] = "total cheque amount";
$obj = new SQLFieldListItem($proto49);

$proto0["m_fieldlist"][]=$obj;
						$proto51=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) +  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)+ IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0)"
));

$proto51["m_sql"] = "IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) +  IFNULL(pur36.st36, 0) + IFNULL(pur37.st37, 0)+ IFNULL(pur49.st49, 0)+ IFNULL(pur50.st50, 0)";
$proto51["m_srcTableName"] = "daily_report - 3";
$proto51["m_expr"]=$obj;
$proto51["m_alias"] = "total out";
$obj = new SQLFieldListItem($proto51);

$proto0["m_fieldlist"][]=$obj;
						$proto53=array();
			$proto54=array();
$proto54["m_functiontype"] = "SQLF_CUSTOM";
$proto54["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur41.st41"
));

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

$proto54["m_arguments"][]=$obj;
$proto54["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto54);

$proto53["m_sql"] = "IFNULL(pur41.st41, 0)";
$proto53["m_srcTableName"] = "daily_report - 3";
$proto53["m_expr"]=$obj;
$proto53["m_alias"] = "sales income arrears by Cheque";
$obj = new SQLFieldListItem($proto53);

$proto0["m_fieldlist"][]=$obj;
						$proto57=array();
			$proto58=array();
$proto58["m_functiontype"] = "SQLF_CUSTOM";
$proto58["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur42.st42"
));

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

$proto58["m_arguments"][]=$obj;
$proto58["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto58);

$proto57["m_sql"] = "IFNULL(pur42.st42, 0)";
$proto57["m_srcTableName"] = "daily_report - 3";
$proto57["m_expr"]=$obj;
$proto57["m_alias"] = "sale income arrears by Cash";
$obj = new SQLFieldListItem($proto57);

$proto0["m_fieldlist"][]=$obj;
						$proto61=array();
			$proto62=array();
$proto62["m_functiontype"] = "SQLF_CUSTOM";
$proto62["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur43.st43"
));

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

$proto62["m_arguments"][]=$obj;
$proto62["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto62);

$proto61["m_sql"] = "IFNULL(pur43.st43, 0)";
$proto61["m_srcTableName"] = "daily_report - 3";
$proto61["m_expr"]=$obj;
$proto61["m_alias"] = "sales income by Cheque";
$obj = new SQLFieldListItem($proto61);

$proto0["m_fieldlist"][]=$obj;
						$proto65=array();
			$proto66=array();
$proto66["m_functiontype"] = "SQLF_CUSTOM";
$proto66["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur44.st44"
));

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

$proto66["m_arguments"][]=$obj;
$proto66["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto66);

$proto65["m_sql"] = "IFNULL(pur44.st44, 0)";
$proto65["m_srcTableName"] = "daily_report - 3";
$proto65["m_expr"]=$obj;
$proto65["m_alias"] = "sale income by Cash";
$obj = new SQLFieldListItem($proto65);

$proto0["m_fieldlist"][]=$obj;
						$proto69=array();
			$proto70=array();
$proto70["m_functiontype"] = "SQLF_CUSTOM";
$proto70["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "pur45.st45"
));

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

$proto70["m_arguments"][]=$obj;
$proto70["m_strFunctionName"] = "IFNULL";
$obj = new SQLFunctionCall($proto70);

$proto69["m_sql"] = "IFNULL(pur45.st45, 0)";
$proto69["m_srcTableName"] = "daily_report - 3";
$proto69["m_expr"]=$obj;
$proto69["m_alias"] = "Opaning balance";
$obj = new SQLFieldListItem($proto69);

$proto0["m_fieldlist"][]=$obj;
						$proto73=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)"
));

$proto73["m_sql"] = "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)";
$proto73["m_srcTableName"] = "daily_report - 3";
$proto73["m_expr"]=$obj;
$proto73["m_alias"] = "total Cash in";
$obj = new SQLFieldListItem($proto73);

$proto0["m_fieldlist"][]=$obj;
						$proto75=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0)"
));

$proto75["m_sql"] = "IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0)";
$proto75["m_srcTableName"] = "daily_report - 3";
$proto75["m_expr"]=$obj;
$proto75["m_alias"] = "total Cheque in";
$obj = new SQLFieldListItem($proto75);

$proto0["m_fieldlist"][]=$obj;
						$proto77=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) + IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0)"
));

$proto77["m_sql"] = "IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0) + IFNULL(pur41.st41, 0) + IFNULL(pur43.st43, 0)";
$proto77["m_srcTableName"] = "daily_report - 3";
$proto77["m_expr"]=$obj;
$proto77["m_alias"] = "total in";
$obj = new SQLFieldListItem($proto77);

$proto0["m_fieldlist"][]=$obj;
						$proto79=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)) - (IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) + IFNULL(pur49.st49, 0) + IFNULL(pur50.st50, 0))"
));

$proto79["m_sql"] = "(IFNULL(pur42.st42, 0) + IFNULL(pur44.st44, 0) + IFNULL(pur45.st45, 0)) - (IFNULL(pur34.st34, 0) + IFNULL(pur35.st35, 0) + IFNULL(pur40.st40, 0) + IFNULL(pur38.st38, 0) + IFNULL(pur39.st39, 0) + IFNULL(pur49.st49, 0) + IFNULL(pur50.st50, 0))";
$proto79["m_srcTableName"] = "daily_report - 3";
$proto79["m_expr"]=$obj;
$proto79["m_alias"] = "cash balance";
$obj = new SQLFieldListItem($proto79);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto81=array();
$proto81["m_link"] = "SQLL_MAIN";
			$proto82=array();
$proto82["m_strName"] = "daily_report";
$proto82["m_srcTableName"] = "daily_report - 3";
$proto82["m_columns"] = array();
$proto82["m_columns"][] = "id";
$proto82["m_columns"][] = "date";
$obj = new SQLTable($proto82);

$proto81["m_table"] = $obj;
$proto81["m_sql"] = "daily_report";
$proto81["m_alias"] = "";
$proto81["m_srcTableName"] = "daily_report - 3";
$proto83=array();
$proto83["m_sql"] = "";
$proto83["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto85=array();
$proto85["m_link"] = "SQLL_LEFTJOIN";
			$proto86=array();
$proto86["m_strHead"] = " SELECT";
$proto86["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st49";
$proto86["m_strFrom"] = "FROM `payment_for_pur`";
$proto86["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3";
$proto86["m_strOrderBy"] = "";
	
		;
			$proto86["cipherer"] = null;
$proto88=array();
$proto88["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3";
$proto88["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3"
));

$proto88["m_column"]=$obj;
$proto88["m_contained"] = array();
						$proto90=array();
$proto90["m_sql"] = "`payment_type` = \"Cash\"";
$proto90["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto88["m_contained"][]=$obj;
						$proto92=array();
$proto92["m_sql"] = " `details` = \"Deposit\"";
$proto92["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto88["m_contained"][]=$obj;
						$proto94=array();
$proto94["m_sql"] = "outlet_code =3";
$proto94["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto86["m_having"] = $obj;
$proto86["m_fieldlist"] = array();
						$proto98=array();
			$proto99=array();
$proto99["m_functiontype"] = "SQLF_CUSTOM";
$proto99["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto99["m_arguments"][]=$obj;
$proto99["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto99);

$proto98["m_sql"] = "DATE(`date_time`)";
$proto98["m_srcTableName"] = "daily_report - 3";
$proto98["m_expr"]=$obj;
$proto98["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto98);

$proto86["m_fieldlist"][]=$obj;
						$proto101=array();
			$proto102=array();
$proto102["m_functiontype"] = "SQLF_SUM";
$proto102["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto101["m_sql"] = "SUM(`amount`)";
$proto101["m_srcTableName"] = "daily_report - 3";
$proto101["m_expr"]=$obj;
$proto101["m_alias"] = "st49";
$obj = new SQLFieldListItem($proto101);

$proto86["m_fieldlist"][]=$obj;
$proto86["m_fromlist"] = array();
												$proto104=array();
$proto104["m_link"] = "SQLL_MAIN";
			$proto105=array();
$proto105["m_strName"] = "payment_for_pur";
$proto105["m_srcTableName"] = "daily_report - 3";
$proto105["m_columns"] = array();
$proto105["m_columns"][] = "id";
$proto105["m_columns"][] = "pur_id";
$proto105["m_columns"][] = "amount";
$proto105["m_columns"][] = "payment_type";
$proto105["m_columns"][] = "cheque_number";
$proto105["m_columns"][] = "cheque_date";
$proto105["m_columns"][] = "date_time";
$proto105["m_columns"][] = "outlet_code";
$proto105["m_columns"][] = "branch_code";
$proto105["m_columns"][] = "user";
$proto105["m_columns"][] = "details";
$proto105["m_columns"][] = "should_pay";
$proto105["m_columns"][] = "expen_code";
$proto105["m_columns"][] = "salary_advance";
$proto105["m_columns"][] = "salary";
$proto105["m_columns"][] = "acc_no";
$proto105["m_columns"][] = "loan_no";
$obj = new SQLTable($proto105);

$proto104["m_table"] = $obj;
$proto104["m_sql"] = "`payment_for_pur`";
$proto104["m_alias"] = "";
$proto104["m_srcTableName"] = "daily_report - 3";
$proto106=array();
$proto106["m_sql"] = "";
$proto106["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto86["m_fromlist"][]=$obj;
$proto86["m_groupby"] = array();
												$proto108=array();
						$proto109=array();
$proto109["m_functiontype"] = "SQLF_CUSTOM";
$proto109["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto109["m_arguments"][]=$obj;
$proto109["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto109);

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

$proto86["m_groupby"][]=$obj;
$proto86["m_orderby"] = array();
$proto86["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto86);

$proto85["m_table"] = $obj;
$proto85["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st49 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Deposit\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur49 ON daily_report.DATE = pur49.KKK";
$proto85["m_alias"] = "pur49";
$proto85["m_srcTableName"] = "daily_report - 3";
$proto111=array();
$proto111["m_sql"] = "daily_report.DATE = pur49.KKK";
$proto111["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto111["m_column"]=$obj;
$proto111["m_contained"] = array();
$proto111["m_strCase"] = "= pur49.KKK";
$proto111["m_havingmode"] = false;
$proto111["m_inBrackets"] = false;
$proto111["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto111);

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

$proto0["m_fromlist"][]=$obj;
												$proto113=array();
$proto113["m_link"] = "SQLL_LEFTJOIN";
			$proto114=array();
$proto114["m_strHead"] = " SELECT";
$proto114["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st50";
$proto114["m_strFrom"] = "FROM `payment_for_pur`";
$proto114["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3";
$proto114["m_strOrderBy"] = "";
	
		;
			$proto114["cipherer"] = null;
$proto116=array();
$proto116["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3";
$proto116["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3"
));

$proto116["m_column"]=$obj;
$proto116["m_contained"] = array();
						$proto118=array();
$proto118["m_sql"] = "`payment_type` = \"Cash\"";
$proto118["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto116["m_contained"][]=$obj;
						$proto120=array();
$proto120["m_sql"] = " `details` = \"Loan\"";
$proto120["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto120["m_column"]=$obj;
$proto120["m_contained"] = array();
$proto120["m_strCase"] = "= \"Loan\"";
$proto120["m_havingmode"] = false;
$proto120["m_inBrackets"] = true;
$proto120["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto120);

			$proto116["m_contained"][]=$obj;
						$proto122=array();
$proto122["m_sql"] = "outlet_code =3";
$proto122["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

$proto114["m_where"] = $obj;
$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);

$proto114["m_having"] = $obj;
$proto114["m_fieldlist"] = array();
						$proto126=array();
			$proto127=array();
$proto127["m_functiontype"] = "SQLF_CUSTOM";
$proto127["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto127["m_arguments"][]=$obj;
$proto127["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto127);

$proto126["m_sql"] = "DATE(`date_time`)";
$proto126["m_srcTableName"] = "daily_report - 3";
$proto126["m_expr"]=$obj;
$proto126["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto126);

$proto114["m_fieldlist"][]=$obj;
						$proto129=array();
			$proto130=array();
$proto130["m_functiontype"] = "SQLF_SUM";
$proto130["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto129["m_sql"] = "SUM(`amount`)";
$proto129["m_srcTableName"] = "daily_report - 3";
$proto129["m_expr"]=$obj;
$proto129["m_alias"] = "st50";
$obj = new SQLFieldListItem($proto129);

$proto114["m_fieldlist"][]=$obj;
$proto114["m_fromlist"] = array();
												$proto132=array();
$proto132["m_link"] = "SQLL_MAIN";
			$proto133=array();
$proto133["m_strName"] = "payment_for_pur";
$proto133["m_srcTableName"] = "daily_report - 3";
$proto133["m_columns"] = array();
$proto133["m_columns"][] = "id";
$proto133["m_columns"][] = "pur_id";
$proto133["m_columns"][] = "amount";
$proto133["m_columns"][] = "payment_type";
$proto133["m_columns"][] = "cheque_number";
$proto133["m_columns"][] = "cheque_date";
$proto133["m_columns"][] = "date_time";
$proto133["m_columns"][] = "outlet_code";
$proto133["m_columns"][] = "branch_code";
$proto133["m_columns"][] = "user";
$proto133["m_columns"][] = "details";
$proto133["m_columns"][] = "should_pay";
$proto133["m_columns"][] = "expen_code";
$proto133["m_columns"][] = "salary_advance";
$proto133["m_columns"][] = "salary";
$proto133["m_columns"][] = "acc_no";
$proto133["m_columns"][] = "loan_no";
$obj = new SQLTable($proto133);

$proto132["m_table"] = $obj;
$proto132["m_sql"] = "`payment_for_pur`";
$proto132["m_alias"] = "";
$proto132["m_srcTableName"] = "daily_report - 3";
$proto134=array();
$proto134["m_sql"] = "";
$proto134["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto114["m_fromlist"][]=$obj;
$proto114["m_groupby"] = array();
												$proto136=array();
						$proto137=array();
$proto137["m_functiontype"] = "SQLF_CUSTOM";
$proto137["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto137["m_arguments"][]=$obj;
$proto137["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto137);

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

$proto114["m_groupby"][]=$obj;
$proto114["m_orderby"] = array();
$proto114["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto114);

$proto113["m_table"] = $obj;
$proto113["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st50 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Loan\") AND outlet_code =3  GROUP BY DATE(`date_time`)) AS pur50 ON daily_report.DATE = pur50.KKK";
$proto113["m_alias"] = "pur50";
$proto113["m_srcTableName"] = "daily_report - 3";
$proto139=array();
$proto139["m_sql"] = "daily_report.DATE = pur50.KKK";
$proto139["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto139["m_column"]=$obj;
$proto139["m_contained"] = array();
$proto139["m_strCase"] = "= pur50.KKK";
$proto139["m_havingmode"] = false;
$proto139["m_inBrackets"] = false;
$proto139["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto139);

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

$proto0["m_fromlist"][]=$obj;
												$proto141=array();
$proto141["m_link"] = "SQLL_LEFTJOIN";
			$proto142=array();
$proto142["m_strHead"] = " SELECT";
$proto142["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st34";
$proto142["m_strFrom"] = "FROM `payment_for_pur`";
$proto142["m_strWhere"] = "`payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3";
$proto142["m_strOrderBy"] = "";
	
		;
			$proto142["cipherer"] = null;
$proto144=array();
$proto144["m_sql"] = "`payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3";
$proto144["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3"
));

$proto144["m_column"]=$obj;
$proto144["m_contained"] = array();
						$proto146=array();
$proto146["m_sql"] = "`payment_type` = \"Cash\"";
$proto146["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto144["m_contained"][]=$obj;
						$proto148=array();
$proto148["m_sql"] = "`details` = \"purchasing arrears\" ";
$proto148["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto148["m_column"]=$obj;
$proto148["m_contained"] = array();
$proto148["m_strCase"] = "= \"purchasing arrears\"";
$proto148["m_havingmode"] = false;
$proto148["m_inBrackets"] = true;
$proto148["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto148);

			$proto144["m_contained"][]=$obj;
						$proto150=array();
$proto150["m_sql"] = "outlet_code =3";
$proto150["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto142["m_having"] = $obj;
$proto142["m_fieldlist"] = array();
						$proto154=array();
			$proto155=array();
$proto155["m_functiontype"] = "SQLF_CUSTOM";
$proto155["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto155["m_arguments"][]=$obj;
$proto155["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto155);

$proto154["m_sql"] = "DATE(`date_time`)";
$proto154["m_srcTableName"] = "daily_report - 3";
$proto154["m_expr"]=$obj;
$proto154["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto154);

$proto142["m_fieldlist"][]=$obj;
						$proto157=array();
			$proto158=array();
$proto158["m_functiontype"] = "SQLF_SUM";
$proto158["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto157["m_sql"] = "SUM(`amount`)";
$proto157["m_srcTableName"] = "daily_report - 3";
$proto157["m_expr"]=$obj;
$proto157["m_alias"] = "st34";
$obj = new SQLFieldListItem($proto157);

$proto142["m_fieldlist"][]=$obj;
$proto142["m_fromlist"] = array();
												$proto160=array();
$proto160["m_link"] = "SQLL_MAIN";
			$proto161=array();
$proto161["m_strName"] = "payment_for_pur";
$proto161["m_srcTableName"] = "daily_report - 3";
$proto161["m_columns"] = array();
$proto161["m_columns"][] = "id";
$proto161["m_columns"][] = "pur_id";
$proto161["m_columns"][] = "amount";
$proto161["m_columns"][] = "payment_type";
$proto161["m_columns"][] = "cheque_number";
$proto161["m_columns"][] = "cheque_date";
$proto161["m_columns"][] = "date_time";
$proto161["m_columns"][] = "outlet_code";
$proto161["m_columns"][] = "branch_code";
$proto161["m_columns"][] = "user";
$proto161["m_columns"][] = "details";
$proto161["m_columns"][] = "should_pay";
$proto161["m_columns"][] = "expen_code";
$proto161["m_columns"][] = "salary_advance";
$proto161["m_columns"][] = "salary";
$proto161["m_columns"][] = "acc_no";
$proto161["m_columns"][] = "loan_no";
$obj = new SQLTable($proto161);

$proto160["m_table"] = $obj;
$proto160["m_sql"] = "`payment_for_pur`";
$proto160["m_alias"] = "";
$proto160["m_srcTableName"] = "daily_report - 3";
$proto162=array();
$proto162["m_sql"] = "";
$proto162["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto142["m_fromlist"][]=$obj;
$proto142["m_groupby"] = array();
												$proto164=array();
						$proto165=array();
$proto165["m_functiontype"] = "SQLF_CUSTOM";
$proto165["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto165["m_arguments"][]=$obj;
$proto165["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto165);

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

$proto142["m_groupby"][]=$obj;
$proto142["m_orderby"] = array();
$proto142["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto142);

$proto141["m_table"] = $obj;
$proto141["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st34 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur34 ON daily_report.DATE = pur34.KKK";
$proto141["m_alias"] = "pur34";
$proto141["m_srcTableName"] = "daily_report - 3";
$proto167=array();
$proto167["m_sql"] = "daily_report.DATE = pur34.KKK";
$proto167["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto167["m_column"]=$obj;
$proto167["m_contained"] = array();
$proto167["m_strCase"] = "= pur34.KKK";
$proto167["m_havingmode"] = false;
$proto167["m_inBrackets"] = false;
$proto167["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto167);

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

$proto0["m_fromlist"][]=$obj;
												$proto169=array();
$proto169["m_link"] = "SQLL_LEFTJOIN";
			$proto170=array();
$proto170["m_strHead"] = " SELECT";
$proto170["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st35";
$proto170["m_strFrom"] = "FROM `payment_for_pur`";
$proto170["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3";
$proto170["m_strOrderBy"] = "";
	
		;
			$proto170["cipherer"] = null;
$proto172=array();
$proto172["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3";
$proto172["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3"
));

$proto172["m_column"]=$obj;
$proto172["m_contained"] = array();
						$proto174=array();
$proto174["m_sql"] = "`payment_type` = \"Cash\"";
$proto174["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto172["m_contained"][]=$obj;
						$proto176=array();
$proto176["m_sql"] = " `details` = \"purchasing\"";
$proto176["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto176["m_column"]=$obj;
$proto176["m_contained"] = array();
$proto176["m_strCase"] = "= \"purchasing\"";
$proto176["m_havingmode"] = false;
$proto176["m_inBrackets"] = true;
$proto176["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto176);

			$proto172["m_contained"][]=$obj;
						$proto178=array();
$proto178["m_sql"] = "outlet_code =3";
$proto178["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto170["m_having"] = $obj;
$proto170["m_fieldlist"] = array();
						$proto182=array();
			$proto183=array();
$proto183["m_functiontype"] = "SQLF_CUSTOM";
$proto183["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto183["m_arguments"][]=$obj;
$proto183["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto183);

$proto182["m_sql"] = "DATE(`date_time`)";
$proto182["m_srcTableName"] = "daily_report - 3";
$proto182["m_expr"]=$obj;
$proto182["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto182);

$proto170["m_fieldlist"][]=$obj;
						$proto185=array();
			$proto186=array();
$proto186["m_functiontype"] = "SQLF_SUM";
$proto186["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto185["m_sql"] = "SUM(`amount`)";
$proto185["m_srcTableName"] = "daily_report - 3";
$proto185["m_expr"]=$obj;
$proto185["m_alias"] = "st35";
$obj = new SQLFieldListItem($proto185);

$proto170["m_fieldlist"][]=$obj;
$proto170["m_fromlist"] = array();
												$proto188=array();
$proto188["m_link"] = "SQLL_MAIN";
			$proto189=array();
$proto189["m_strName"] = "payment_for_pur";
$proto189["m_srcTableName"] = "daily_report - 3";
$proto189["m_columns"] = array();
$proto189["m_columns"][] = "id";
$proto189["m_columns"][] = "pur_id";
$proto189["m_columns"][] = "amount";
$proto189["m_columns"][] = "payment_type";
$proto189["m_columns"][] = "cheque_number";
$proto189["m_columns"][] = "cheque_date";
$proto189["m_columns"][] = "date_time";
$proto189["m_columns"][] = "outlet_code";
$proto189["m_columns"][] = "branch_code";
$proto189["m_columns"][] = "user";
$proto189["m_columns"][] = "details";
$proto189["m_columns"][] = "should_pay";
$proto189["m_columns"][] = "expen_code";
$proto189["m_columns"][] = "salary_advance";
$proto189["m_columns"][] = "salary";
$proto189["m_columns"][] = "acc_no";
$proto189["m_columns"][] = "loan_no";
$obj = new SQLTable($proto189);

$proto188["m_table"] = $obj;
$proto188["m_sql"] = "`payment_for_pur`";
$proto188["m_alias"] = "";
$proto188["m_srcTableName"] = "daily_report - 3";
$proto190=array();
$proto190["m_sql"] = "";
$proto190["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto170["m_fromlist"][]=$obj;
$proto170["m_groupby"] = array();
												$proto192=array();
						$proto193=array();
$proto193["m_functiontype"] = "SQLF_CUSTOM";
$proto193["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto193["m_arguments"][]=$obj;
$proto193["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto193);

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

$proto170["m_groupby"][]=$obj;
$proto170["m_orderby"] = array();
$proto170["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto170);

$proto169["m_table"] = $obj;
$proto169["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st35 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur35 ON daily_report.DATE = pur35.KKK";
$proto169["m_alias"] = "pur35";
$proto169["m_srcTableName"] = "daily_report - 3";
$proto195=array();
$proto195["m_sql"] = "daily_report.DATE = pur35.KKK";
$proto195["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto195["m_column"]=$obj;
$proto195["m_contained"] = array();
$proto195["m_strCase"] = "= pur35.KKK";
$proto195["m_havingmode"] = false;
$proto195["m_inBrackets"] = false;
$proto195["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto195);

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

$proto0["m_fromlist"][]=$obj;
												$proto197=array();
$proto197["m_link"] = "SQLL_LEFTJOIN";
			$proto198=array();
$proto198["m_strHead"] = " SELECT";
$proto198["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st36";
$proto198["m_strFrom"] = "FROM `payment_for_pur`";
$proto198["m_strWhere"] = "`payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3";
$proto198["m_strOrderBy"] = "";
	
		;
			$proto198["cipherer"] = null;
$proto200=array();
$proto200["m_sql"] = "`payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3";
$proto200["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3"
));

$proto200["m_column"]=$obj;
$proto200["m_contained"] = array();
						$proto202=array();
$proto202["m_sql"] = "`payment_type` = \"Cheque\"";
$proto202["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto200["m_contained"][]=$obj;
						$proto204=array();
$proto204["m_sql"] = " `details` = \"purchasing\"";
$proto204["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto204["m_column"]=$obj;
$proto204["m_contained"] = array();
$proto204["m_strCase"] = "= \"purchasing\"";
$proto204["m_havingmode"] = false;
$proto204["m_inBrackets"] = true;
$proto204["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto204);

			$proto200["m_contained"][]=$obj;
						$proto206=array();
$proto206["m_sql"] = "outlet_code =3";
$proto206["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto198["m_having"] = $obj;
$proto198["m_fieldlist"] = array();
						$proto210=array();
			$proto211=array();
$proto211["m_functiontype"] = "SQLF_CUSTOM";
$proto211["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto211["m_arguments"][]=$obj;
$proto211["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto211);

$proto210["m_sql"] = "DATE(`date_time`)";
$proto210["m_srcTableName"] = "daily_report - 3";
$proto210["m_expr"]=$obj;
$proto210["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto210);

$proto198["m_fieldlist"][]=$obj;
						$proto213=array();
			$proto214=array();
$proto214["m_functiontype"] = "SQLF_SUM";
$proto214["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto213["m_sql"] = "SUM(`amount`)";
$proto213["m_srcTableName"] = "daily_report - 3";
$proto213["m_expr"]=$obj;
$proto213["m_alias"] = "st36";
$obj = new SQLFieldListItem($proto213);

$proto198["m_fieldlist"][]=$obj;
$proto198["m_fromlist"] = array();
												$proto216=array();
$proto216["m_link"] = "SQLL_MAIN";
			$proto217=array();
$proto217["m_strName"] = "payment_for_pur";
$proto217["m_srcTableName"] = "daily_report - 3";
$proto217["m_columns"] = array();
$proto217["m_columns"][] = "id";
$proto217["m_columns"][] = "pur_id";
$proto217["m_columns"][] = "amount";
$proto217["m_columns"][] = "payment_type";
$proto217["m_columns"][] = "cheque_number";
$proto217["m_columns"][] = "cheque_date";
$proto217["m_columns"][] = "date_time";
$proto217["m_columns"][] = "outlet_code";
$proto217["m_columns"][] = "branch_code";
$proto217["m_columns"][] = "user";
$proto217["m_columns"][] = "details";
$proto217["m_columns"][] = "should_pay";
$proto217["m_columns"][] = "expen_code";
$proto217["m_columns"][] = "salary_advance";
$proto217["m_columns"][] = "salary";
$proto217["m_columns"][] = "acc_no";
$proto217["m_columns"][] = "loan_no";
$obj = new SQLTable($proto217);

$proto216["m_table"] = $obj;
$proto216["m_sql"] = "`payment_for_pur`";
$proto216["m_alias"] = "";
$proto216["m_srcTableName"] = "daily_report - 3";
$proto218=array();
$proto218["m_sql"] = "";
$proto218["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto198["m_fromlist"][]=$obj;
$proto198["m_groupby"] = array();
												$proto220=array();
						$proto221=array();
$proto221["m_functiontype"] = "SQLF_CUSTOM";
$proto221["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto221["m_arguments"][]=$obj;
$proto221["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto221);

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

$proto198["m_groupby"][]=$obj;
$proto198["m_orderby"] = array();
$proto198["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto198);

$proto197["m_table"] = $obj;
$proto197["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st36 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  ( `details` = \"purchasing\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur36 ON daily_report.DATE = pur36.KKK";
$proto197["m_alias"] = "pur36";
$proto197["m_srcTableName"] = "daily_report - 3";
$proto223=array();
$proto223["m_sql"] = "daily_report.DATE = pur36.KKK";
$proto223["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto223["m_column"]=$obj;
$proto223["m_contained"] = array();
$proto223["m_strCase"] = "= pur36.KKK";
$proto223["m_havingmode"] = false;
$proto223["m_inBrackets"] = false;
$proto223["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto223);

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

$proto0["m_fromlist"][]=$obj;
												$proto225=array();
$proto225["m_link"] = "SQLL_LEFTJOIN";
			$proto226=array();
$proto226["m_strHead"] = " SELECT";
$proto226["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st37";
$proto226["m_strFrom"] = "FROM `payment_for_pur`";
$proto226["m_strWhere"] = "`payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3";
$proto226["m_strOrderBy"] = "";
	
		;
			$proto226["cipherer"] = null;
$proto228=array();
$proto228["m_sql"] = "`payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3";
$proto228["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3"
));

$proto228["m_column"]=$obj;
$proto228["m_contained"] = array();
						$proto230=array();
$proto230["m_sql"] = "`payment_type` = \"Cheque\"";
$proto230["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto228["m_contained"][]=$obj;
						$proto232=array();
$proto232["m_sql"] = "`details` = \"purchasing arrears\" ";
$proto232["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto232["m_column"]=$obj;
$proto232["m_contained"] = array();
$proto232["m_strCase"] = "= \"purchasing arrears\"";
$proto232["m_havingmode"] = false;
$proto232["m_inBrackets"] = true;
$proto232["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto232);

			$proto228["m_contained"][]=$obj;
						$proto234=array();
$proto234["m_sql"] = "outlet_code =3";
$proto234["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto226["m_having"] = $obj;
$proto226["m_fieldlist"] = array();
						$proto238=array();
			$proto239=array();
$proto239["m_functiontype"] = "SQLF_CUSTOM";
$proto239["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto239["m_arguments"][]=$obj;
$proto239["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto239);

$proto238["m_sql"] = "DATE(`date_time`)";
$proto238["m_srcTableName"] = "daily_report - 3";
$proto238["m_expr"]=$obj;
$proto238["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto238);

$proto226["m_fieldlist"][]=$obj;
						$proto241=array();
			$proto242=array();
$proto242["m_functiontype"] = "SQLF_SUM";
$proto242["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto241["m_sql"] = "SUM(`amount`)";
$proto241["m_srcTableName"] = "daily_report - 3";
$proto241["m_expr"]=$obj;
$proto241["m_alias"] = "st37";
$obj = new SQLFieldListItem($proto241);

$proto226["m_fieldlist"][]=$obj;
$proto226["m_fromlist"] = array();
												$proto244=array();
$proto244["m_link"] = "SQLL_MAIN";
			$proto245=array();
$proto245["m_strName"] = "payment_for_pur";
$proto245["m_srcTableName"] = "daily_report - 3";
$proto245["m_columns"] = array();
$proto245["m_columns"][] = "id";
$proto245["m_columns"][] = "pur_id";
$proto245["m_columns"][] = "amount";
$proto245["m_columns"][] = "payment_type";
$proto245["m_columns"][] = "cheque_number";
$proto245["m_columns"][] = "cheque_date";
$proto245["m_columns"][] = "date_time";
$proto245["m_columns"][] = "outlet_code";
$proto245["m_columns"][] = "branch_code";
$proto245["m_columns"][] = "user";
$proto245["m_columns"][] = "details";
$proto245["m_columns"][] = "should_pay";
$proto245["m_columns"][] = "expen_code";
$proto245["m_columns"][] = "salary_advance";
$proto245["m_columns"][] = "salary";
$proto245["m_columns"][] = "acc_no";
$proto245["m_columns"][] = "loan_no";
$obj = new SQLTable($proto245);

$proto244["m_table"] = $obj;
$proto244["m_sql"] = "`payment_for_pur`";
$proto244["m_alias"] = "";
$proto244["m_srcTableName"] = "daily_report - 3";
$proto246=array();
$proto246["m_sql"] = "";
$proto246["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto226["m_fromlist"][]=$obj;
$proto226["m_groupby"] = array();
												$proto248=array();
						$proto249=array();
$proto249["m_functiontype"] = "SQLF_CUSTOM";
$proto249["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto249["m_arguments"][]=$obj;
$proto249["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto249);

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

$proto226["m_groupby"][]=$obj;
$proto226["m_orderby"] = array();
$proto226["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto226);

$proto225["m_table"] = $obj;
$proto225["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st37 FROM `payment_for_pur` WHERE `payment_type` = \"Cheque\" AND  (`details` = \"purchasing arrears\" )AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur37 ON daily_report.DATE = pur37.KKK";
$proto225["m_alias"] = "pur37";
$proto225["m_srcTableName"] = "daily_report - 3";
$proto251=array();
$proto251["m_sql"] = "daily_report.DATE = pur37.KKK";
$proto251["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto251["m_column"]=$obj;
$proto251["m_contained"] = array();
$proto251["m_strCase"] = "= pur37.KKK";
$proto251["m_havingmode"] = false;
$proto251["m_inBrackets"] = false;
$proto251["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto251);

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

$proto0["m_fromlist"][]=$obj;
												$proto253=array();
$proto253["m_link"] = "SQLL_LEFTJOIN";
			$proto254=array();
$proto254["m_strHead"] = " SELECT";
$proto254["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st40";
$proto254["m_strFrom"] = "FROM `payment_for_pur`";
$proto254["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3";
$proto254["m_strOrderBy"] = "";
	
		;
			$proto254["cipherer"] = null;
$proto256=array();
$proto256["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3";
$proto256["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3"
));

$proto256["m_column"]=$obj;
$proto256["m_contained"] = array();
						$proto258=array();
$proto258["m_sql"] = "`payment_type` = \"Cash\"";
$proto258["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto256["m_contained"][]=$obj;
						$proto260=array();
$proto260["m_sql"] = " `details` = \"Expen\"";
$proto260["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto260["m_column"]=$obj;
$proto260["m_contained"] = array();
$proto260["m_strCase"] = "= \"Expen\"";
$proto260["m_havingmode"] = false;
$proto260["m_inBrackets"] = true;
$proto260["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto260);

			$proto256["m_contained"][]=$obj;
						$proto262=array();
$proto262["m_sql"] = "outlet_code =3";
$proto262["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto254["m_having"] = $obj;
$proto254["m_fieldlist"] = array();
						$proto266=array();
			$proto267=array();
$proto267["m_functiontype"] = "SQLF_CUSTOM";
$proto267["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto267["m_arguments"][]=$obj;
$proto267["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto267);

$proto266["m_sql"] = "DATE(`date_time`)";
$proto266["m_srcTableName"] = "daily_report - 3";
$proto266["m_expr"]=$obj;
$proto266["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto266);

$proto254["m_fieldlist"][]=$obj;
						$proto269=array();
			$proto270=array();
$proto270["m_functiontype"] = "SQLF_SUM";
$proto270["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto269["m_sql"] = "SUM(`amount`)";
$proto269["m_srcTableName"] = "daily_report - 3";
$proto269["m_expr"]=$obj;
$proto269["m_alias"] = "st40";
$obj = new SQLFieldListItem($proto269);

$proto254["m_fieldlist"][]=$obj;
$proto254["m_fromlist"] = array();
												$proto272=array();
$proto272["m_link"] = "SQLL_MAIN";
			$proto273=array();
$proto273["m_strName"] = "payment_for_pur";
$proto273["m_srcTableName"] = "daily_report - 3";
$proto273["m_columns"] = array();
$proto273["m_columns"][] = "id";
$proto273["m_columns"][] = "pur_id";
$proto273["m_columns"][] = "amount";
$proto273["m_columns"][] = "payment_type";
$proto273["m_columns"][] = "cheque_number";
$proto273["m_columns"][] = "cheque_date";
$proto273["m_columns"][] = "date_time";
$proto273["m_columns"][] = "outlet_code";
$proto273["m_columns"][] = "branch_code";
$proto273["m_columns"][] = "user";
$proto273["m_columns"][] = "details";
$proto273["m_columns"][] = "should_pay";
$proto273["m_columns"][] = "expen_code";
$proto273["m_columns"][] = "salary_advance";
$proto273["m_columns"][] = "salary";
$proto273["m_columns"][] = "acc_no";
$proto273["m_columns"][] = "loan_no";
$obj = new SQLTable($proto273);

$proto272["m_table"] = $obj;
$proto272["m_sql"] = "`payment_for_pur`";
$proto272["m_alias"] = "";
$proto272["m_srcTableName"] = "daily_report - 3";
$proto274=array();
$proto274["m_sql"] = "";
$proto274["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto254["m_fromlist"][]=$obj;
$proto254["m_groupby"] = array();
												$proto276=array();
						$proto277=array();
$proto277["m_functiontype"] = "SQLF_CUSTOM";
$proto277["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto277["m_arguments"][]=$obj;
$proto277["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto277);

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

$proto254["m_groupby"][]=$obj;
$proto254["m_orderby"] = array();
$proto254["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto254);

$proto253["m_table"] = $obj;
$proto253["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st40 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"Expen\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur40 ON daily_report.DATE = pur40.KKK";
$proto253["m_alias"] = "pur40";
$proto253["m_srcTableName"] = "daily_report - 3";
$proto279=array();
$proto279["m_sql"] = "daily_report.DATE = pur40.KKK";
$proto279["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto279["m_column"]=$obj;
$proto279["m_contained"] = array();
$proto279["m_strCase"] = "= pur40.KKK";
$proto279["m_havingmode"] = false;
$proto279["m_inBrackets"] = false;
$proto279["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto279);

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

$proto0["m_fromlist"][]=$obj;
												$proto281=array();
$proto281["m_link"] = "SQLL_LEFTJOIN";
			$proto282=array();
$proto282["m_strHead"] = " SELECT";
$proto282["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st38";
$proto282["m_strFrom"] = "FROM `payment_for_pur`";
$proto282["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3";
$proto282["m_strOrderBy"] = "";
	
		;
			$proto282["cipherer"] = null;
$proto284=array();
$proto284["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3";
$proto284["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3"
));

$proto284["m_column"]=$obj;
$proto284["m_contained"] = array();
						$proto286=array();
$proto286["m_sql"] = "`payment_type` = \"Cash\"";
$proto286["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto284["m_contained"][]=$obj;
						$proto288=array();
$proto288["m_sql"] = " `details` = \"salary advance\"";
$proto288["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto288["m_column"]=$obj;
$proto288["m_contained"] = array();
$proto288["m_strCase"] = "= \"salary advance\"";
$proto288["m_havingmode"] = false;
$proto288["m_inBrackets"] = true;
$proto288["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto288);

			$proto284["m_contained"][]=$obj;
						$proto290=array();
$proto290["m_sql"] = "outlet_code =3";
$proto290["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto282["m_having"] = $obj;
$proto282["m_fieldlist"] = array();
						$proto294=array();
			$proto295=array();
$proto295["m_functiontype"] = "SQLF_CUSTOM";
$proto295["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto295["m_arguments"][]=$obj;
$proto295["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto295);

$proto294["m_sql"] = "DATE(`date_time`)";
$proto294["m_srcTableName"] = "daily_report - 3";
$proto294["m_expr"]=$obj;
$proto294["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto294);

$proto282["m_fieldlist"][]=$obj;
						$proto297=array();
			$proto298=array();
$proto298["m_functiontype"] = "SQLF_SUM";
$proto298["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto297["m_sql"] = "SUM(`amount`)";
$proto297["m_srcTableName"] = "daily_report - 3";
$proto297["m_expr"]=$obj;
$proto297["m_alias"] = "st38";
$obj = new SQLFieldListItem($proto297);

$proto282["m_fieldlist"][]=$obj;
$proto282["m_fromlist"] = array();
												$proto300=array();
$proto300["m_link"] = "SQLL_MAIN";
			$proto301=array();
$proto301["m_strName"] = "payment_for_pur";
$proto301["m_srcTableName"] = "daily_report - 3";
$proto301["m_columns"] = array();
$proto301["m_columns"][] = "id";
$proto301["m_columns"][] = "pur_id";
$proto301["m_columns"][] = "amount";
$proto301["m_columns"][] = "payment_type";
$proto301["m_columns"][] = "cheque_number";
$proto301["m_columns"][] = "cheque_date";
$proto301["m_columns"][] = "date_time";
$proto301["m_columns"][] = "outlet_code";
$proto301["m_columns"][] = "branch_code";
$proto301["m_columns"][] = "user";
$proto301["m_columns"][] = "details";
$proto301["m_columns"][] = "should_pay";
$proto301["m_columns"][] = "expen_code";
$proto301["m_columns"][] = "salary_advance";
$proto301["m_columns"][] = "salary";
$proto301["m_columns"][] = "acc_no";
$proto301["m_columns"][] = "loan_no";
$obj = new SQLTable($proto301);

$proto300["m_table"] = $obj;
$proto300["m_sql"] = "`payment_for_pur`";
$proto300["m_alias"] = "";
$proto300["m_srcTableName"] = "daily_report - 3";
$proto302=array();
$proto302["m_sql"] = "";
$proto302["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto282["m_fromlist"][]=$obj;
$proto282["m_groupby"] = array();
												$proto304=array();
						$proto305=array();
$proto305["m_functiontype"] = "SQLF_CUSTOM";
$proto305["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto305["m_arguments"][]=$obj;
$proto305["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto305);

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

$proto282["m_groupby"][]=$obj;
$proto282["m_orderby"] = array();
$proto282["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto282);

$proto281["m_table"] = $obj;
$proto281["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st38 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary advance\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur38 ON daily_report.DATE = pur38.KKK";
$proto281["m_alias"] = "pur38";
$proto281["m_srcTableName"] = "daily_report - 3";
$proto307=array();
$proto307["m_sql"] = "daily_report.DATE = pur38.KKK";
$proto307["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto307["m_column"]=$obj;
$proto307["m_contained"] = array();
$proto307["m_strCase"] = "= pur38.KKK";
$proto307["m_havingmode"] = false;
$proto307["m_inBrackets"] = false;
$proto307["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto307);

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

$proto0["m_fromlist"][]=$obj;
												$proto309=array();
$proto309["m_link"] = "SQLL_LEFTJOIN";
			$proto310=array();
$proto310["m_strHead"] = " SELECT";
$proto310["m_strFieldList"] = "DATE(`date_time`) AS KKK , SUM(`amount`) AS st39";
$proto310["m_strFrom"] = "FROM `payment_for_pur`";
$proto310["m_strWhere"] = "`payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3";
$proto310["m_strOrderBy"] = "";
	
		;
			$proto310["cipherer"] = null;
$proto312=array();
$proto312["m_sql"] = "`payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3";
$proto312["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3"
));

$proto312["m_column"]=$obj;
$proto312["m_contained"] = array();
						$proto314=array();
$proto314["m_sql"] = "`payment_type` = \"Cash\"";
$proto314["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "payment_type",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto312["m_contained"][]=$obj;
						$proto316=array();
$proto316["m_sql"] = " `details` = \"salary\"";
$proto316["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

$proto316["m_column"]=$obj;
$proto316["m_contained"] = array();
$proto316["m_strCase"] = "= \"salary\"";
$proto316["m_havingmode"] = false;
$proto316["m_inBrackets"] = true;
$proto316["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto316);

			$proto312["m_contained"][]=$obj;
						$proto318=array();
$proto318["m_sql"] = "outlet_code =3";
$proto318["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto310["m_having"] = $obj;
$proto310["m_fieldlist"] = array();
						$proto322=array();
			$proto323=array();
$proto323["m_functiontype"] = "SQLF_CUSTOM";
$proto323["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto323["m_arguments"][]=$obj;
$proto323["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto323);

$proto322["m_sql"] = "DATE(`date_time`)";
$proto322["m_srcTableName"] = "daily_report - 3";
$proto322["m_expr"]=$obj;
$proto322["m_alias"] = "KKK";
$obj = new SQLFieldListItem($proto322);

$proto310["m_fieldlist"][]=$obj;
						$proto325=array();
			$proto326=array();
$proto326["m_functiontype"] = "SQLF_SUM";
$proto326["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payment_for_pur",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto325["m_sql"] = "SUM(`amount`)";
$proto325["m_srcTableName"] = "daily_report - 3";
$proto325["m_expr"]=$obj;
$proto325["m_alias"] = "st39";
$obj = new SQLFieldListItem($proto325);

$proto310["m_fieldlist"][]=$obj;
$proto310["m_fromlist"] = array();
												$proto328=array();
$proto328["m_link"] = "SQLL_MAIN";
			$proto329=array();
$proto329["m_strName"] = "payment_for_pur";
$proto329["m_srcTableName"] = "daily_report - 3";
$proto329["m_columns"] = array();
$proto329["m_columns"][] = "id";
$proto329["m_columns"][] = "pur_id";
$proto329["m_columns"][] = "amount";
$proto329["m_columns"][] = "payment_type";
$proto329["m_columns"][] = "cheque_number";
$proto329["m_columns"][] = "cheque_date";
$proto329["m_columns"][] = "date_time";
$proto329["m_columns"][] = "outlet_code";
$proto329["m_columns"][] = "branch_code";
$proto329["m_columns"][] = "user";
$proto329["m_columns"][] = "details";
$proto329["m_columns"][] = "should_pay";
$proto329["m_columns"][] = "expen_code";
$proto329["m_columns"][] = "salary_advance";
$proto329["m_columns"][] = "salary";
$proto329["m_columns"][] = "acc_no";
$proto329["m_columns"][] = "loan_no";
$obj = new SQLTable($proto329);

$proto328["m_table"] = $obj;
$proto328["m_sql"] = "`payment_for_pur`";
$proto328["m_alias"] = "";
$proto328["m_srcTableName"] = "daily_report - 3";
$proto330=array();
$proto330["m_sql"] = "";
$proto330["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto310["m_fromlist"][]=$obj;
$proto310["m_groupby"] = array();
												$proto332=array();
						$proto333=array();
$proto333["m_functiontype"] = "SQLF_CUSTOM";
$proto333["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto333["m_arguments"][]=$obj;
$proto333["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto333);

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

$proto310["m_groupby"][]=$obj;
$proto310["m_orderby"] = array();
$proto310["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto310);

$proto309["m_table"] = $obj;
$proto309["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KKK , SUM(`amount`) AS st39 FROM `payment_for_pur` WHERE `payment_type` = \"Cash\" AND  ( `details` = \"salary\")AND outlet_code =3 GROUP BY DATE(`date_time`)) AS pur39 ON daily_report.DATE = pur39.KKK";
$proto309["m_alias"] = "pur39";
$proto309["m_srcTableName"] = "daily_report - 3";
$proto335=array();
$proto335["m_sql"] = "daily_report.DATE = pur39.KKK";
$proto335["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto335["m_column"]=$obj;
$proto335["m_contained"] = array();
$proto335["m_strCase"] = "= pur39.KKK";
$proto335["m_havingmode"] = false;
$proto335["m_inBrackets"] = false;
$proto335["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto335);

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

$proto0["m_fromlist"][]=$obj;
												$proto337=array();
$proto337["m_link"] = "SQLL_LEFTJOIN";
			$proto338=array();
$proto338["m_strHead"] = " SELECT";
$proto338["m_strFieldList"] = "DATE(`date_time`) AS KK2 , SUM(`amount`) AS st41";
$proto338["m_strFrom"] = "FROM `payments`";
$proto338["m_strWhere"] = "`status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3";
$proto338["m_strOrderBy"] = "";
	
		;
			$proto338["cipherer"] = null;
$proto340=array();
$proto340["m_sql"] = "`status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3";
$proto340["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3"
));

$proto340["m_column"]=$obj;
$proto340["m_contained"] = array();
						$proto342=array();
$proto342["m_sql"] = "`status`=\"sales arrears\"";
$proto342["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

$proto342["m_column"]=$obj;
$proto342["m_contained"] = array();
$proto342["m_strCase"] = "=\"sales arrears\"";
$proto342["m_havingmode"] = false;
$proto342["m_inBrackets"] = false;
$proto342["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto342);

			$proto340["m_contained"][]=$obj;
						$proto344=array();
$proto344["m_sql"] = "type=\"Cheque\"";
$proto344["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "type",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto340["m_contained"][]=$obj;
						$proto346=array();
$proto346["m_sql"] = "outlet=3";
$proto346["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto338["m_having"] = $obj;
$proto338["m_fieldlist"] = array();
						$proto350=array();
			$proto351=array();
$proto351["m_functiontype"] = "SQLF_CUSTOM";
$proto351["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto351["m_arguments"][]=$obj;
$proto351["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto351);

$proto350["m_sql"] = "DATE(`date_time`)";
$proto350["m_srcTableName"] = "daily_report - 3";
$proto350["m_expr"]=$obj;
$proto350["m_alias"] = "KK2";
$obj = new SQLFieldListItem($proto350);

$proto338["m_fieldlist"][]=$obj;
						$proto353=array();
			$proto354=array();
$proto354["m_functiontype"] = "SQLF_SUM";
$proto354["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto353["m_sql"] = "SUM(`amount`)";
$proto353["m_srcTableName"] = "daily_report - 3";
$proto353["m_expr"]=$obj;
$proto353["m_alias"] = "st41";
$obj = new SQLFieldListItem($proto353);

$proto338["m_fieldlist"][]=$obj;
$proto338["m_fromlist"] = array();
												$proto356=array();
$proto356["m_link"] = "SQLL_MAIN";
			$proto357=array();
$proto357["m_strName"] = "payments";
$proto357["m_srcTableName"] = "daily_report - 3";
$proto357["m_columns"] = array();
$proto357["m_columns"][] = "id";
$proto357["m_columns"][] = "sales_id";
$proto357["m_columns"][] = "type";
$proto357["m_columns"][] = "amount";
$proto357["m_columns"][] = "cheque_number";
$proto357["m_columns"][] = "cheque_date";
$proto357["m_columns"][] = "hide";
$proto357["m_columns"][] = "status";
$proto357["m_columns"][] = "opening_balance_id";
$proto357["m_columns"][] = "outlet";
$proto357["m_columns"][] = "date_time";
$proto357["m_columns"][] = "user";
$proto357["m_columns"][] = "status_2";
$obj = new SQLTable($proto357);

$proto356["m_table"] = $obj;
$proto356["m_sql"] = "`payments`";
$proto356["m_alias"] = "";
$proto356["m_srcTableName"] = "daily_report - 3";
$proto358=array();
$proto358["m_sql"] = "";
$proto358["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto338["m_fromlist"][]=$obj;
$proto338["m_groupby"] = array();
												$proto360=array();
						$proto361=array();
$proto361["m_functiontype"] = "SQLF_CUSTOM";
$proto361["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto361["m_arguments"][]=$obj;
$proto361["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto361);

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

$proto338["m_groupby"][]=$obj;
$proto338["m_orderby"] = array();
$proto338["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto338);

$proto337["m_table"] = $obj;
$proto337["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st41 FROM `payments` WHERE `status`=\"sales arrears\" and type=\"Cheque\"  AND outlet=3 GROUP BY DATE(`date_time`)) AS pur41 ON daily_report.DATE = pur41.KK2";
$proto337["m_alias"] = "pur41";
$proto337["m_srcTableName"] = "daily_report - 3";
$proto363=array();
$proto363["m_sql"] = "daily_report.DATE = pur41.KK2";
$proto363["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto363["m_column"]=$obj;
$proto363["m_contained"] = array();
$proto363["m_strCase"] = "= pur41.KK2";
$proto363["m_havingmode"] = false;
$proto363["m_inBrackets"] = false;
$proto363["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto363);

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

$proto0["m_fromlist"][]=$obj;
												$proto365=array();
$proto365["m_link"] = "SQLL_LEFTJOIN";
			$proto366=array();
$proto366["m_strHead"] = " SELECT";
$proto366["m_strFieldList"] = "DATE(`date_time`) AS KK2 , SUM(`amount`) AS st42";
$proto366["m_strFrom"] = "FROM `payments`";
$proto366["m_strWhere"] = "`status`=\"sales arrears\"and type=\"Cash\" AND outlet=3";
$proto366["m_strOrderBy"] = "";
	
		;
			$proto366["cipherer"] = null;
$proto368=array();
$proto368["m_sql"] = "`status`=\"sales arrears\"and type=\"Cash\" AND outlet=3";
$proto368["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`status`=\"sales arrears\"and type=\"Cash\" AND outlet=3"
));

$proto368["m_column"]=$obj;
$proto368["m_contained"] = array();
						$proto370=array();
$proto370["m_sql"] = "`status`=\"sales arrears\"";
$proto370["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

$proto370["m_column"]=$obj;
$proto370["m_contained"] = array();
$proto370["m_strCase"] = "=\"sales arrears\"";
$proto370["m_havingmode"] = false;
$proto370["m_inBrackets"] = false;
$proto370["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto370);

			$proto368["m_contained"][]=$obj;
						$proto372=array();
$proto372["m_sql"] = "type=\"Cash\"";
$proto372["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "type",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto368["m_contained"][]=$obj;
						$proto374=array();
$proto374["m_sql"] = "outlet=3";
$proto374["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto366["m_having"] = $obj;
$proto366["m_fieldlist"] = array();
						$proto378=array();
			$proto379=array();
$proto379["m_functiontype"] = "SQLF_CUSTOM";
$proto379["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto379["m_arguments"][]=$obj;
$proto379["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto379);

$proto378["m_sql"] = "DATE(`date_time`)";
$proto378["m_srcTableName"] = "daily_report - 3";
$proto378["m_expr"]=$obj;
$proto378["m_alias"] = "KK2";
$obj = new SQLFieldListItem($proto378);

$proto366["m_fieldlist"][]=$obj;
						$proto381=array();
			$proto382=array();
$proto382["m_functiontype"] = "SQLF_SUM";
$proto382["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto381["m_sql"] = "SUM(`amount`)";
$proto381["m_srcTableName"] = "daily_report - 3";
$proto381["m_expr"]=$obj;
$proto381["m_alias"] = "st42";
$obj = new SQLFieldListItem($proto381);

$proto366["m_fieldlist"][]=$obj;
$proto366["m_fromlist"] = array();
												$proto384=array();
$proto384["m_link"] = "SQLL_MAIN";
			$proto385=array();
$proto385["m_strName"] = "payments";
$proto385["m_srcTableName"] = "daily_report - 3";
$proto385["m_columns"] = array();
$proto385["m_columns"][] = "id";
$proto385["m_columns"][] = "sales_id";
$proto385["m_columns"][] = "type";
$proto385["m_columns"][] = "amount";
$proto385["m_columns"][] = "cheque_number";
$proto385["m_columns"][] = "cheque_date";
$proto385["m_columns"][] = "hide";
$proto385["m_columns"][] = "status";
$proto385["m_columns"][] = "opening_balance_id";
$proto385["m_columns"][] = "outlet";
$proto385["m_columns"][] = "date_time";
$proto385["m_columns"][] = "user";
$proto385["m_columns"][] = "status_2";
$obj = new SQLTable($proto385);

$proto384["m_table"] = $obj;
$proto384["m_sql"] = "`payments`";
$proto384["m_alias"] = "";
$proto384["m_srcTableName"] = "daily_report - 3";
$proto386=array();
$proto386["m_sql"] = "";
$proto386["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto366["m_fromlist"][]=$obj;
$proto366["m_groupby"] = array();
												$proto388=array();
						$proto389=array();
$proto389["m_functiontype"] = "SQLF_CUSTOM";
$proto389["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto389["m_arguments"][]=$obj;
$proto389["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto389);

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

$proto366["m_groupby"][]=$obj;
$proto366["m_orderby"] = array();
$proto366["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto366);

$proto365["m_table"] = $obj;
$proto365["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st42 FROM `payments` WHERE `status`=\"sales arrears\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur42 ON daily_report.DATE = pur42.KK2";
$proto365["m_alias"] = "pur42";
$proto365["m_srcTableName"] = "daily_report - 3";
$proto391=array();
$proto391["m_sql"] = "daily_report.DATE = pur42.KK2";
$proto391["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto391["m_column"]=$obj;
$proto391["m_contained"] = array();
$proto391["m_strCase"] = "= pur42.KK2";
$proto391["m_havingmode"] = false;
$proto391["m_inBrackets"] = false;
$proto391["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto391);

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

$proto0["m_fromlist"][]=$obj;
												$proto393=array();
$proto393["m_link"] = "SQLL_LEFTJOIN";
			$proto394=array();
$proto394["m_strHead"] = " SELECT";
$proto394["m_strFieldList"] = "DATE(`date_time`) AS KK2 , SUM(`amount`) AS st43";
$proto394["m_strFrom"] = "FROM `payments`";
$proto394["m_strWhere"] = "`status`=\"sales\" and type=\"Cheque\" AND outlet=3";
$proto394["m_strOrderBy"] = "";
	
		;
			$proto394["cipherer"] = null;
$proto396=array();
$proto396["m_sql"] = "`status`=\"sales\" and type=\"Cheque\" AND outlet=3";
$proto396["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`status`=\"sales\" and type=\"Cheque\" AND outlet=3"
));

$proto396["m_column"]=$obj;
$proto396["m_contained"] = array();
						$proto398=array();
$proto398["m_sql"] = "`status`=\"sales\"";
$proto398["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto396["m_contained"][]=$obj;
						$proto400=array();
$proto400["m_sql"] = "type=\"Cheque\"";
$proto400["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "type",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto396["m_contained"][]=$obj;
						$proto402=array();
$proto402["m_sql"] = "outlet=3";
$proto402["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto394["m_having"] = $obj;
$proto394["m_fieldlist"] = array();
						$proto406=array();
			$proto407=array();
$proto407["m_functiontype"] = "SQLF_CUSTOM";
$proto407["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto407["m_arguments"][]=$obj;
$proto407["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto407);

$proto406["m_sql"] = "DATE(`date_time`)";
$proto406["m_srcTableName"] = "daily_report - 3";
$proto406["m_expr"]=$obj;
$proto406["m_alias"] = "KK2";
$obj = new SQLFieldListItem($proto406);

$proto394["m_fieldlist"][]=$obj;
						$proto409=array();
			$proto410=array();
$proto410["m_functiontype"] = "SQLF_SUM";
$proto410["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto409["m_sql"] = "SUM(`amount`)";
$proto409["m_srcTableName"] = "daily_report - 3";
$proto409["m_expr"]=$obj;
$proto409["m_alias"] = "st43";
$obj = new SQLFieldListItem($proto409);

$proto394["m_fieldlist"][]=$obj;
$proto394["m_fromlist"] = array();
												$proto412=array();
$proto412["m_link"] = "SQLL_MAIN";
			$proto413=array();
$proto413["m_strName"] = "payments";
$proto413["m_srcTableName"] = "daily_report - 3";
$proto413["m_columns"] = array();
$proto413["m_columns"][] = "id";
$proto413["m_columns"][] = "sales_id";
$proto413["m_columns"][] = "type";
$proto413["m_columns"][] = "amount";
$proto413["m_columns"][] = "cheque_number";
$proto413["m_columns"][] = "cheque_date";
$proto413["m_columns"][] = "hide";
$proto413["m_columns"][] = "status";
$proto413["m_columns"][] = "opening_balance_id";
$proto413["m_columns"][] = "outlet";
$proto413["m_columns"][] = "date_time";
$proto413["m_columns"][] = "user";
$proto413["m_columns"][] = "status_2";
$obj = new SQLTable($proto413);

$proto412["m_table"] = $obj;
$proto412["m_sql"] = "`payments`";
$proto412["m_alias"] = "";
$proto412["m_srcTableName"] = "daily_report - 3";
$proto414=array();
$proto414["m_sql"] = "";
$proto414["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto394["m_fromlist"][]=$obj;
$proto394["m_groupby"] = array();
												$proto416=array();
						$proto417=array();
$proto417["m_functiontype"] = "SQLF_CUSTOM";
$proto417["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto417["m_arguments"][]=$obj;
$proto417["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto417);

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

$proto394["m_groupby"][]=$obj;
$proto394["m_orderby"] = array();
$proto394["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto394);

$proto393["m_table"] = $obj;
$proto393["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st43 FROM `payments` WHERE `status`=\"sales\" and type=\"Cheque\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur43 ON daily_report.DATE = pur43.KK2";
$proto393["m_alias"] = "pur43";
$proto393["m_srcTableName"] = "daily_report - 3";
$proto419=array();
$proto419["m_sql"] = "daily_report.DATE = pur43.KK2";
$proto419["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto419["m_column"]=$obj;
$proto419["m_contained"] = array();
$proto419["m_strCase"] = "= pur43.KK2";
$proto419["m_havingmode"] = false;
$proto419["m_inBrackets"] = false;
$proto419["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto419);

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

$proto0["m_fromlist"][]=$obj;
												$proto421=array();
$proto421["m_link"] = "SQLL_LEFTJOIN";
			$proto422=array();
$proto422["m_strHead"] = " SELECT";
$proto422["m_strFieldList"] = "DATE(`date_time`) AS KK2 , SUM(`amount`) AS st44";
$proto422["m_strFrom"] = "FROM `payments`";
$proto422["m_strWhere"] = "`status`=\"sales\"and type=\"Cash\" AND outlet=3";
$proto422["m_strOrderBy"] = "";
	
		;
			$proto422["cipherer"] = null;
$proto424=array();
$proto424["m_sql"] = "`status`=\"sales\"and type=\"Cash\" AND outlet=3";
$proto424["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`status`=\"sales\"and type=\"Cash\" AND outlet=3"
));

$proto424["m_column"]=$obj;
$proto424["m_contained"] = array();
						$proto426=array();
$proto426["m_sql"] = "`status`=\"sales\"";
$proto426["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto424["m_contained"][]=$obj;
						$proto428=array();
$proto428["m_sql"] = "type=\"Cash\"";
$proto428["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "type",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto424["m_contained"][]=$obj;
						$proto430=array();
$proto430["m_sql"] = "outlet=3";
$proto430["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto422["m_having"] = $obj;
$proto422["m_fieldlist"] = array();
						$proto434=array();
			$proto435=array();
$proto435["m_functiontype"] = "SQLF_CUSTOM";
$proto435["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto435["m_arguments"][]=$obj;
$proto435["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto435);

$proto434["m_sql"] = "DATE(`date_time`)";
$proto434["m_srcTableName"] = "daily_report - 3";
$proto434["m_expr"]=$obj;
$proto434["m_alias"] = "KK2";
$obj = new SQLFieldListItem($proto434);

$proto422["m_fieldlist"][]=$obj;
						$proto437=array();
			$proto438=array();
$proto438["m_functiontype"] = "SQLF_SUM";
$proto438["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto437["m_sql"] = "SUM(`amount`)";
$proto437["m_srcTableName"] = "daily_report - 3";
$proto437["m_expr"]=$obj;
$proto437["m_alias"] = "st44";
$obj = new SQLFieldListItem($proto437);

$proto422["m_fieldlist"][]=$obj;
$proto422["m_fromlist"] = array();
												$proto440=array();
$proto440["m_link"] = "SQLL_MAIN";
			$proto441=array();
$proto441["m_strName"] = "payments";
$proto441["m_srcTableName"] = "daily_report - 3";
$proto441["m_columns"] = array();
$proto441["m_columns"][] = "id";
$proto441["m_columns"][] = "sales_id";
$proto441["m_columns"][] = "type";
$proto441["m_columns"][] = "amount";
$proto441["m_columns"][] = "cheque_number";
$proto441["m_columns"][] = "cheque_date";
$proto441["m_columns"][] = "hide";
$proto441["m_columns"][] = "status";
$proto441["m_columns"][] = "opening_balance_id";
$proto441["m_columns"][] = "outlet";
$proto441["m_columns"][] = "date_time";
$proto441["m_columns"][] = "user";
$proto441["m_columns"][] = "status_2";
$obj = new SQLTable($proto441);

$proto440["m_table"] = $obj;
$proto440["m_sql"] = "`payments`";
$proto440["m_alias"] = "";
$proto440["m_srcTableName"] = "daily_report - 3";
$proto442=array();
$proto442["m_sql"] = "";
$proto442["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto422["m_fromlist"][]=$obj;
$proto422["m_groupby"] = array();
												$proto444=array();
						$proto445=array();
$proto445["m_functiontype"] = "SQLF_CUSTOM";
$proto445["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto445["m_arguments"][]=$obj;
$proto445["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto445);

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

$proto422["m_groupby"][]=$obj;
$proto422["m_orderby"] = array();
$proto422["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto422);

$proto421["m_table"] = $obj;
$proto421["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st44 FROM `payments` WHERE `status`=\"sales\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur44 ON daily_report.DATE = pur44.KK2";
$proto421["m_alias"] = "pur44";
$proto421["m_srcTableName"] = "daily_report - 3";
$proto447=array();
$proto447["m_sql"] = "daily_report.DATE = pur44.KK2";
$proto447["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto447["m_column"]=$obj;
$proto447["m_contained"] = array();
$proto447["m_strCase"] = "= pur44.KK2";
$proto447["m_havingmode"] = false;
$proto447["m_inBrackets"] = false;
$proto447["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto447);

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

$proto0["m_fromlist"][]=$obj;
												$proto449=array();
$proto449["m_link"] = "SQLL_LEFTJOIN";
			$proto450=array();
$proto450["m_strHead"] = " SELECT";
$proto450["m_strFieldList"] = "DATE(`date_time`) AS KK2 , SUM(`amount`) AS st45";
$proto450["m_strFrom"] = "FROM `payments`";
$proto450["m_strWhere"] = "`status`=\"opening balance\"and type=\"Cash\" AND outlet=3";
$proto450["m_strOrderBy"] = "";
	
		;
			$proto450["cipherer"] = null;
$proto452=array();
$proto452["m_sql"] = "`status`=\"opening balance\"and type=\"Cash\" AND outlet=3";
$proto452["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`status`=\"opening balance\"and type=\"Cash\" AND outlet=3"
));

$proto452["m_column"]=$obj;
$proto452["m_contained"] = array();
						$proto454=array();
$proto454["m_sql"] = "`status`=\"opening balance\"";
$proto454["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "status",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

$proto454["m_column"]=$obj;
$proto454["m_contained"] = array();
$proto454["m_strCase"] = "=\"opening balance\"";
$proto454["m_havingmode"] = false;
$proto454["m_inBrackets"] = false;
$proto454["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto454);

			$proto452["m_contained"][]=$obj;
						$proto456=array();
$proto456["m_sql"] = "type=\"Cash\"";
$proto456["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "type",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

			$proto452["m_contained"][]=$obj;
						$proto458=array();
$proto458["m_sql"] = "outlet=3";
$proto458["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "outlet",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

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

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

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

$proto450["m_having"] = $obj;
$proto450["m_fieldlist"] = array();
						$proto462=array();
			$proto463=array();
$proto463["m_functiontype"] = "SQLF_CUSTOM";
$proto463["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto463["m_arguments"][]=$obj;
$proto463["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto463);

$proto462["m_sql"] = "DATE(`date_time`)";
$proto462["m_srcTableName"] = "daily_report - 3";
$proto462["m_expr"]=$obj;
$proto462["m_alias"] = "KK2";
$obj = new SQLFieldListItem($proto462);

$proto450["m_fieldlist"][]=$obj;
						$proto465=array();
			$proto466=array();
$proto466["m_functiontype"] = "SQLF_SUM";
$proto466["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "payments",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto465["m_sql"] = "SUM(`amount`)";
$proto465["m_srcTableName"] = "daily_report - 3";
$proto465["m_expr"]=$obj;
$proto465["m_alias"] = "st45";
$obj = new SQLFieldListItem($proto465);

$proto450["m_fieldlist"][]=$obj;
$proto450["m_fromlist"] = array();
												$proto468=array();
$proto468["m_link"] = "SQLL_MAIN";
			$proto469=array();
$proto469["m_strName"] = "payments";
$proto469["m_srcTableName"] = "daily_report - 3";
$proto469["m_columns"] = array();
$proto469["m_columns"][] = "id";
$proto469["m_columns"][] = "sales_id";
$proto469["m_columns"][] = "type";
$proto469["m_columns"][] = "amount";
$proto469["m_columns"][] = "cheque_number";
$proto469["m_columns"][] = "cheque_date";
$proto469["m_columns"][] = "hide";
$proto469["m_columns"][] = "status";
$proto469["m_columns"][] = "opening_balance_id";
$proto469["m_columns"][] = "outlet";
$proto469["m_columns"][] = "date_time";
$proto469["m_columns"][] = "user";
$proto469["m_columns"][] = "status_2";
$obj = new SQLTable($proto469);

$proto468["m_table"] = $obj;
$proto468["m_sql"] = "`payments`";
$proto468["m_alias"] = "";
$proto468["m_srcTableName"] = "daily_report - 3";
$proto470=array();
$proto470["m_sql"] = "";
$proto470["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto450["m_fromlist"][]=$obj;
$proto450["m_groupby"] = array();
												$proto472=array();
						$proto473=array();
$proto473["m_functiontype"] = "SQLF_CUSTOM";
$proto473["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "`date_time`"
));

$proto473["m_arguments"][]=$obj;
$proto473["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto473);

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

$proto450["m_groupby"][]=$obj;
$proto450["m_orderby"] = array();
$proto450["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto450);

$proto449["m_table"] = $obj;
$proto449["m_sql"] = "LEFT JOIN ( SELECT DATE(`date_time`) AS KK2 , SUM(`amount`) AS st45 FROM `payments` WHERE `status`=\"opening balance\"and type=\"Cash\" AND outlet=3 GROUP BY DATE(`date_time`)) AS pur45 ON daily_report.DATE = pur45.KK2";
$proto449["m_alias"] = "pur45";
$proto449["m_srcTableName"] = "daily_report - 3";
$proto475=array();
$proto475["m_sql"] = "daily_report.DATE = pur45.KK2";
$proto475["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

$proto475["m_column"]=$obj;
$proto475["m_contained"] = array();
$proto475["m_strCase"] = "= pur45.KK2";
$proto475["m_havingmode"] = false;
$proto475["m_inBrackets"] = false;
$proto475["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto475);

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto477=array();
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "daily_report",
	"m_srcTableName" => "daily_report - 3"
));

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

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="daily_report - 3";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_daily_report___3 = createSqlQuery_daily_report___3();


	
		;

																							

$tdatadaily_report___3[".sqlquery"] = $queryData_daily_report___3;



$tableEvents["daily_report - 3"] = new eventsBase;
$tdatadaily_report___3[".hasEvents"] = false;

?>