
	function FORM_LOAD()
	{
		JOB_ORDER_DGV = DataGridView("JOB_ORDER_DGV");

						
		// Preload Branches
		// _______________________________________________________________________
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_JORDER_ACC_GROUP_ID_CMB") == true)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_REC_JORDER_ACC_GROUP_ID_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_REC_JORDER_ACC_GROUP_ID_CMB", FLAG_BIGINT_NULL.toString(),"Any Branch");
			//var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._GROUP.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();

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


		// Preload SA
		// _______________________________________________________________________
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_JORDER_USER_ASSIGN_CMB") == true)
		{
			var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._MEMBER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_ACC_ACCOUNT_ACC_LEVEL_ID', 6);

			JSCUS_SQL._ACCOUNT._MEMBER.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					if(IS_SUCCESS)
					{
						JSOC_CMB.VAR_CLEAR("SEARCH_REC_JORDER_USER_ASSIGN_CMB");
						JSOC_CMB.VAR_ADD("SEARCH_REC_JORDER_USER_ASSIGN_CMB", FLAG_BIGINT_NULL.toString(),"Any Sales Agent");
				
						JSOC_CMB.VAR_ADD_FROM_JSON
						(
							"SEARCH_REC_JORDER_USER_ASSIGN_CMB",  RESPONSE_STRING,
							"ACC_ACCOUNT_ID",
							"ACC_ACCOUNT_NAME",
							true, false
						);		
					}
					
					$('#SEARCH_REC_JORDER_USER_ASSIGN_CMB').html($('#SEARCH_REC_JORDER_USER_ASSIGN_CMB option').sort(function (a, b) {
						    return a.text == b.text ? 0 : a.text < b.text ? -1 : 1
						}));
					
					$('#SEARCH_REC_JORDER_USER_ASSIGN_CMB').select2();
				},
				"SEARCH_REC_JORDER_USER_ASSIGN_CMB",
				true, 2,
				GET_MAP_ARRAY 
			);
		}
		
		// Setup custom items
		// _______________________________________________________________________
		LOAD_PRODUCT();
	};


	// Load Products from DGV_PRESET_CMB
	function LOAD_PRODUCT()
	{
		// Initialize
		// _______________________________________________________________________
		var PRESET_INDEX = 0;
		var AUTO_HEADER = [];
		
		
		// Populate DGVs
		// _______________________________________________________________________
		while(JSOC_CMB.VAR_COUNT('DGV_PRESET_CMB') > PRESET_INDEX)
		{
			JSOC_ELEMENT.VAR_VALUE
			(
				'JOB_ORDER_DGV_HEADER_PRODUCT_' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0'), 
				JSOC_CMB.VAR_TEXT('DGV_PRESET_CMB', PRESET_INDEX)
			);
			
			PRESET_INDEX ++;
		}
		
					
		// Hide all unused slots
		// _______________________________________________________________________
		while(20 > PRESET_INDEX)
		{
			JOB_ORDER_DGV.COLUMN.DISPLAY 
			(
				'PRODUCT_' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0'),
				'NONE'
			);
			
			JSOC_STYLE.VAR_DISPLAY
			(
				'JOB_ORDER_DGV_ROW_PRODUCT_' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0'),
				'NONE'
			);
			
			PRESET_INDEX ++;			
		}
		
		
		// Populate Headers
		// _______________________________________________________________________
		PRESET_INDEX = 0;
		while
		(
			JSOC_CMB.VAR_COUNT('DGV_HEADER_CMB') > PRESET_INDEX && 
			PRESET_INDEX < 6
		)
		{
			JSOC_ELEMENT.VAR_VALUE
			(
				'HEADER_CARD' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0') + '_TITLE_LBL', 
				JSOC_CMB.VAR_TEXT('DGV_HEADER_CMB', PRESET_INDEX)
			);
			AUTO_HEADER.push
			(
				[
					'PRODUCT_' + JSVC_STR.VAR_FIX
					(
						(
							JSOC_CMB.VAR_INDEX_OF_VALUE
							(
								'DGV_PRESET_CMB',
								JSOC_CMB.VAR_VALUE('DGV_HEADER_CMB', PRESET_INDEX)
							) + 1
						).toString(), 
						null, 2, 2, '0'
					),
					'HEADER_CARD' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0') + '_VALUE_LBL'
				]
			);
			PRESET_INDEX ++;
		}	
		
		
		// Hide all unused Headers
		// _______________________________________________________________________
		while
		(
			6 > PRESET_INDEX
		)
		{
			JSOC_STYLE.VAR_DISPLAY
			(
				'HEADER_CARD' + JSVC_STR.VAR_FIX((PRESET_INDEX + 1).toString(), null, 2, 2, '0') + '_CARD', 
				'NONE'
			);
			PRESET_INDEX ++;
		}	
		
		
		// Auto Total
		// _______________________________________________________________________	
		JOB_ORDER_DGV.COLUMN.TOTAL_CREATE
		(
			[
				'PRODUCT_01',
				'PRODUCT_02',
				'PRODUCT_03',
				'PRODUCT_04',
				'PRODUCT_05',
				
				'PRODUCT_06',
				'PRODUCT_07',
				'PRODUCT_08',
				'PRODUCT_09',
				'PRODUCT_10',
				
				'PRODUCT_11',
				'PRODUCT_12',
				'PRODUCT_13',
				'PRODUCT_14',
				'PRODUCT_15',
				
				'PRODUCT_16',
				'PRODUCT_17',
				'PRODUCT_18',
				'PRODUCT_19',
				'PRODUCT_20'
			],
			'REC_CLIENT_NAME',
			AUTO_HEADER
		);
	};
	

	function HTTP_SEARCH()
	{
		var GET_MAP_ARRAY = JSCUS_SQL._RECORD._JOB_ORDER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_SALES_BY_CUST_ACC_GROUP_ID_CMB") == true)
		{
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_ACC_GROUP_ID', JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_SALES_BY_CUST_ACC_GROUP_ID_CMB")));
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_JORDER_USER_ASSIGN_CMB") == true)
		{
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_USER_ASSIGN', JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_REC_JORDER_USER_ASSIGN_CMB")));
		}
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_DATE_COMPLETE_FROM', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_JORDER_DATE_COMPLETE_FROM_DTP"), "YYYY-MM-DD") + " 00:00:00.000000");
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_DATE_COMPLETE_TO', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_JORDER_DATE_COMPLETE_TO_DTP"), "YYYY-MM-DD") + " 23:59:59.999999");
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_STATUS', 4);
		
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._JOB_ORDER.CUS_BY_CUSTOMER
		(
			GET_MAP_ARRAY,
			HTTP_LOAD_CALLBACK,
			true
		);
	}

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

		//RESET DGV
		// _______________________________________________________________________
		JOB_ORDER_DGV.ROW.CLEAR();
		//JSOC_ELEMENT.VAR_VALUE("SALES_BY_CUSTOMER_TOTAL_SALES", 0.00);
		
		// 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)
		{
			JOB_ORDER_DGV.ROW.CLEAR();
			JOB_ORDER_DGV.COLUMN.TOTAL_REFRESH();
			return;
		}

		// Populate DGV
		// _______________________________________________________________________

/*
		JOB_ORDER_DGV.POPULATE_FROM_QUERY
		(
			JSON_OBJECT, 
			'',
			false,
			false,
			1,
			[2, 1]
		);
*/

		var PRODUCT_SOLD = [];
		var PRODUCT_INDEX = 0;
		var PRODUCT_CURRENT_INDEX = 0;
		var ROW_INDEX = 0;
		
		var JSON_COUNT = JSVC_NUM.VAR_NVALL(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT"));
		var JSON_INDEX = 1;
		
		var CURRENT_CLIENT = 0;
		var LAST_CLIENT = 0;


		while(JSON_COUNT >= JSON_INDEX)
		{
			// Initialize Loop
			// ...........................................
			CURRENT_CLIENT = JSVC_NUM.VAR_NVALL
			(
				JSRC_JSON.REF_READ
				(
					JSON_OBJECT, "REC_JORDER_REC_CLIENT_ID", JSON_INDEX
				)
			);
			
			
			// New Customer
			// ...........................................
			if(LAST_CLIENT != CURRENT_CLIENT)
			{
				// Create new line
				HTTP_LOAD_POPULATE_LINE(JSON_OBJECT, ROW_INDEX, PRODUCT_SOLD, JSON_INDEX);	
				
				// Reset Var
				PRODUCT_INDEX = 0;
				PRODUCT_SOLD = [];
				while(JSOC_CMB.VAR_COUNT('DGV_PRESET_CMB') > PRODUCT_INDEX)
				{
					PRODUCT_SOLD.push(0);
					PRODUCT_INDEX ++;
				}
		
				JOB_ORDER_DGV.ROW.ADD();	
				ROW_INDEX = JOB_ORDER_DGV.ROW.COUNT() - 1;
				LAST_CLIENT = CURRENT_CLIENT;
			}
			
			
			
			// Read Current Value
			// ...........................................
			PRODUCT_CURRENT_INDEX = JSOC_CMB.VAR_INDEX_OF_VALUE
			(
				'DGV_PRESET_CMB', 
				JSVC_NUM.VAR_NVALL
				(
					JSRC_JSON.REF_READ
					(
						JSON_OBJECT, "CAT_PRODUCT_ID", JSON_INDEX
					)
				)				
			);	
			if(PRODUCT_CURRENT_INDEX >= 0)
			{
				PRODUCT_SOLD[PRODUCT_CURRENT_INDEX] += JSVC_NUM.VAR_NVALL
				(	
					JSRC_JSON.REF_READ
					(
						JSON_OBJECT, "REC_JORDER_TASK_QTY_ACTUAL", JSON_INDEX
					)
				);
			}
			
			// Color Coding (Uncomment to use)
			// ...........................................	
			//POS_SALE_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#1cc88a"; // Safe
			//POS_SALE_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#5a5c69"; // Neutral
			//POS_SALE_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#f6c23e"; // Caution
			//POS_SALE_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#e74a3b"; // Warning
			
			// To next loop
			// ...........................................	
			JSON_INDEX ++;
		}
		
		
		// Create new line
		HTTP_LOAD_POPULATE_LINE(JSON_OBJECT, ROW_INDEX, PRODUCT_SOLD, JSON_INDEX - 1, true);
			
		JOB_ORDER_DGV.COLUMN.SORT('REC_CLIENT_NAME', 'ASC');	
		JOB_ORDER_DGV.ROW.REFRESH_ROW_COUNT();
		JOB_ORDER_DGV.COLUMN.TOTAL_REFRESH();
		
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_01');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_02');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_03');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_04');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_05');

		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_06');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_07');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_08');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_09');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_10');
		
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_11');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_12');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_13');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_14');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_15');

		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_16');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_17');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_18');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_19');
		JOB_ORDER_DGV.COLUMN.CFORMAT('PRODUCT_20');
						
		ROW_INDEX = 0;
		//HTTP_LOAD_LINE(ROW_INDEX);

	}

	function HTTP_LOAD_POPULATE_LINE(JSON_OBJECT, ROW_INDEX, PRODUCT_SOLD, JSON_INDEX, IS_LAST_LINE = false)
	{	
		// Abort if first line
		// ...........................................
		if(JSON_INDEX <= 1 && IS_LAST_LINE == false)
		{
			return;
		}
		else if(IS_LAST_LINE == false)
		{
			JSON_INDEX --;
		}
		
		// Populate data
		// ...........................................	
		JOB_ORDER_DGV.CELL.VALUE
		(
			'REC_CLIENT_NAME', ROW_INDEX, 
			JSRC_JSON.REF_READ
			(
				JSON_OBJECT, "REC_CLIENT_NAME", JSON_INDEX
			)
		);
		JOB_ORDER_DGV.CELL.VALUE
		(
			'REC_CLIENT_CONTACT', ROW_INDEX,
			JSRC_JSON.REF_READ
			(
				JSON_OBJECT, "REC_CLIENT_CONTACT", JSON_INDEX
			)
		);
		JOB_ORDER_DGV.CELL.VALUE
		(
			'REC_CLIENT_ADDRESS', ROW_INDEX,
			JSRC_JSON.REF_READ
			(
				JSON_OBJECT, "REC_CLIENT_ADDRESS", JSON_INDEX
			)
		);		
		
		// Populate Products
		// ...........................................	
		var PRODUCT_INDEX = 0;
		while(PRODUCT_SOLD.length > PRODUCT_INDEX)
		{
			JOB_ORDER_DGV.CELL.VALUE
			(
				'PRODUCT_' + JSVC_STR.VAR_FIX((PRODUCT_INDEX + 1).toString(), null, 2, 2, '0'), ROW_INDEX,
				PRODUCT_SOLD[PRODUCT_INDEX]
			);
			PRODUCT_INDEX ++;
		}
	}


	function HTTP_LOAD_LINE(ROW_INDEX)
	{
		G_ROW_INDEX = ROW_INDEX;
		var GET_MAP_ARRAY = JSCUS_SQL._RECORD._JOB_ORDER_TASK.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();

		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_LONG_A_FROM', JSVC_NUM.VAR_NVALL(JOB_ORDER_DGV.CELL.VALUE('REC_JORDER_ID', ROW_INDEX)));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_LONG_A_TO', JSVC_NUM.VAR_NVALL(JOB_ORDER_DGV.CELL.VALUE('REC_JORDER_ID', ROW_INDEX)));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_DECIMAL_A_FROM', 1);
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_DECIMAL_A_TO', 1);

		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._JOB_ORDER_TASK.CUS_GET
		(
			GET_MAP_ARRAY,
			HTTP_LOAD_LINE_CALLBACK,
			true
		);
	}

	function HTTP_LOAD_LINE_CALLBACK(IS_SUCCESS, RESPONSE_STRING)
	{
		// Validate
		// _______________________________________________________________________
		if(IS_SUCCESS === false)
		{
			CUS_SEND_DIALOG_TRY_DISMISS();
			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)
		{
			CUS_SEND_DIALOG_TRY_DISMISS();
			alert("REQUEST ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// JSON Empty (Clears the DataGrodView)
		// _______________________________________________________________________
		if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") <= 0)
		{
			//STORE NO DATA
			JOB_ORDER_DGV.CELL.VALUE('REC_JORDER_ITEM_DESCRIPTION', G_ROW_INDEX, 'No record');

			if (JOB_ORDER_DGV.ROW.COUNT() > G_ROW_INDEX + 1)
				HTTP_LOAD_LINE(G_ROW_INDEX + 1);
			else
				CUS_SEND_DIALOG_TRY_DISMISS();
		}
		else
		{
			var JSON_COUNT = JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT");
			var COUNTER = 1;
			var ITEM_DESC = '';

			while(COUNTER <= JSON_COUNT)
			{
				if
				(
					JOB_ORDER_DGV.COLUMN.IS_EXISTS("ID" + JSVC_NUM.VAR_NVALL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_DECIMAL_B", COUNTER)))
				)
				{
					JOB_ORDER_DGV.CELL.VALUE
					(
						'ID' + JSVC_NUM.VAR_NVALL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_DECIMAL_B", COUNTER)),
						G_ROW_INDEX,
						JSVC_NUM.VAR_NVALL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_QTY_ACTUAL", COUNTER))
					);
				}
				COUNTER++;
			}

			if (JOB_ORDER_DGV.ROW.COUNT() > G_ROW_INDEX + 1)
				HTTP_LOAD_LINE(G_ROW_INDEX + 1);
			else
				CUS_SEND_DIALOG_TRY_DISMISS();
		}
	};


	function HTTP_SEARCH_TARGET()
	{
		// Actual Function
		// _______________________________________________________________________
		GET_MAP_ARRAY = JSCUS_SQL._RECORD._SA_TARGET.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();	

		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_SATARGET_ACC_ACCOUNT_ID', JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_REC_JORDER_USER_ASSIGN_CMB")));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_SATARGET_DATE_FROM', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_JORDER_DATE_COMPLETE_FROM_DTP"), "YYYY-MM-DD") + " 00:00:00.000000");
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_SATARGET_DATE_TO', JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_JORDER_DATE_COMPLETE_TO_DTP"), "YYYY-MM-DD") + " 23:59:59.999999");
	
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._SA_TARGET.CUS_GET_LITE
		(
			GET_MAP_ARRAY,
			HTTP_SEARCH_TARGET_CALLBACK,
			true
		); 				
	};
	
	
	// ===============================================================
	// Request Search - PART.B
	// ===============================================================
	function HTTP_SEARCH_TARGET_CALLBACK(IS_SUCCESS, RESPONSE_STRING)
	{
		// Disable Dialogs
		// _______________________________________________________________________
		CUS_SEND_DIALOG_TRY_DISMISS();
		
		// Validate
		// _______________________________________________________________________
		if(IS_SUCCESS === false)
		{
			console.error("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)
		{
			console.error("REQUEST ERROR: \n" + RESPONSE_STRING);
			return;
		}
		
		// JSON Empty (Clears the DataGrodView)
		// _______________________________________________________________________
		if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") <= 0)
		{
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD07_VALUE_LBL', '0.00');
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD08_VALUE_LBL', '0.00');
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD09_VALUE_LBL', '0.00');
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD10_VALUE_LBL', '0.00');
			return;
		}

		// Initialize
		// _______________________________________________________________________	
		var ROW_COUNT = JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT");
		var ROW_INDEX = 1;
		var TARGET_ID = 0;
		var TARGET_LIST = [];
	
		while(ROW_COUNT >= ROW_INDEX)
		{
			// Initialize Loop
			TARGET_ID = JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_SATARGET_TYPE", ROW_INDEX));	
	
			// Prepare Target Array
			while(TARGET_ID > TARGET_LIST.length)
			{
				TARGET_LIST.push(0);
			}
			
			// Add Value
			TARGET_LIST[TARGET_ID - 1] += JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_SATARGET_VALUE", ROW_INDEX));	
			
			// To next loop
			ROW_INDEX ++;
		}
		
		// 500ml
		// _______________________________________________________________________	
		if(TARGET_LIST.length >= 3)
		{
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD07_VALUE_LBL', JSVC_NUM.VAR_CFORMAT(TARGET_LIST[2]));
			JSOC_ELEMENT.VAR_VALUE
			(
				'HEADER_CARD08_VALUE_LBL', 
				 JSVC_NUM.VAR_CFORMAT
				(
					JSVC_NUM.VAR_NVAL(JSOC_ELEMENT.VAR_VALUE('HEADER_CARD01_VALUE_LBL')) / TARGET_LIST[2] * 100
				) + '%'
			);				
		}
		
		
		// 5 Gallons
		// _______________________________________________________________________	
		if(TARGET_LIST.length >= 4)
		{
			JSOC_ELEMENT.VAR_VALUE('HEADER_CARD09_VALUE_LBL', JSVC_NUM.VAR_CFORMAT(TARGET_LIST[3]));
			JSOC_ELEMENT.VAR_VALUE
			(
				'HEADER_CARD10_VALUE_LBL', 
				 JSVC_NUM.VAR_CFORMAT
				(
					(
						JSVC_NUM.VAR_NVAL(JSOC_ELEMENT.VAR_VALUE('HEADER_CARD02_VALUE_LBL')) +
						JSVC_NUM.VAR_NVAL(JSOC_ELEMENT.VAR_VALUE('HEADER_CARD03_VALUE_LBL'))
					)  / TARGET_LIST[3] * 100
				) + '%'
			);			
		}
		
	};
			
			
	FORM_INITIALIZE();
	FORM_LOAD();