	// ===============================================================
	// Global Var
	// ===============================================================
	
	// Edit Handler
	// _______________________________________________________________________
	var EDIT_HANDLER = function(){};	
	EDIT_HANDLER.REF_IS_MODIFIED = false;
	EDIT_HANDLER.HAS_NEWLY_SAVED_DATA = false;
	var PROPERTY_PARENT_ID = 0;
	var PROPERTY_PARENT_DESCRIPTION = "";
	var PROPERTY_PARENT_JOLINE = 0;	
	
	// Cache
	// _______________________________________________________________________
	var PROPERTY_REC_POSRESERVE_ID = -1;
	var PROPERTY_EDIT_MODE = false;
	var PROPERTY_EDIT_ROW_INDEX = -1;
	var INPUT_INSTANCE = null;
	
	
	// Buttons [Optional]
	// _______________________________________________________________________
	var ADD_BBI = null;
	var SAVE_BBI = null;
	var DELETE_BBI = null;
	var CANCEL_BBI = null;
	var NAVIGATION_BACK_BBI = null;
	var ADD_PRODUCT = null;
	var APPROVE_BBI = null;
	var DELIVERED_BBI = null;
	var ADD_CLIENT = null;
	var CHANGE_BBI = null;
	var UPDATE_BBI = null;
	
	var SEARCH_CMD = null;
	var PRINT_BBI = null;
	var EXPORT_BBI = null;
	var EXPORT_QB = null;
	var EXPORT_CTR = 0;
	var EX_QB = false;
	var EX_RES = '';

	var IS_APPROVE = 0;
	var IS_JO_STATUS = 0;
	var UPDATED_INDEX = 0;

	var STATIC_PROD_ID = 2; //NEW ITEM
	var STATIC_PROD_ID2 = 13; //OLD ITEM
	var STATIC_PROD_RET_ID = 10; //NEW EMPTY ITEM -8
	var STATIC_PROD_RET_ID2 = 14; //OLD EMPTY ITEM -1
	var REB_STOCKIN_QTY = 0; //NEW EMPTY QTY
	var REB_STOCKIN_QTY2 = 0; //OLD ITEM QTY

	var PSID = 0;
	var DGV_CTR = 0;
	
	// Dialog Controls [Optional]
	// _______________________________________________________________________
	var REC_POSRESERVE_ACC_GROUP_ID_CMB = null;
	var REC_POSRESERVE_REC_CLIENT_ID_CMB = null;
	var REC_POSRESERVE_REFERENCE_CODE_TXT = null;
	var REC_POSRESERVE_DATE_EXPECTED_DTP = null;
	var REC_POSRESERVE_REMARKS_TXT = null;
	var REC_POSRESERVE_STATUS_CMB = null;
	var PARAM_REC_POSRESERVE_ID_FILE_FP = null;
	
	
	// DGV Controls
	// _______________________________________________________________________
	var POS_RESERVE_DGV = null;
	var PRODUCT_BRANCH_DGV = null;


	function SAMPLE_QUICK_SAVE()
	{
		JSCUS_QUICK_SAVE.CUS_SAVE_SHOW
		(
			JSCUS_CACHE.BASE_URL[JSCUS_CACHE.LOGIN_CLASS] + '/p/water/hub/client.html',
			window.location.href, 
			''
		);
	};

	function SAMPLE_QUICK_SAVE2()
	{
		var BranchID = JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_REC_POSRESERVE_ACC_GROUP_ID_CMB"));
		var StatusId = JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_REC_POSRESERVE_STATUS_CMB"));
		var UserId = JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("SEARCH_REC_POSRESERVE_ACC_ACCOUNT_ID_CMB"));
		var SearchId = JSVC_NUM.VAR_NVAL(JSOC_CMB.VAR_SELECTED_VALUE("REC_POSRESERVE_DATE_CMB"));
		var DateFrom = JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_RECORDED_FROM_DTP"), "YYYY-MM-DD") + " 00:00:00.000000";
		var DateTo = JSVC_DATE.VAR_FORMAT(JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_RECORDED_TO_DTP"), "YYYY-MM-DD") + " 00:00:00.000000";

		JSCUS_QUICK_SAVE.CUS_SAVE_SHOW
		(
			JSCUS_CACHE.BASE_URL[JSCUS_CACHE.LOGIN_CLASS] + '/p/record/job_order_completion.html',
			window.location.href, 
			PROPERTY_PARENT_JOLINE + '|' + BranchID + '|' + StatusId + '|' + UserId + '|' + SearchId + '|' + DateFrom + '|' + DateTo
		);
	};


	// ===============================================================
	// Initialize Controls
	// ===============================================================     
	function FORM_INITIALIZE()
	{
		// Load Cache Parent Data [Add Redirects if this is a required data.]
		// ...........................................
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_ID_POS_RESERVE"))
		{
			PROPERTY_PARENT_ID = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_ID_POS_RESERVE");
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS];
			//window.close();
		}
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_DESCRIPTION_POS_RESERVE"))
		{
			PROPERTY_PARENT_DESCRIPTION = JSVC_COOKIE.VAR_READ("PROPERTY_PARENT_DESCRIPTION_POS_RESERVE");
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_PARENT_DESCRIPTION_TXT") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_PARENT_DESCRIPTION_TXT", PROPERTY_PARENT_DESCRIPTION);			
			}
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_PARENT_DESCRIPTION_LBL") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_PARENT_DESCRIPTION_LBL", PROPERTY_PARENT_DESCRIPTION);			
			}
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PAGE_TITLE_LBL") == true)
			{
				JSOC_ELEMENT.VAR_VALUE("PAGE_TITLE_LBL", JSOC_ELEMENT.VAR_VALUE("PAGE_TITLE_LBL") + " : " + PROPERTY_PARENT_DESCRIPTION);	
			}
		}	
		else
		{
			//window.location = JSCUS_CACHE.AUTH_REDIRECT_URL[JSCUS_CACHE.LOGIN_CLASS];	
		}
		JSCUS_QUICK_SAVE.CUS_SAVE_INITIALIZE();
	
		// Restore Cache on reload
		// ...........................................	
		if
		(
			JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_ID_POS_RESERVE") || 
			JSVC_COOKIE.VAR_ISSET("PROPERTY_PARENT_DESCRIPTION_POS_RESERVE")
		)
		{
			  window.onbeforeunload = function(event)
			  {
					// 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_POS_RESERVE', 
						PROPERTY_PARENT_ID, 
						5, 
						CURRENT_ROOT_PATH
					);
					
					// Cache Description
					JSVC_COOKIE.VAR_ADD
					(
						'PROPERTY_PARENT_DESCRIPTION_POS_RESERVE', 
						PROPERTY_PARENT_DESCRIPTION, 
						5, 
						CURRENT_ROOT_PATH
					);

					JSCUS_QUICK_SAVE.CUS_SAVE_REFRESH();
			  };
		}
		
 		// Cache Class Properties
		// ...........................................
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_REC_POSRESERVE_ID"))
		{
			PROPERTY_REC_POSRESERVE_ID = JSVC_COOKIE.VAR_READ("PROPERTY_REC_POSRESERVE_ID");
		}	
		if(JSVC_COOKIE.VAR_ISSET("PROPERTY_EDIT_MODE"))
		{
			PROPERTY_EDIT_MODE = JSVC_COOKIE.VAR_READ("PROPERTY_REC_POSRESERVE_ID");
		}
	
		// Initialize: Modals
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("POS_RESERVE_MODAL") == true)
		{
			// Display Modal
			JSOC_DIALOG.VAR_MODAL("POS_RESERVE_MODAL", false);
		}
				
		// Initialize: Ribbon Buttons [Add Item]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ADD_BBI"))
		{
    		ADD_BBI = JSOC_ELEMENT.VAR_GET("ADD_BBI");     	
			
			// Add OnClick event [Show Modal]
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("POS_RESERVE_MODAL"))
			{
				ADD_BBI.onclick = 
					function()
					{		
						// Display Modal
						PROPERTY_REC_POSRESERVE_ID = FLAG_BIGINT_NULL;
						PROPERTY_EDIT_ROW_INDEX = -1;

						PSID = 0;
						
						if(JSVC_VAR.VAR_ISSET(INPUT_INSTANCE))
						{
							JSOC_WINDOW.VAR_INPUT_INSTANCE_RESTORE(INPUT_INSTANCE);
						}
						EDIT_HANDLER.REF_IS_MODIFIED = true;
						
						JSOC_CMB.VAR_CLEAR("REC_POSRESERVE_BRANCH_PRODUCT_ID_CMB");
						if(PRODUCT_BRANCH_DGV.ROW.COUNT() > 0)
							PRODUCT_BRANCH_DGV.ROW.CLEAR();

						JSOC_DIALOG.VAR_MODAL("POS_RESERVE_MODAL", true);
					}		
			}
			// Add OnClick event [Show Add/Edit Page]
			else
			{
				
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CHANGE_BBI"))
		{
    		CHANGE_BBI = JSOC_ELEMENT.VAR_GET("CHANGE_BBI");     	
			
			// Add OnClick event [Show Modal]
			if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CHANGE_MODAL"))
			{
				CHANGE_BBI.onclick = 
					function()
					{	
						var ROW_INDEX = 0; var IS_SEL = false;
						while(POS_RESERVE_DGV.ROW.COUNT() > ROW_INDEX)
						{
							if (POS_RESERVE_DGV.CELL.VALUE('IS_SELECT', ROW_INDEX) == true && JSVC_NUM.VAR_NVALL(POS_RESERVE_DGV.CELL.VALUE('REC_POSRESERVE_STATUS', ROW_INDEX)) != 1)
							{
								JSOC_DIALOG.VAR_MESSAGE_BOX
								(
									'Only pending reservation can be transfered.', 
									'Information',
									'OK', 'WARNING',
									function(){ }
								);	
								return;
							}
							if(IS_SEL == false)
							{
								if(POS_RESERVE_DGV.CELL.VALUE('IS_SELECT', ROW_INDEX) == true)
									IS_SEL = true;
							}
							ROW_INDEX++;
						}

						if(IS_SEL == true)
							JSOC_DIALOG.VAR_MODAL("CHANGE_MODAL", true);
						else
						{
							JSOC_DIALOG.VAR_MESSAGE_BOX
							(
								'No item selected.', 
								'Information',
								'OK', 'WARNING',
								function(){ }
							);	
							return;			
						}
					}		
			}
			// Add OnClick event [Show Add/Edit Page]
			else
			{
				
			}
		}		
		
		// Initialize: Ribbon Buttons [Save Changes]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("UPDATE_BBI"))
		{
    		UPDATE_BBI = JSOC_ELEMENT.VAR_GET("UPDATE_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_UPDATE))
			{
				// Prepare Save callback
				var CALLBACK_HANDLER_UPDATE = 
					function(IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							return;
						}
						HTTP_SEARCH();
					
						// Show record saved messageBox
						JSVC_INFO.VAR_RECORD_SAVED('');
					}
				
				// Add OnClick event
				UPDATE_BBI.onclick = 
					function()
					{
						UPDATED_INDEX = 0;
						HTTP_UPDATE(CALLBACK_HANDLER_UPDATE);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SAVE_BBI"))
		{
    		SAVE_BBI = JSOC_ELEMENT.VAR_GET("SAVE_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_SAVE))
			{
				// Prepare Save callback
				var CALLBACK_HANDLER = 
					function(IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							return;
						}
					
						// Show record saved messageBox
						JSVC_INFO.VAR_RECORD_SAVED('');
					}
				
				// Add OnClick event
				SAVE_BBI.onclick = 
					function()
					{
						IS_JO_STATUS = 0;
						IS_APPROVE = 0;
						HTTP_SAVE(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("APPROVE_BBI"))
		{
    		APPROVE_BBI = JSOC_ELEMENT.VAR_GET("APPROVE_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_SAVE))
			{
				// Prepare Save callback
				var CALLBACK_HANDLER = 
					function(IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							return;
						}
					
						// Show record saved messageBox
						JSVC_INFO.VAR_RECORD_SAVED('');
					}
				
				// Add OnClick event
				APPROVE_BBI.onclick = 
					function()
					{
						IS_APPROVE = 1;
						IS_JO_STATUS = 2;
						//HTTP_SAVE(CALLBACK_HANDLER);
						HTTP_SAVE(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("DELIVERED_BBI"))
		{
    		DELIVERED_BBI = JSOC_ELEMENT.VAR_GET("DELIVERED_BBI");     
			if(JSVC_VAR.VAR_ISSET(HTTP_SAVE))
			{
				// Prepare Save callback
				var CALLBACK_HANDLER = 
					function(IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							return;
						}
					
						// Show record saved messageBox
						JSVC_INFO.VAR_RECORD_SAVED('');
					}
				
				// Add OnClick event
				DELIVERED_BBI.onclick = 
					function()
					{
						IS_APPROVE = 1;
						IS_JO_STATUS = 4;
						//HTTP_SAVE(CALLBACK_HANDLER);
						HTTP_SAVE(CALLBACK_HANDLER);
					}
			}
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CANCEL_BBI"))
		{
    		CANCEL_BBI = JSOC_ELEMENT.VAR_GET("CANCEL_BBI");      		
		}
		
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ADD_CLIENT"))
		{
			ADD_CLIENT = JSOC_ELEMENT.VAR_GET("ADD_CLIENT");
			ADD_CLIENT.onclick = function(){SAMPLE_QUICK_SAVE()};
		}

		// Initialize: Ribbon Buttons [Add Back Link (to parent page)]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("NAVIGATION_BACK_BBI"))
		{
    		NAVIGATION_BACK_BBI = JSOC_ELEMENT.VAR_GET("NAVIGATION_BACK_BBI");  
			
			// Add OnClick event
			NAVIGATION_BACK_BBI.onclick = 
				function()
				{
				}		
		}
		
		// Initialize: Ribbon Buttons [Add Forward Link (to child page)]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("NAVIGATION_BACK_BBI"))
		{
    		NAVIGATION_BACK_BBI = JSOC_ELEMENT.VAR_GET("NAVIGATION_BACK_BBI");  
			
			// Add OnClick event
			NAVIGATION_BACK_BBI.onclick = 
				function()
				{
				}		
		}

		// Initialize: Ribbon Buttons [Add Search]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_CMD"))
		{
			SEARCH_CMD = JSOC_ELEMENT.VAR_GET("SEARCH_CMD");
			SEARCH_CMD.onclick = function(){HTTP_SEARCH()};
		}

		// Initialize: Add items to dgv
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ADD_PRODUCT"))
		{
			ADD_PRODUCT = JSOC_ELEMENT.VAR_GET("ADD_PRODUCT");
			ADD_PRODUCT.onclick = function(){HTTP_ADD_PRODUCT()};
		}	

		// Initialize: Ribbon Buttons [Add Print]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PRINT_BBI"))
		{
			PRINT_BBI = JSOC_ELEMENT.VAR_GET("PRINT_BBI");
			PRINT_BBI.onclick = function()
			{
				window.print();
			};
		}		
		
		// Initialize: Ribbon Buttons [Add Search]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("EXPORT_BBI"))
		{
			EXPORT_BBI = JSOC_ELEMENT.VAR_GET("EXPORT_BBI");
			EXPORT_BBI.onclick = function()
			{
				JSRC_EXCEL.REF_EXPORT('POS_RESERVE_DGV');
			};
		}

		// Initialize: Ribbon Buttons [Add Search]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("EXPORT_QB"))
		{

			EXPORT_QB = JSOC_ELEMENT.VAR_GET("EXPORT_QB");
			EXPORT_QB.onclick = function()
			{
				EXPORT_CTR = 0;
				EX_QB = false;
				EX_RES = "";
				JSOC_DIALOG.VAR_LOADING_SPINNER(true);

				var EXQB_CALLBACK_HANDLER = 
					function(RESULT_STRING, IS_SUCCESS)
					{
						// Abort on failure
						if(IS_SUCCESS == false)
						{
							JSOC_DIALOG.VAR_MESSAGE_BOX
								(
									'Some problem occured. Please try again.', 
									'Information',
									'OK', 'WARNING',
									function(){ }
								);
								CUS_SEND_DIALOG_TRY_DISMISS();
								return;
						}
						
						EXPORT_CTR++;
						EX_QB = false;
						while(POS_RESERVE_DGV.ROW.COUNT() > EXPORT_CTR)
						{
							if(POS_RESERVE_DGV.CELL.VALUE("IS_SELECT", EXPORT_CTR) == true)
							{
								EX_QB = true;
								break;
							}

							EXPORT_CTR++;
						}

						if(EX_QB == true)
						{
							console.log(POS_RESERVE_DGV.CELL.VALUE("REC_POSRESERVE_ID", EXPORT_CTR));
							EX_RES += RESULT_STRING;
							EXPORT_RESERVATION_LINE(POS_RESERVE_DGV.CELL.VALUE("REC_POSRESERVE_ID", EXPORT_CTR), EXQB_CALLBACK_HANDLER);
						}
						else
						{
							EX_RES += RESULT_STRING;
							console.log(EX_RES);
							EX_RES = EXPORT_INVOICE_HEADER() + EX_RES;
							JSRC_EXCEL.REF_EXPORT_FROM_STRING(EX_RES, "reservation-to-quickbooks.csv");
							CUS_SEND_DIALOG_TRY_DISMISS();
						}
					}

				while(POS_RESERVE_DGV.ROW.COUNT() > EXPORT_CTR)
				{
					if(POS_RESERVE_DGV.CELL.VALUE("IS_SELECT", EXPORT_CTR) == true)
					{
						EX_QB = true;
						break;
					}

					EXPORT_CTR++;
				}

				
				if(EX_QB == true)
				{
					console.log(POS_RESERVE_DGV.CELL.VALUE("REC_POSRESERVE_ID", EXPORT_CTR));
					EXPORT_RESERVATION_LINE(POS_RESERVE_DGV.CELL.VALUE("REC_POSRESERVE_ID", EXPORT_CTR), EXQB_CALLBACK_HANDLER);
				}
				else
				{
					JSRC_EXCEL.REF_EXPORT_FROM_STRING(EXPORT_INVOICE_HEADER(), "reservation-to-quickbooks.csv");
				}
			};
		}		

		
		// Prepare onChange event
		// ...........................................
		var ON_CHANGE_EVENT = '';
		
		
		// Initialize: Input Controls
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_ID_TXT"))
		{
			REC_POSRESERVE_ID_TXT = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_ID_TXT");      
			REC_POSRESERVE_ID_TXT.onchange = 
				function()
				{
					if(REC_POSRESERVE_ID_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_ID_TXT.onkeypress = function(){REC_POSRESERVE_ID_TXT.onchange();};
			REC_POSRESERVE_ID_TXT.onpaste = function(){REC_POSRESERVE_ID_TXT.onchange();};
			//REC_POSRESERVE_ID_TXT.oninput = function(){REC_POSRESERVE_ID_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_ACC_GROUP_ID_CMB"))
		{
			REC_POSRESERVE_ACC_GROUP_ID_CMB = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_ACC_GROUP_ID_CMB");      	
			REC_POSRESERVE_ACC_GROUP_ID_CMB.onchange = 
				function()
				{
					if(REC_POSRESERVE_ACC_GROUP_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
					JSOC_CMB.VAR_CLEAR("REC_POSRESERVE_BRANCH_PRODUCT_ID_CMB");
					HTTP_SEARCH_PRODUCT();
					HTTP_SEARCH_PRICEMODEL();
				};
			REC_POSRESERVE_ACC_GROUP_ID_CMB.onkeypress = function(){REC_POSRESERVE_ACC_GROUP_ID_CMB.onchange();};
			REC_POSRESERVE_ACC_GROUP_ID_CMB.onpaste = function(){REC_POSRESERVE_ACC_GROUP_ID_CMB.onchange();};
			//REC_POSRESERVE_ACC_GROUP_ID_CMB.oninput = function(){REC_POSRESERVE_ACC_GROUP_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_REC_CLIENT_ID_CMB"))
		{
			REC_POSRESERVE_REC_CLIENT_ID_CMB = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_REC_CLIENT_ID_CMB");      	
			REC_POSRESERVE_REC_CLIENT_ID_CMB.onchange = 
				function()
				{
					if(REC_POSRESERVE_REC_CLIENT_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
					JSOC_CMB.VAR_CLEAR("REC_POSRESERVE_BRANCH_PRODUCT_ID_CMB");
					GET_CLIENT_PS();
				};
			REC_POSRESERVE_REC_CLIENT_ID_CMB.onkeypress = function(){REC_POSRESERVE_REC_CLIENT_ID_CMB.onchange();};
			REC_POSRESERVE_REC_CLIENT_ID_CMB.onpaste = function(){REC_POSRESERVE_REC_CLIENT_ID_CMB.onchange();};
			//REC_POSRESERVE_REC_CLIENT_ID_CMB.oninput = function(){REC_POSRESERVE_REC_CLIENT_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_PRICE_MODEL_ID_CMB"))
		{
			REC_POSRESERVE_PRICE_MODEL_ID_CMB = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_PRICE_MODEL_ID_CMB");      	
			REC_POSRESERVE_PRICE_MODEL_ID_CMB.onchange = 
				function()
				{
					if(REC_POSRESERVE_PRICE_MODEL_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
					PSID = JSVC_NUM.VAR_NVALL(JSOC_CMB.VAR_SELECTED_VALUE(REC_POSRESERVE_PRICE_MODEL_ID_CMB));
					DGV_CTR = 0;
					HTTP_UPDARE_SRP_ADDED_PRODUCT();
				};
			REC_POSRESERVE_PRICE_MODEL_ID_CMB.onkeypress = function(){REC_POSRESERVE_PRICE_MODEL_ID_CMB.onchange();};
			REC_POSRESERVE_PRICE_MODEL_ID_CMB.onpaste = function(){REC_POSRESERVE_PRICE_MODEL_ID_CMB.onchange();};
			//REC_POSRESERVE_PRICE_MODEL_ID_CMB.oninput = function(){REC_POSRESERVE_PRICE_MODEL_ID_CMB.onchange();};							
		}

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_CODE_TXT"))
		{
			REC_POSRESERVE_CODE_TXT = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_CODE_TXT");      
			REC_POSRESERVE_CODE_TXT.onchange = 
				function()
				{
					if(REC_POSRESERVE_CODE_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_CODE_TXT.onkeypress = function(){REC_POSRESERVE_CODE_TXT.onchange();};
			REC_POSRESERVE_CODE_TXT.onpaste = function(){REC_POSRESERVE_CODE_TXT.onchange();};
			//REC_POSRESERVE_CODE_TXT.oninput = function(){REC_POSRESERVE_CODE_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_REFERENCE_CODE_TXT"))
		{
			REC_POSRESERVE_REFERENCE_CODE_TXT = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_REFERENCE_CODE_TXT");      
			REC_POSRESERVE_REFERENCE_CODE_TXT.onchange = 
				function()
				{
					if(REC_POSRESERVE_REFERENCE_CODE_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_REFERENCE_CODE_TXT.onkeypress = function(){REC_POSRESERVE_REFERENCE_CODE_TXT.onchange();};
			REC_POSRESERVE_REFERENCE_CODE_TXT.onpaste = function(){REC_POSRESERVE_REFERENCE_CODE_TXT.onchange();};
			//REC_POSRESERVE_REFERENCE_CODE_TXT.oninput = function(){REC_POSRESERVE_REFERENCE_CODE_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_DATE_RECORDED_DTP"))
		{
			REC_POSRESERVE_DATE_RECORDED_DTP = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_DATE_RECORDED_DTP");   
			JSOC_ELEMENT.VAR_VALUE(REC_POSRESERVE_DATE_RECORDED_DTP, JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD" + "T00:00"));
			REC_POSRESERVE_DATE_RECORDED_DTP.onchange = 
				function()
				{
					if(REC_POSRESERVE_DATE_RECORDED_DTP.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_DATE_RECORDED_DTP.onkeypress = function(){REC_POSRESERVE_DATE_RECORDED_DTP.onchange();};
			REC_POSRESERVE_DATE_RECORDED_DTP.onpaste = function(){REC_POSRESERVE_DATE_RECORDED_DTP.onchange();};
			REC_POSRESERVE_DATE_RECORDED_DTP.oninput = function(){REC_POSRESERVE_DATE_RECORDED_DTP.onchange();};					
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_RECORDED_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_RECORDED_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_RECORDED_FROM_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_RECORDED_FROM_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_ADD('DAY', 0, JSVC_DATE.VAR_NOW()), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_RECORDED_TO_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_RECORDED_TO_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_ADD('DAY', 0, JSVC_DATE.VAR_NOW()), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_DATE_EXPECTED_DTP"))
		{
			REC_POSRESERVE_DATE_EXPECTED_DTP = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_DATE_EXPECTED_DTP");   
			JSOC_ELEMENT.VAR_VALUE(REC_POSRESERVE_DATE_EXPECTED_DTP, JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_ADD('DAY', 3, JSVC_DATE.VAR_NOW()), "YYYY-MM-DD" + "T00:00"));
			REC_POSRESERVE_DATE_EXPECTED_DTP.onchange = 
				function()
				{
					if(REC_POSRESERVE_DATE_EXPECTED_DTP.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_DATE_EXPECTED_DTP.onkeypress = function(){REC_POSRESERVE_DATE_EXPECTED_DTP.onchange();};
			REC_POSRESERVE_DATE_EXPECTED_DTP.onpaste = function(){REC_POSRESERVE_DATE_EXPECTED_DTP.onchange();};
			REC_POSRESERVE_DATE_EXPECTED_DTP.oninput = function(){REC_POSRESERVE_DATE_EXPECTED_DTP.onchange();};					
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_EXPECTED_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_EXPECTED_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_EXPECTED_FROM_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_EXPECTED_FROM_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_ADD('DAY', 0, JSVC_DATE.VAR_NOW()), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SEARCH_REC_POSRESERVE_DATE_EXPECTED_TO_DTP"))
		{
			JSOC_ELEMENT.VAR_VALUE("SEARCH_REC_POSRESERVE_DATE_EXPECTED_TO_DTP", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_ADD('DAY', 0, JSVC_DATE.VAR_NOW()), "YYYY-MM-DD") + "T00:00");
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_AMOUNT_TXT"))
		{
			REC_POSRESERVE_AMOUNT_TXT = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_AMOUNT_TXT");      
			REC_POSRESERVE_AMOUNT_TXT.onchange = 
				function()
				{
					if(REC_POSRESERVE_AMOUNT_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_AMOUNT_TXT.onkeypress = function(){REC_POSRESERVE_AMOUNT_TXT.onchange();};
			REC_POSRESERVE_AMOUNT_TXT.onpaste = function(){REC_POSRESERVE_AMOUNT_TXT.onchange();};
			//REC_POSRESERVE_AMOUNT_TXT.oninput = function(){REC_POSRESERVE_AMOUNT_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_REMARKS_TXT"))
		{
			REC_POSRESERVE_REMARKS_TXT = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_REMARKS_TXT");      
			REC_POSRESERVE_REMARKS_TXT.onchange = 
				function()
				{
					if(REC_POSRESERVE_REMARKS_TXT.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_REMARKS_TXT.onkeypress = function(){REC_POSRESERVE_REMARKS_TXT.onchange();};
			REC_POSRESERVE_REMARKS_TXT.onpaste = function(){REC_POSRESERVE_REMARKS_TXT.onchange();};
			//REC_POSRESERVE_REMARKS_TXT.oninput = function(){REC_POSRESERVE_REMARKS_TXT.onchange();};
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_ACC_ACCOUNT_ID_CMB"))
		{
			REC_POSRESERVE_ACC_ACCOUNT_ID_CMB = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_ACC_ACCOUNT_ID_CMB");      	
			REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onchange = 
				function()
				{
					if(REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onkeypress = function(){REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onchange();};
			REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onpaste = function(){REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onchange();};
			//REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.oninput = function(){REC_POSRESERVE_ACC_ACCOUNT_ID_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REC_POSRESERVE_STATUS_CMB"))
		{
			REC_POSRESERVE_STATUS_CMB = JSOC_ELEMENT.VAR_GET("REC_POSRESERVE_STATUS_CMB");      	
			REC_POSRESERVE_STATUS_CMB.onchange = 
				function()
				{
					if(REC_POSRESERVE_STATUS_CMB.disabled == false)
					{
						EDIT_HANDLER.REF_IS_MODIFIED = true;
					}
				};
			REC_POSRESERVE_STATUS_CMB.onkeypress = function(){REC_POSRESERVE_STATUS_CMB.onchange();};
			REC_POSRESERVE_STATUS_CMB.onpaste = function(){REC_POSRESERVE_STATUS_CMB.onchange();};
			//REC_POSRESERVE_STATUS_CMB.oninput = function(){REC_POSRESERVE_STATUS_CMB.onchange();};							
		}
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PARAM_REC_POSRESERVE_ID_FILE_FP"))
		{
			PARAM_REC_POSRESERVE_ID_FILE_FP = JSOC_ELEMENT.VAR_GET("PARAM_REC_POSRESERVE_ID_FILE_FP");
		}
				
		
		// Initialize: Default Settings
		// ...........................................
		// FORM_PREPARE_DEFAULT_SETTINGS();   	
	};