// NOTE: [This JS must loaded as last item]

	



	// ===============================================================
	// Initialize Form
	// ===============================================================
	function FORM_LOAD()
	{
		// Initialize
		// _______________________________________________________________________	
		var DGV_ELEMENT_CHILD = null;
		var DGV_ELEMENT_CHILD_INDEX = 0;
		
		
		// Load DataGridVuew
		// _______________________________________________________________________	
		JSTOOL_CUSTOMIZE.DGVREORDER.APPLY("TRANS_DGV");
		TRANS_DGV = DataGridView("TRANS_DGV");
		//TRANS_DGV.SETTING_ALLOW_USER_TO_ADD_ROWS = true;
		//TRANS_DGV.SETTING_EDITABLE = true;
	

		// Auto Compute
		// _______________________________________________________________________	
		var AUTO_CALC = JSTOOL_CUSTOMIZE.DGVCALC.APPLY(TRANS_DGV);
		var AUTO_COMPUTE_BLOCKS = AUTO_CALC[0];
			
		/*
			// Sample Code
			AUTO_COMPUTE_BLOCKS.push
			(
				[
					'COLUMN_A', 					// Target Column
					'`COLUMN_1` + `COLUMN_2`',		// Math
					true							// Apply CFormat
				]
			);
		*/
		// TRANS_DGV.COLUMN.AUTO_COMPUTE_CREATE(AUTO_COMPUTE_BLOCKS);
		
		
		// Auto Total
		// _______________________________________________________________________	
		var AUTO_TOTAL_COLUMNS = AUTO_CALC[1];
		var AUTO_TOTAL_COPY_TO_ELEMENT = AUTO_CALC[2];
		
		/*
			AUTO_TOTAL_COLUMNS.push('COLUMN_A');					// Column to Auto Total
			AUTO_TOTAL_COPY_TO_ELEMENT.push(["COL_ID", "ELEM_ID"]);	// Source Column, Element ID where total is copied to
			
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_QUANTITY_YIELD');
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_QUANTITY_POST');
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_QUANTITY_ACTUAL');
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_QUANTITY_MIX');
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_COST_PPC');
			AUTO_TOTAL_COLUMNS.push('REC_TRANS_COST_TOTAL');
		*/
		/*
		TRANS_DGV.COLUMN.TOTAL_CREATE
		(
			AUTO_TOTAL_COLUMNS,
			'REC_TRANS_REFERENCE_CODE',									// Column, where you want to display the caption `Total:`.
			AUTO_TOTAL_COPY_TO_ELEMENT
		);		
		*/
		
		
		TRANS_DGV.ON_CLICK
		(			
			function(COL_INDEX, ROW_INDEX)
			{
				// Delete Button
				// ...........................................
				if(TRANS_DGV.COLUMN.NAME(COL_INDEX) == "DELETE_CMD")
				{
					// Delete Unsaved Item
					if
					(
						TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_ID") &&
						JSVC_NUM.VAR_NVALL(TRANS_DGV.CELL.VALUE("REC_TRANS_ID", ROW_INDEX)) <= 0
					)
					{
						TRANS_DGV.ROW.REMOVE_AT(ROW_INDEX);
					}
					
					// Delete Saved Item
					else
					{
						HTTP_DELETE
						(
							function(IS_SUCCESS)
							{
								console.log('Record Deleted.');
							}, 
							ROW_INDEX
						);				
					}
				}			

				// Void Button
				// ...........................................
				else if(TRANS_DGV.COLUMN.NAME(COL_INDEX) == "VOID_CMD")
				{
					// Delete Unsaved Item
					if
					(
						TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_ID") &&
						JSVC_NUM.VAR_NVALL(TRANS_DGV.CELL.VALUE("REC_TRANS_ID", ROW_INDEX)) <= 0
					)
					{
						TRANS_DGV.ROW.REMOVE_AT(ROW_INDEX);
					}
					
					// Void Saved Item
					else
					{

					}
				}	
				
				// Link to Child Table
				// ...........................................
				/*
				// Sample Child Code
				else if(TRANS_DGV.COLUMN.NAME(COL_INDEX) == "CHILD_CMD")
				{
					// Get Current Root path
					var CURRENT_ROOT_PATH = JSCUS_CACHE.ROOT_PATH + JSVC_STR.VAR_MID(JSVC_STR.VAR_DLEFT(JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS], JSCUS_CACHE.SERVER_URL.length), 1, 1);
			
					// Cache Primary Key
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_ID', 
						TRANS_DGV.CELL.VALUE('REC_TRANS_ID', ROW_INDEX), 
						5, 
						CURRENT_ROOT_PATH
					);
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_DESCRIPTION', 
						TRANS_DGV.CELL.VALUE('REC_TRANS_REFERENCE_CODE', ROW_INDEX), 
						5, 
						CURRENT_ROOT_PATH
					);
					
					// Open EditPage
					window.location = JSCUS_CACHE.SERVER_URL + '/p/record/trans.html';	
					return;
				}
				*/
						
	
				// If dialog supported
				// ...........................................
				else if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_MODAL") == true)
				{
					// Clear Modal
					if(JSVC_VAR.VAR_ISSET(INPUT_INSTANCE))
					{
						JSOC_WINDOW.VAR_INPUT_INSTANCE_RESTORE(INPUT_INSTANCE);
					}
						
					// Display Modal
					PROPERTY_REC_TRANS_ID = TRANS_DGV.CELL.VALUE('REC_TRANS_ID', ROW_INDEX);
					PROPERTY_EDIT_ROW_INDEX = ROW_INDEX;
					
					EDIT_HANDLER.REF_IS_MODIFIED = false;
					JSOC_DIALOG.VAR_MODAL("TRANS_MODAL", true);
					HTTP_LOAD();
					return;
				}
				
				// Open View / Edit Page
				// ...........................................
				else if(TRANS_DGV.SETTING_EDITABLE == false)
				{
					// Get Current Root path
					var CURRENT_ROOT_PATH = JSCUS_CACHE.ROOT_PATH + JSVC_STR.VAR_MID(JSVC_STR.VAR_DLEFT(JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS], JSCUS_CACHE.SERVER_URL.length), 1, 1);

					
							
					// Cache Primary Key
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_ID', 
						TRANS_DGV.CELL.VALUE('REC_TRANS_ID', ROW_INDEX), 
						5, 
						CURRENT_ROOT_PATH
					);
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_DESCRIPTION', 
						TRANS_DGV.CELL.VALUE('REC_TRANS_REFERENCE_CODE', ROW_INDEX), 
						5, 
						CURRENT_ROOT_PATH
					);
					
					// Open EditPage
					window.location = 'trans_info.html';				
				}

			}
		);   

		
		// Show Progress
		// _______________________________________________________________________	
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		
		
		// Requires Authentication
		// _______________________________________________________________________	
		PAGE_AUTH_REQUIRES_LOGIN(HTTP_POPULATE_RESULT);			


		
		
		// Foreign Key [Fixed]
		// _______________________________________________________________________	
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_CAT_PRODUCT_ID_CMB") == true)
		{
			// Set Default Item, if used in DataGridView
			JSOC_CMB.VAR_ADD("REC_TRANS_CAT_PRODUCT_ID_CMB", FLAG_BIGINT_NULL.toString(), "-");
			
			// To use custom populate
			var GET_MAP_ARRAY = JSCUS_SQL._CATEGORY._PRODUCT.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODUCT_HAS_RECIPE', 124);	

			JSCUS_SQL._CATEGORY._PRODUCT.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("REC_TRANS_CAT_PRODUCT_ID_CMB", 0);
					
					// Clone to DGV Cell if ComboBox Exists
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_DGV_ROW_REC_TRANS_CAT_PRODUCT_ID") == true)
					{
						DGV_ELEMENT_CHILD = JSOC_ELEMENT.VAR_SUB_ELEMENTS("TRANS_DGV_ROW_REC_TRANS_CAT_PRODUCT_ID");
						DGV_ELEMENT_CHILD_INDEX = 0;
						while(DGV_ELEMENT_CHILD.length > DGV_ELEMENT_CHILD_INDEX)
						{
							if
							(
								DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].tagName == "SELECT" &&
								JSVC_STR.VAR_IS_BLANK(DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].id.toString())
							)
							{
								JSOC_ELEMENT.VAR_INNER_HTML
								(
									DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX], 
									JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_CAT_PRODUCT_ID_CMB")
								);
							}	
							DGV_ELEMENT_CHILD_INDEX ++;
						}
					}
					
					// Copy items to edit control
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB") == true)
					{
						JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB");
						JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB", FLAG_BIGINT_NULL.toString(),"Any Product");
						JSOC_ELEMENT.VAR_INNER_HTML("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB", JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_CAT_PRODUCT_ID_CMB"), true);
						JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB", 0);
					}				
					
					// Update Modal Settings
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_MODAL") == true)
					{
						INPUT_INSTANCE = JSOC_WINDOW.VAR_INPUT_INSTANCE_CLONE("TRANS_MODAL");
					}
					
					// Forward populate complete event.
					HTTP_POPULATE_RESULT();		
				},
				"REC_TRANS_CAT_PRODUCT_ID_CMB",
				true, 2, GET_MAP_ARRAY 
			);
		}
		if
		(
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB") == true &&
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_CAT_PRODUCT_ID_CMB") == false
		)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB", FLAG_BIGINT_NULL.toString(),"Any Product");
			// To use custom populate
			var GET_MAP_ARRAY = JSCUS_SQL._CATEGORY._PRODUCT.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_CAT_PRODUCT_HAS_RECIPE', 124);	
			
			JSCUS_SQL._CATEGORY._PRODUCT.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB", 0);
					
					// Forward populate complete event.		
					HTTP_POPULATE_RESULT();
				},		
				"SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB",
				true, 2, GET_MAP_ARRAY 
			);
		}
		
		// Foreign Key [Fixed]
		// _______________________________________________________________________	
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB") == true)
		{
			// Set Default Item, if used in DataGridView
			JSOC_CMB.VAR_ADD("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", FLAG_BIGINT_NULL.toString(), "-");
			// To use custom populate
			// var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._MEMBER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			// JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_', JSCUS_SQL._SYSTEM._STATUS.STATUS_ACTIVE);	
			JSCUS_SQL._ACCOUNT._MEMBER.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", 0);
					
					// Clone to DGV Cell if ComboBox Exists
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_DGV_ROW_REC_TRANS_ACC_ACCOUNT_ID_POST") == true)
					{
						DGV_ELEMENT_CHILD = JSOC_ELEMENT.VAR_SUB_ELEMENTS("TRANS_DGV_ROW_REC_TRANS_ACC_ACCOUNT_ID_POST");
						DGV_ELEMENT_CHILD_INDEX = 0;
						while(DGV_ELEMENT_CHILD.length > DGV_ELEMENT_CHILD_INDEX)
						{
							if
							(
								DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].tagName == "SELECT" &&
								JSVC_STR.VAR_IS_BLANK(DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].id.toString())
							)
							{
								JSOC_ELEMENT.VAR_INNER_HTML
								(
									DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX], 
									JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB")
								);
							}	
							DGV_ELEMENT_CHILD_INDEX ++;
						}
					}
					
					// Copy items to edit control
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB") == true)
					{
						JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB");
						JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", FLAG_BIGINT_NULL.toString(),"Any Member");
						JSOC_ELEMENT.VAR_INNER_HTML("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB"), true);
						JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", 0);
						$('.BSSP_SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB').selectpicker('refresh');
					}				
					
					// Update Modal Settings
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_MODAL") == true)
					{
						INPUT_INSTANCE = JSOC_WINDOW.VAR_INPUT_INSTANCE_CLONE("TRANS_MODAL");
					}
					
					// Forward populate complete event.
					$('.BSSP_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB').selectpicker('refresh');
					HTTP_POPULATE_RESULT();		
				},
				"REC_TRANS_ACC_ACCOUNT_ID_POST_CMB",
				true, 2
				// , GET_MAP_ARRAY 
			);
		}
		if
		(
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB") == true &&
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_ACC_ACCOUNT_ID_POST_CMB") == false
		)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", FLAG_BIGINT_NULL.toString(),"Any Member");
			// To use custom populate
			// var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._MEMBER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			// JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_', JSCUS_SQL._SYSTEM._STATUS.STATUS_ACTIVE);	
			JSCUS_SQL._ACCOUNT._MEMBER.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB", 0);
					
					// Forward populate complete event.		
					$('.BSSP_SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB').selectpicker('refresh');
					HTTP_POPULATE_RESULT();
				},		
				"SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB",
				true, 2
				// , GET_MAP_ARRAY 
			);
		}
		
		// Foreign Key [Fixed]
		// _______________________________________________________________________	
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB") == true)
		{
			// Set Default Item, if used in DataGridView
			JSOC_CMB.VAR_ADD("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", FLAG_BIGINT_NULL.toString(), "-");
			// To use custom populate
			// var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._MEMBER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			// JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_', JSCUS_SQL._SYSTEM._STATUS.STATUS_ACTIVE);	
			JSCUS_SQL._ACCOUNT._MEMBER.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", 0);
					
					// Clone to DGV Cell if ComboBox Exists
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_DGV_ROW_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE") == true)
					{
						DGV_ELEMENT_CHILD = JSOC_ELEMENT.VAR_SUB_ELEMENTS("TRANS_DGV_ROW_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE");
						DGV_ELEMENT_CHILD_INDEX = 0;
						while(DGV_ELEMENT_CHILD.length > DGV_ELEMENT_CHILD_INDEX)
						{
							if
							(
								DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].tagName == "SELECT" &&
								JSVC_STR.VAR_IS_BLANK(DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX].id.toString())
							)
							{
								JSOC_ELEMENT.VAR_INNER_HTML
								(
									DGV_ELEMENT_CHILD[DGV_ELEMENT_CHILD_INDEX], 
									JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB")
								);
							}	
							DGV_ELEMENT_CHILD_INDEX ++;
						}
					}
					
					// Copy items to edit control
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB") == true)
					{
						JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB");
						JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", FLAG_BIGINT_NULL.toString(),"Any Member");
						JSOC_ELEMENT.VAR_INNER_HTML("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", JSOC_ELEMENT.VAR_INNER_HTML("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB"), true);
						JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", 0);
						$('.BSSP_SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB').selectpicker('refresh');
					}				
					
					// Update Modal Settings
					if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_MODAL") == true)
					{
						INPUT_INSTANCE = JSOC_WINDOW.VAR_INPUT_INSTANCE_CLONE("TRANS_MODAL");
					}
					
					// Forward populate complete event.
					$('.BSSP_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB').selectpicker('refresh');
					HTTP_POPULATE_RESULT();		
				},
				"REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB",
				true, 2
				// , GET_MAP_ARRAY 
			);
		}
		if
		(
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB") == true &&
			JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB") == false
		)
		{
			JSOC_CMB.VAR_CLEAR("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB");
			JSOC_CMB.VAR_ADD("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", FLAG_BIGINT_NULL.toString(),"Any Member");
			// To use custom populate
			// var GET_MAP_ARRAY = JSCUS_SQL._ACCOUNT._MEMBER.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			// JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_', JSCUS_SQL._SYSTEM._STATUS.STATUS_ACTIVE);	
			JSCUS_SQL._ACCOUNT._MEMBER.CUS_GET_THEN_POPULATE_COMBOBOX
			(
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Set Default index
					JSOC_CMB.VAR_SELECTED_INDEX("SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB", 0);
					
					// Forward populate complete event.		
					$('.BSSP_SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB').selectpicker('refresh');
					HTTP_POPULATE_RESULT();
				},		
				"SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB",
				true, 2
				// , GET_MAP_ARRAY 
			);
		}
		
		
		// Get Modal Instance (Add Modal Adjustment before this line)
		// _______________________________________________________________________	
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("TRANS_MODAL") == true)
		{
			INPUT_INSTANCE = JSOC_WINDOW.VAR_INPUT_INSTANCE_CLONE("TRANS_MODAL");
		}
		
		// Add Search Events for the SEARCH_DESCRIPTION_TXT - TextInput
		// _______________________________________________________________________		
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_TRANS_REFERENCE_CODE_TXT"))
		{
			var SEARCH_REC_TRANS_REFERENCE_CODE_TXT = JSOC_ELEMENT.VAR_GET("SEARCH_REC_TRANS_REFERENCE_CODE_TXT");
			SEARCH_REC_TRANS_REFERENCE_CODE_TXT.onkeydown = 
				function() 
				{ 
					return function(e) 
					{
						if
						(
							(
								e.which == 13 || 
								e.keyCode == 13 || 
								e.key === "Enter"
							) &&
							JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_CMD")
						)
						{
							HTTP_SEARCH();
						}
					};
				}();
		}
		
		
		// Load Parent Data (if Exists)
		// _______________________________________________________________________	
		HTTP_PARENT_LOAD();
		
		
		// Pre-Load Items (uncomment if no foreign key pre-fetch)
		// _______________________________________________________________________	
		if(CUS_SEND_REQUEST_HAS_QUEUE() == false)
		{
			HTTP_SEARCH();
		}
		
		
		// Disable Dialogs
		// _______________________________________________________________________	
		CUS_SEND_DIALOG_TRY_DISMISS();
	};
	
	
	// ===============================================================
	// Populate Foreign Keys
	// ===============================================================
	function HTTP_POPULATE_RESULT(IS_SUCCESS, HTTP_RESPONSE)
	{
		// Disable Dialogs
		CUS_SEND_DIALOG_TRY_DISMISS();
			
		// Handle Error
		if(IS_SUCCESS === false)
		{
			alert("Unable to populate lists.");
		}
		else
		{
			// Disable Dialogs
			if(CUS_SEND_REQUEST_HAS_QUEUE() == false)
			{
				HTTP_SEARCH();
			}
		}
	};

	
	// ===============================================================
	// Request Search - PART.A
	// ===============================================================
	function HTTP_SEARCH(NEW_ITEM_ID, EDITED_ROW_INDEX)
	{
		// Optional Value
		// _______________________________________________________________________
		NEW_ITEM_ID = JSVC_VAR.VAR_OPTIONAL(NEW_ITEM_ID, -1);
		EDITED_ROW_INDEX = JSVC_VAR.VAR_OPTIONAL(EDITED_ROW_INDEX, -1);
		
		// Parameter Validate
		// _______________________________________________________________________
		JSVC_AV.VAR_VALIDATE_ARGUMENT_TYPE(NEW_ITEM_ID, 'NEW_ITEM_ID', 'NUMERIC');
		JSVC_AV.VAR_VALIDATE_ARGUMENT_TYPE(EDITED_ROW_INDEX, 'EDITED_ROW_INDEX', 'NUMERIC');
		
		
		// Actual Function
		// _______________________________________________________________________
		GET_MAP_ARRAY = JSCUS_SQL._RECORD._TRANS.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();	
		// if(JSVC_VAR.VAR_ISSET("PROPERTY_PARENT_ID"))
		// {
		//	JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_PARENT_ID', PROPERTY_PARENT_ID);
		// }  // Parent ID Sample
		
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_CAT_PRODUCT_ID_CMB', 'PARAM_REC_TRANS_CAT_PRODUCT_ID'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_REFERENCE_CODE_TXT', 'PARAM_REC_TRANS_REFERENCE_CODE'
		);	
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_YIELD_FROM_TXT', 'PARAM_REC_TRANS_QUANTITY_YIELD_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_YIELD_TO_TXT', 'PARAM_REC_TRANS_QUANTITY_YIELD_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_POST_FROM_TXT', 'PARAM_REC_TRANS_QUANTITY_POST_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_POST_TO_TXT', 'PARAM_REC_TRANS_QUANTITY_POST_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_ACTUAL_FROM_TXT', 'PARAM_REC_TRANS_QUANTITY_ACTUAL_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_ACTUAL_TO_TXT', 'PARAM_REC_TRANS_QUANTITY_ACTUAL_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_MIX_FROM_TXT', 'PARAM_REC_TRANS_QUANTITY_MIX_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_QUANTITY_MIX_TO_TXT', 'PARAM_REC_TRANS_QUANTITY_MIX_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_COST_PPC_FROM_TXT', 'PARAM_REC_TRANS_COST_PPC_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_COST_PPC_TO_TXT', 'PARAM_REC_TRANS_COST_PPC_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_COST_TOTAL_FROM_TXT', 'PARAM_REC_TRANS_COST_TOTAL_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_COST_TOTAL_TO_TXT', 'PARAM_REC_TRANS_COST_TOTAL_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_POST_FROM_DTP', 'PARAM_REC_TRANS_DATE_POST_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_POST_TO_DTP', 'PARAM_REC_TRANS_DATE_POST_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_COMPLETE_FROM_DTP', 'PARAM_REC_TRANS_DATE_COMPLETE_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_COMPLETE_TO_DTP', 'PARAM_REC_TRANS_DATE_COMPLETE_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_SCHEDULE_FROM_DTP', 'PARAM_REC_TRANS_DATE_SCHEDULE_FROM'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_DATE_SCHEDULE_TO_DTP', 'PARAM_REC_TRANS_DATE_SCHEDULE_TO'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_ACC_ACCOUNT_ID_POST_CMB', 'PARAM_REC_TRANS_ACC_ACCOUNT_ID_POST'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE_CMB', 'PARAM_REC_TRANS_ACC_ACCOUNT_ID_COMPLETE'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_REC_TRANS_STATUS_CMB', 'PARAM_REC_TRANS_STATUS'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_ORDER_BY_CMB', 'PARAM_ORDER_FIELD'
		);
		JSCUS_SQL._ADD_FROM
		(
			GET_MAP_ARRAY, 'SEARCH_LIMIT_CMB', 'PARAM_LIMIT'
		);		
		
		var SELECTED_SEARCH_MODE = 0;
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_MODE_CMB") == true)
		{
			SELECTED_SEARCH_MODE = JSVC_NUM.VAR_NVALL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_MODE_CMB"));		
		}						
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		
		
		// Search Inserted / Saved Record
		// _______________________________________________________________________
		if(NEW_ITEM_ID >= 0)
		{
			GET_MAP_ARRAY = JSCUS_SQL._RECORD._TRANS.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();	
			JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_TRANS_ID', NEW_ITEM_ID);
			
			JSCUS_SQL._RECORD._TRANS.CUS_GET
			(
				GET_MAP_ARRAY,
				function(IS_SUCCESS, RESPONSE_STRING)
				{
					// Update Existing Row
					if(EDITED_ROW_INDEX >= 0)
					{
						HTTP_SEARCH_LIMITED_ROWS_CALLBACK(IS_SUCCESS, RESPONSE_STRING, EDITED_ROW_INDEX);
					}
					
					// Add new item
					else
					{
						HTTP_SEARCH_LIMITED_ROWS_CALLBACK(IS_SUCCESS, RESPONSE_STRING, 0);
					}
				},
				true
			); 			
		}
			
			
		// REGULAR Search Mode
		// _______________________________________________________________________
		else if(SELECTED_SEARCH_MODE == 0)
		{			
			JSCUS_SQL._RECORD._TRANS.CUS_GET
			(
				GET_MAP_ARRAY,
				HTTP_SEARCH_CALLBACK,
				true
			); 			
       	}
		
		
		// LITE Search Mode
		// _______________________________________________________________________
		else if(SELECTED_SEARCH_MODE == 1)
		{
			JSCUS_SQL._RECORD._TRANS.CUS_GET_LITE
			(
				GET_MAP_ARRAY,
				HTTP_SEARCH_CALLBACK,
				true
			); 				
		}
		
		
		// ALL Search Mode
		// _______________________________________________________________________
		else if(SELECTED_SEARCH_MODE == 2)
		{
			JSCUS_SQL._RECORD._TRANS.CUS_GET_ALL
			(
				GET_MAP_ARRAY,
				HTTP_SEARCH_CALLBACK,
				true
			); 							
		}
		
		
		// Update Paging Cache
		// _______________________________________________________________________
		if(NEW_ITEM_ID <= 0)
		{
			TRANS_LAST_GET_MAP_ARRAY = GET_MAP_ARRAY;
		}
	};
	
	
	// ===============================================================
	// Request Search - PART.A1
	// ===============================================================
	function HTTP_SEARCH_LOAD_MORE()
	{
		// Abort if no GET cache is found
		// _______________________________________________________________________		
		if(JSVC_VAR.VAR_ISSET(TRANS_LAST_GET_MAP_ARRAY) == false)
		{
			return;
		}
		
		// Update Paging row count
		// _______________________________________________________________________	
		TRANS_LAST_GET_MAP_ARRAY['PARAM_SKIP'] = 
			JSVC_NUM.VAR_NVALL(TRANS_LAST_GET_MAP_ARRAY['PARAM_SKIP']) + 
			JSVC_NUM.VAR_NVALL(TRANS_LAST_GET_MAP_ARRAY['PARAM_LIMIT']);	
			
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_LIMIT_CMB") == true)
		{
			JSVC_MAP_ARRAY.VAR_SET
			(
				TRANS_LAST_GET_MAP_ARRAY,
				'PARAM_LIMIT', 
				JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_LIMIT_CMB")
			);		
		}
		
		
		// REGULAR Search Mode
		// _______________________________________________________________________
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._TRANS.CUS_GET
		(
			TRANS_LAST_GET_MAP_ARRAY,
			function (IS_SUCCESS, RESPONSE_STRING)
			{
				HTTP_SEARCH_CALLBACK(IS_SUCCESS, RESPONSE_STRING, true);
			},
			true
		);
	}
	
	
	// ===============================================================
	// Request Search - PART.A2
	// ===============================================================
	function HTTP_SEARCH_LOAD_PAGE()
	{
		// Abort if no GET cache is found
		// _______________________________________________________________________		
		if
		(
			JSVC_VAR.VAR_ISSET(TRANS_LAST_GET_MAP_ARRAY) == false ||
			JSOC_CMB.VAR_SELECTED_INDEX("LOAD_PAGING_CMB") < 0
		)
		{
			return;
		}
		
		// Update Paging row count
		// _______________________________________________________________________
		TRANS_LAST_GET_MAP_ARRAY['PARAM_SKIP'] = 
		JSVC_NUM.VAR_NVALL(TRANS_LAST_GET_MAP_ARRAY['PARAM_LIMIT']) *
		JSOC_CMB.VAR_SELECTED_INDEX("LOAD_PAGING_CMB");	
		
		// REGULAR Search Mode
		// _______________________________________________________________________
		LOAD_PAGING_IGNORE_NEXT_REQUEST = true;
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);
		JSCUS_SQL._RECORD._TRANS.CUS_GET
		(
			TRANS_LAST_GET_MAP_ARRAY,
			function (IS_SUCCESS, RESPONSE_STRING)
			{
				HTTP_SEARCH_CALLBACK(IS_SUCCESS, RESPONSE_STRING, false);
			},
			true
		);
	}
	function HTTP_SEARCH_LOAD_PAGING_UPDATE(ROW_COUNT)
	{
		// Abort if no paging function enabled
		// _______________________________________________________________________
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("LOAD_PAGING_CMB") == false || LOAD_PAGING_IGNORE_NEXT_REQUEST == true)
		{
			LOAD_PAGING_IGNORE_NEXT_REQUEST = false;
			return;
		}
		
		// Initialize
		// _______________________________________________________________________
		var PAGING_INDEX = 0;
		var PAGING_COUNT = 
			ROW_COUNT / JSVC_NUM.VAR_NVALL(TRANS_LAST_GET_MAP_ARRAY['PARAM_LIMIT']);
		PAGING_COUNT = Math.trunc(PAGING_COUNT) + 1;
		JSOC_CMB.VAR_CLEAR("LOAD_PAGING_CMB");
		
		// Populate Paging
		// _______________________________________________________________________
		while(PAGING_COUNT > PAGING_INDEX)
		{
			JSOC_CMB.VAR_ADD
			(
				"LOAD_PAGING_CMB", 
				(PAGING_INDEX + 1).toString(), 
				(PAGING_INDEX + 1).toString()
			);
			PAGING_INDEX ++;
		}
	}
	
	
	// ===============================================================
	// Request Search - PART.B
	// ===============================================================
	function HTTP_SEARCH_CALLBACK(IS_SUCCESS, RESPONSE_STRING, KEEP_DGV_ITEMS = false)
	{
		// 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;
		}
		
		// Back to DGV Top
		// _______________________________________________________________________	
		if(LOAD_PAGING_IGNORE_NEXT_REQUEST == true)
		{
			JSOC_ELEMENT.VAR_GET("TRANS_DGV").scrollIntoView
			(
				{
			  		behavior: 'auto', 
			  		block: 'start'
				}
			);		
		}
		
		// JSON Empty (Clears the DataGrodView)
		// _______________________________________________________________________
		if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") <= 0)
		{
			HTTP_SEARCH_LOAD_PAGING_UPDATE(0);
			TRANS_DGV.ROW.CLEAR();
			if(TRANS_DGV.COLUMN.TOTAL_IS_READY())
			{
				TRANS_DGV.COLUMN.TOTAL_REFRESH();
			}
			return;
		}
		HTTP_SEARCH_LOAD_PAGING_UPDATE
		(
			JSVC_NUM.VAR_NVALL
			(
				JSRC_JSON.REF_READ(JSON_OBJECT, "RECORD_COUNT", 1)
			)
		);
		
		// Populate DGV
		// _______________________________________________________________________
		TRANS_DGV.POPULATE_FROM_QUERY
		(
				JSON_OBJECT, 
				'',
				KEEP_DGV_ITEMS,
				false,
				TRANS_LAST_GET_MAP_ARRAY['PARAM_SKIP'] + 1,
				[2, 1]
		);
		
		
		// For Applying CFormat
		// _______________________________________________________________________	
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_YIELD");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_POST");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_ACTUAL");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_MIX");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_COST_PPC");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_COST_TOTAL");
		
		
		// Initialize
		// _______________________________________________________________________	
		var WEBTABLE_DATE = null;
		var CURRENT_CELL_VALUE = null;
		var ROW_INDEX = 0;
	
	
		// DateTime Format
		// _______________________________________________________________________	
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_POST"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_POST", "MMM DD, YYYY");
		}
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_COMPLETE"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_COMPLETE", "MMM DD, YYYY");
		}
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_SCHEDULE"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_SCHEDULE", "MMM DD, YYYY");
		}
		
		
		// Color Coding (Uncomment to use)
		// _______________________________________________________________________	
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#1cc88a"; // Safe
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#5a5c69"; // Neutral
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#f6c23e"; // Caution
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#e74a3b"; // Warning


		// Auto-total tool
		// _______________________________________________________________________	
		if(TRANS_DGV.COLUMN.TOTAL_IS_READY())
		{
			TRANS_DGV.COLUMN.TOTAL_REFRESH();
		}
	};
	
	
	// ===============================================================
	// Request Search - PART.C
	// ===============================================================
	function HTTP_SEARCH_LIMITED_ROWS_CALLBACK(IS_SUCCESS, RESPONSE_STRING, ROW_INDEX)
	{
		// 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)
		{
			TRANS_DGV.ROW.CLEAR();
			return;
		}

		// Validate Row Count
		// _______________________________________________________________________	
		if(TRANS_DGV.ROW.COUNT() <= 0)
		{
			console.error("DataGridView has no rows to fill.");
			return;
		}
		JSVC_AV.VAR_VALIDATE_RANGE(ROW_INDEX, "ROW_INDEX", 0, TRANS_DGV.ROW.COUNT() - 1);
		
		// Populate DGV
		// _______________________________________________________________________
		TRANS_DGV.POPULATE_FROM_QUERY
		(
				JSON_OBJECT, 
				'',
				false,
				false,
				1,
				[2, 1],
				ROW_INDEX
		);
		
		
		// For Applying CFormat
		// _______________________________________________________________________	
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_YIELD");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_POST");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_ACTUAL");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_QUANTITY_MIX");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_COST_PPC");
		TRANS_DGV.COLUMN.CFORMAT("REC_TRANS_COST_TOTAL");
		
	
		// For Applying DateTime Format
		// _______________________________________________________________________	
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_POST"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_POST", "MMM DD, YYYY");
		}
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_COMPLETE"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_COMPLETE", "MMM DD, YYYY");
		}
		if(TRANS_DGV.COLUMN.IS_EXISTS("REC_TRANS_DATE_SCHEDULE"))
		{
			TRANS_DGV.COLUMN.DATE_FORMAT("REC_TRANS_DATE_SCHEDULE", "MMM DD, YYYY");
		}


		// Auto-total tool
		// _______________________________________________________________________	
		if(TRANS_DGV.COLUMN.TOTAL_IS_READY())
		{
			TRANS_DGV.COLUMN.TOTAL_REFRESH();
		}
		
		
		// Color Coding (Uncomment to use)
		// _______________________________________________________________________	
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#1cc88a"; // Safe
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#5a5c69"; // Neutral
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#f6c23e"; // Caution
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#e74a3b"; // Warning
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#dc3545"; // Danger
		//TRANS_DGV.CELL.ELEMENT("COLUMN_NAME", ROW_INDEX).style.color = "#17a2b8"; // Info
	};
	
				
	// ===============================================================
	// Begin Processing the Page
	// ===============================================================
	FORM_INITIALIZE();
	FORM_LOAD();