

	function FORM_LOAD()
	{
		TRANSFLOW_SMRY_DGV = DataGridView("TRANSFLOW_SMRY_DGV");
		
		TRANSFLOW_SMRY_DGV.COLUMN.TOTAL_CREATE
		(
			[
				"REC_EODPROD_SF_BADORDER",
				"REC_EODPROD_SF_DELIVER_RECV",
				"REC_EODPROD_SF_DELIVER_SENT",
				"REC_EODPROD_SF_DESCREPANCY_MINUS",
				"REC_EODPROD_SF_DESCREPANCY_PLUS",
				"REC_EODPROD_SF_SALES_RETURN",
				"REC_EODPROD_SF_SOLD_ITEM",
				"REC_EODPROD_SF_SOLD_REDIRECT",
				"REC_EODPROD_SF_STOCK_IN",
				"REC_EODPROD_SF_STOCK_OUT",
				"REC_EODPROD_SF_PO",
				"REC_EODPROD_SF_DELIVERY_RTRN",
				"REC_EODPROD_SF_CUSA_AMOUNT",
				"REC_EODPROD_SF_CUSB_AMOUNT",
				"REC_EODPROD_SF_CUSC_AMOUNT",
				"REC_EODPROD_SF_CUSD_AMOUNT",
				"REC_EODPROD_SF_CUSE_AMOUNT",
				"REC_EODPROD_SF_OTHER",
				
				"REC_EODPROD_DC_SENIOR_20P",
				"REC_EODPROD_DC_SENIOR_5P",
				"REC_EODPROD_DC_PWD_20P",
				"REC_EODPROD_DC_PWD_5P",
				"REC_EODPROD_DC_GOV_5P",
				"REC_EODPROD_DC_CUSA_AMOUNT",
				"REC_EODPROD_DC_CUSB_AMOUNT",
				"REC_EODPROD_DC_CUSC_AMOUNT",
				"REC_EODPROD_DC_CUSD_AMOUNT",
				"REC_EODPROD_DC_CUSE_AMOUNT",
				"REC_EODPROD_DC_OTHER",	
				"TOTAL_SALES",
		
				"TOTAL_DISCOUNT",
				"REC_EODPROD_TOTAL_VATABLE",		
				"REC_EODPROD_TOTAL_VATEXEMPT",		
				"REC_EODPROD_TOTAL_NONVAT",		
				"REC_EODPROD_TOTAL_ZERORATED",		
				"REC_EODPROD_TOTAL_VATOTHER",		
				"REC_EODPROD_TOTAL_VAT",		
				"REC_EODPROD_TOTAL_VAT_LESS"	
			],
			'REC_EODPROD_CAT_PRODUCT_DESCRIPTION',
			[
				["TOTAL_SALES", "SALES_BY_PRODUCT_TOTAL_SALES"],
				["TOTAL_DISCOUNT", "SALES_BY_PRODUCT_TOTAL_DISCOUNT"],
				["REC_EODPROD_DC_CUSA_AMOUNT", 'SALES_BY_PRODUCT_DC_CUSA'],
				["REC_EODPROD_DC_CUSB_AMOUNT", 'SALES_BY_PRODUCT_DC_CUSB'],
				["REC_EODPROD_DC_CUSC_AMOUNT", 'SALES_BY_PRODUCT_DC_CUSC'],
				["REC_EODPROD_DC_CUSD_AMOUNT", 'SALES_BY_PRODUCT_DC_CUSD'],
				["REC_EODPROD_DC_CUSE_AMOUNT", 'SALES_BY_PRODUCT_DC_CUSE']
			]
		);

		TRANSFLOW_SMRY_DGV.ON_CLICK
		(			
			function(COL_INDEX, ROW_INDEX)
			{
				// Delete Button
				// ...........................................
				if(TRANSFLOW_SMRY_DGV.COLUMN.NAME(COL_INDEX) == "DELETE_CMD")
				{
					//TRANSFLOW_SMRY_DGV.ROW.REMOVE_AT(ROW_INDEX);
					//JSOC_ELEMENT.VAR_VALUE("SALES_BY_PRODUCT_TOTAL_SALES", JSVC_NUM.VAR_CFORMAT(TRANSFLOW_SMRY_DGV.COLUMN.SUM("TOTAL_SALES")));
				}
			}
		);   

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB") == true)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB", FLAG_BIGINT_NULL.toString(),"Any Branch");

			var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._GROUP.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_ACC_GROUP_STATUS', 2);

			JSCUS_SQL._ACCOUNT._GROUP.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function()
				{
					$('#SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB').select2();
				},
				"SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB",
				true,
				2,
				GET_MAP_ARRAY 
			);
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB") == true)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB", FLAG_BIGINT_NULL.toString(),"Any Category");

			var GET_MAP_ARRAY = JSCUS_SQL._CATEGORY._PRODTYPE.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODTYPE_STATUS', 2);

			JSCUS_SQL._CATEGORY._PRODTYPE.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function()
				{
					$('#SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB').select2();
				},
				"SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB",
				true,
				2,
				GET_MAP_ARRAY 
			);
		}
	}

	function HTTP_LOAD_PRODUCT()
	{
		if
		(
			JSVC_VAR.VAR_ISSET(SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB) &&
			JSOC_CMB.VAR_SELECTED_INDEX(SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB) < 0 ||
			JSVC_NUM.VAR_NVALL(JSOC_CMB.VAR_SELECTED_VALUE(SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB)) < 0
		)
		{
			JSOC_DIALOG.VAR_MESSAGE_BOX
			(
				'You must select branch.', 
				'Information',
				'OK', 'WARNING',
				function(MESSAGE_RESPONSE)
				{
					SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB.style.borderColor = JSCUS_CACHE.SITE_ON_ERROR_BORDER_COLOR;
					SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB.focus();
				}
			);	
			return;
		}

		var GET_MAP_ARRAY = JSCUS_SQL._CATEGORY._PRODUCT_BRANCH.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODBRANCH_ACC_GROUP_ID', JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_SALES_BY_PROD_ACC_GROUP_ID_CMB")));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODBRANCH_CAT_PRICEMDL_ID', 1);
		
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODBRANCH_STATUS', 2);
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_SKIP', SKIP);

		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._CATEGORY._PRODUCT_BRANCH.CUS_GET
		(
			GET_MAP_ARRAY,
			HTTP_LOAD_PRODUCT_CALLBACK,
			true
		);
	}

	function HTTP_LOAD_PRODUCT_CALLBACK(IS_SUCCESS, RESPONSE_STRING)
	{
		// Disable Dialogs
		// _______________________________________________________________________
		CUS_SEND_DIALOG_TRY_DISMISS();

		//RESET DGV
		// _______________________________________________________________________
		if (SKIP == 0)
			TRANSFLOW_SMRY_DGV.ROW.CLEAR();
		
		// Validate
		// _______________________________________________________________________
		if(IS_SUCCESS === false)
		{
			alert("CONNECTION ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// Validate JSON Response
		// _______________________________________________________________________
		var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);
		if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false)
		{
			alert("REQUEST ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// JSON Empty (Clears the DataGrodView)
		// _______________________________________________________________________
		if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") <= 0)
		{
			if (SKIP == 0)
				TRANSFLOW_SMRY_DGV.ROW.CLEAR();
			return;
		}

		// Populate DGV
		// _______________________________________________________________________
		var JSON_COUNT = JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT");
		var COUNTER = 1;
		while(COUNTER <= JSON_COUNT)
		{
			if (JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB")) > 0)
			{
				if
				(
					JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_SALES_BY_PROD_CAT_PRODTYPE_ID_CMB")) ==
					JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "CAT_PRODUCT_CAT_PRODTYPE_ID_LV1", COUNTER))
				)
				{
					var RINDEX = TRANSFLOW_SMRY_DGV.ROW.COUNT();
					TRANSFLOW_SMRY_DGV.ROW.INSERT_AT(RINDEX);
					TRANSFLOW_SMRY_DGV.CELL.VALUE("ROW_COUNT", RINDEX, RINDEX + 1);
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_CAT_PRODUCT_ID", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "CAT_PRODUCT_ID", COUNTER));
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_CAT_PRODUCT_DESCRIPTION", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "CAT_PRODUCT_DESCRIPTION", COUNTER));
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_UOM", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_AMOUNT_PRICE", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_SOLD_ITEM", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSA_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSB_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSC_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSD_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSE_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_20P", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_5P", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_20P", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_5P", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_GOV_5P", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSA_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSB_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSC_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSD_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSE_AMOUNT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_OTHER", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATABLE", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATEXEMPT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_NONVAT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_ZERORATED", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATOTHER", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT", RINDEX, "");
					TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT_LESS", RINDEX, "");
				}
			}
			else
			{
				var RINDEX = TRANSFLOW_SMRY_DGV.ROW.COUNT();
				TRANSFLOW_SMRY_DGV.ROW.INSERT_AT(RINDEX);
				TRANSFLOW_SMRY_DGV.CELL.VALUE("ROW_COUNT", RINDEX, RINDEX + 1);
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_CAT_PRODUCT_ID", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "CAT_PRODUCT_ID", COUNTER));
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_CAT_PRODUCT_DESCRIPTION", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "CAT_PRODUCT_DESCRIPTION", COUNTER));
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_UOM", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_AMOUNT_PRICE", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_SOLD_ITEM", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSA_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSB_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSC_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSD_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSE_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_20P", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_5P", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_20P", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_5P", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_GOV_5P", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSA_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSB_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSC_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSD_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSE_AMOUNT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_OTHER", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATABLE", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATEXEMPT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_NONVAT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_ZERORATED", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATOTHER", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT", RINDEX, "");
				TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT_LESS", RINDEX, "");
			}
			COUNTER++;
		}

		if (JSON_COUNT == 1000)
		{
			SKIP = SKIP + 1000;
			HTTP_LOAD_PRODUCT();
		}
	}

	function HTTP_LOAD_EOD_PERPROD()
	{
		if(TRANSFLOW_SMRY_DGV.ROW.COUNT() <= 0)
		{
			JSOC_DIALOG.VAR_MESSAGE_BOX
			(
				'You must load product first to generate.', 
				'Information',
				'OK', 'WARNING',
				function(MESSAGE_RESPONSE)
				{
				}
			);	
			return;
		}

		var ROW_INDEX = 0; var IS_FOUND = false;
		while(TRANSFLOW_SMRY_DGV.ROW.COUNT() > ROW_INDEX)
		{
			if(TRANSFLOW_SMRY_DGV.CELL.VALUE("CHECK_CMD", ROW_INDEX) == true)
			{
				IS_FOUND = true;
				DGV_INDEX = ROW_INDEX;
				break;
			}
			ROW_INDEX++;
		}

		if(IS_FOUND == false)
		{
			JSOC_DIALOG.VAR_MESSAGE_BOX
			(
				'No Product is selected.', 
				'Information',
				'OK', 'WARNING',
				function(MESSAGE_RESPONSE)
				{
				}
			);	
			return;
		}

		HTTP_SEARCH();
	}

	function HTTP_SEARCH()
	{
		var GET_MAP_ARRAY = JSCUS_SQL._RECORD._EOD_PRODUCT.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_EODPROD_CAT_PRODUCT_ID', JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_CAT_PRODUCT_ID", DGV_INDEX)));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_EODPROD_DATE_REPORT_FROM', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_DATE_FROM_SALES_BY_PROD_DTP"), "YYYY-MM-DD") + " 00:00:00.000000");
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_EODPROD_DATE_REPORT_TO', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_DATE_TO_SALES_BY_PROD_DTP"), "YYYY-MM-DD") + " 23:59:59.999999");

		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_SKIP', SKIP);

		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._EOD_PRODUCT.CUS_GET
		(
			GET_MAP_ARRAY,
			HTTP_LOAD_EOD_CALLBACK,
			true
		);
	}


	// For preparing dynamic layout for discount and stock flow
	function PREPARE_EOD_HEADER(JSON_DATA, JSON_ID, HEADER_ID, CELL_ID)
	{
		if(JSRC_JSON.REF_READ(JSON_DATA, "JSON_COUNT") <= 0)
		 	return;
		
		var CURRENT_HEADER_CAPTION = '';
		CURRENT_HEADER_CAPTION = JSRC_JSON.REF_READ(JSON_DATA, JSON_ID, 1);
		
		if(JSVC_STR.VAR_IS_BLANK(CURRENT_HEADER_CAPTION) == false)
		{
			JSOC_ELEMENT.VAR_VALUE
			(
				HEADER_ID, 
				CURRENT_HEADER_CAPTION
			);
			JSOC_STYLE.VAR_DISPLAY(HEADER_ID, 'DEFAULT');
			JSOC_STYLE.VAR_DISPLAY(CELL_ID, 'DEFAULT');
		}
		else
		{
			JSOC_STYLE.VAR_DISPLAY(HEADER_ID, 'NONE');
			JSOC_STYLE.VAR_DISPLAY(CELL_ID, 'NONE');
		}
	}


	function HTTP_LOAD_EOD_CALLBACK(IS_SUCCESS, RESPONSE_STRING)
	{
		// Disable Dialogs
		// _______________________________________________________________________
		CUS_SEND_DIALOG_TRY_DISMISS();

		// Validate
		// _______________________________________________________________________
		if(IS_SUCCESS === false)
		{
			alert("CONNECTION ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// Validate JSON Response
		// _______________________________________________________________________
		var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);
		if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false)
		{
			alert("REQUEST ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// Update Header
		// _______________________________________________________________________
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_SF_CUSA_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_SF_CUSA_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_SF_CUSA_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_SF_CUSB_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_SF_CUSB_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_SF_CUSB_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_SF_CUSC_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_SF_CUSC_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_SF_CUSC_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_SF_CUSD_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_SF_CUSD_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_SF_CUSD_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_SF_CUSE_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_SF_CUSE_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_SF_CUSE_AMOUNT'
		// );
				
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_DC_CUSA_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_DC_CUSA_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_DC_CUSA_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_DC_CUSB_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_DC_CUSB_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_DC_CUSB_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_DC_CUSC_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_DC_CUSC_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_DC_CUSC_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_DC_CUSD_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_DC_CUSD_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_DC_CUSD_AMOUNT'
		// );
		// PREPARE_EOD_HEADER
		// (
		// 	JSON_OBJECT,
		// 	'REC_EODPROD_DC_CUSE_DESC', 
		// 	'TRANSFLOW_SMRY_DGV_HEADER_REC_EODPROD_DC_CUSE_AMOUNT',
		// 	'TRANSFLOW_SMRY_DGV_ROW_REC_EODPROD_DC_CUSE_AMOUNT'
		// );

		// Populate DGV
		// _______________________________________________________________________
		var JSON_COUNT = JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT");
		var COUNTER = 1;
		while(COUNTER <= JSON_COUNT)
		{
			//console.log(DGV_INDEX);
			//console.log(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_SOLD_ITEM", COUNTER));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_AMOUNT_PRICE", DGV_INDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_SOLD_ITEM", COUNTER));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_SOLD_ITEM", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_SOLD_ITEM", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_SOLD_ITEM", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSA_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSA_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_CUSA_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSB_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSB_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_CUSB_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSC_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSC_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_CUSC_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSD_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSD_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_CUSD_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSE_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSE_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_SF_CUSE_AMOUNT", COUNTER)));

			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_20P", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_20P", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_SENIOR_20P", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_5P", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_5P", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_SENIOR_5P", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_20P", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_20P", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_PWD_20P", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_5P", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_5P", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_PWD_5P", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_GOV_5P", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_GOV_5P", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_GOV_5P", COUNTER)));

			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSA_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSA_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_CUSA_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSB_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSB_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_CUSB_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSC_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSC_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_CUSC_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSD_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSD_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_CUSD_AMOUNT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSE_AMOUNT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSE_AMOUNT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_CUSE_AMOUNT", COUNTER)));

			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_OTHER", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_OTHER", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_DC_OTHER", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATABLE", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATABLE", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_VATABLE", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATEXEMPT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATEXEMPT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_VATEXEMPT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_NONVAT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_NONVAT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_NONVAT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_ZERORATED", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_ZERORATED", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_ZERORATED", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATOTHER", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATOTHER", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_VATOTHER", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_VAT", COUNTER)));
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT_LESS", DGV_INDEX, JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT_LESS", DGV_INDEX)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_EODPROD_TOTAL_VAT_LESS", COUNTER)));
			
			COUNTER++;
		}

		if (JSON_COUNT == 1000)
		{
			SKIP = SKIP + 1000;
			HTTP_SEARCH();
		}
		else
		{
			DGV_INDEX++;
			while(TRANSFLOW_SMRY_DGV.ROW.COUNT() > DGV_INDEX)
			{
				if(TRANSFLOW_SMRY_DGV.CELL.VALUE("CHECK_CMD", DGV_INDEX) == true)
				{
					SKIP = 0;
					HTTP_SEARCH();
					return;
				}
				DGV_INDEX++;
			}

			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_AMOUNT_PRICE");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_VATABLE");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_VATEXEMPT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_NONVAT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_ZERORATED");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_VATOTHER");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_VAT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_TOTAL_VAT_LESS");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_SOLD_ITEM");

			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_CUSA_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_CUSB_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_CUSC_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_CUSD_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_SF_CUSE_AMOUNT");
			
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_DC_CUSA_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_DC_CUSB_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_DC_CUSC_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_DC_CUSD_AMOUNT");
			TRANSFLOW_SMRY_DGV.COLUMN.CFORMAT("REC_EODPROD_DC_CUSE_AMOUNT");

			var ROW_INDEX = 0;
			var TOTAL_QTY = JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.COLUMN.SUM("REC_EODPROD_SF_SOLD_ITEM"));

			while(TRANSFLOW_SMRY_DGV.ROW.COUNT() > ROW_INDEX)
			{
				TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_SALES', ROW_INDEX,
					JSVC_NUM.VAR_CFORMAT(
						JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_SALES', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_VATABLE', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_VATEXEMPT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_NONVAT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_ZERORATED', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_VATOTHER', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_TOTAL_VAT', ROW_INDEX))
					));


				TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_DISCOUNT', ROW_INDEX,
					JSVC_NUM.VAR_CFORMAT(
						JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_DISCOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_SENIOR_20P', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_SENIOR_5P', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_PWD_20P', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_PWD_5P', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_GOV_5P', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_CUSA_AMOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_CUSB_AMOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_CUSC_AMOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_CUSD_AMOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_CUSE_AMOUNT', ROW_INDEX)) +
			    		JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_DC_OTHER', ROW_INDEX))
					));

				if(TOTAL_QTY > 0)
				{
					TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_PERCENTAGE', ROW_INDEX,
						JSVC_NUM.VAR_FORMAT
						(
							(JSVC_NUM.VAR_NVAL(TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_SF_SOLD_ITEM', ROW_INDEX)) /
							TOTAL_QTY), 
							3
						) + '%');
				}
				else
					TRANSFLOW_SMRY_DGV.CELL.VALUE('REC_EODPROD_PERCENTAGE', ROW_INDEX, '0%');

				ROW_INDEX++;
			}
			
			DGV_SUM();
		}
	}

	function DGV_SUM()
	{
		TRANSFLOW_SMRY_DGV.COLUMN.TOTAL_REFRESH();
		return;
	};

	function INITIALIZE_DGV()
	{
		var RINDEX = 0;
		while(TRANSFLOW_SMRY_DGV.ROW.COUNT() > RINDEX)
		{
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_PERCENTAGE", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_AMOUNT_PRICE", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_UOM", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_AMOUNT_PRICE", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_SOLD_ITEM", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSA_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSB_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSC_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSD_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_SF_CUSE_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_20P", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_SENIOR_5P", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_20P", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_PWD_5P", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_GOV_5P", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSA_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSB_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSC_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSD_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_CUSE_AMOUNT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_DC_OTHER", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATABLE", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATEXEMPT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_NONVAT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_ZERORATED", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VATOTHER", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE("REC_EODPROD_TOTAL_VAT_LESS", RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_SALES', RINDEX, "");
			TRANSFLOW_SMRY_DGV.CELL.VALUE('TOTAL_DISCOUNT', RINDEX, "");

			RINDEX++;
		}
	}

	FORM_INITIALIZE();
	FORM_LOAD();