	// ===============================================================
	// Global Var
	// ===============================================================




	// ===============================================================
	// Initialize Controls
	// ===============================================================

	function FORM_INITIALIZE()
	{
		// Initialize: Ribbon Buttons [X Read]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("XREAD_BBI"))
		{
    		XREAD_BBI = JSOC_ELEMENT.VAR_GET("XREAD_BBI"); 

    		XREAD_BBI.onclick =
    			function()
    			{
    				X_READING();
    			};
		}


		// Initialize: Ribbon Buttons [Cashflow]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("CASHFLOW_BBI"))
		{
    		CASHFLOW_BBI = JSOC_ELEMENT.VAR_GET("CASHFLOW_BBI"); 

    		CASHFLOW_BBI.onclick =
    			function()
    			{
    				HTTP_PRINT_CASHFLOW();
    			};
		}


		// Initialize: Ribbon Buttons [Z Read]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ZREAD_BBI"))
		{
    		ZREAD_BBI = JSOC_ELEMENT.VAR_GET("ZREAD_BBI"); 

    		ZREAD_BBI.onclick =
    			function()
    			{
    				if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("ZREADING_MODAL") == true)
					{
						JSOC_ELEMENT.VAR_VALUE('ZREADING_FROM_DATE', JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD"));
						JSOC_DIALOG.VAR_MODAL("ZREADING_MODAL", true);
						return;
					}
    			};
		}


		// Initialize: Ribbon Buttons [Print Z Read]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("PRINT_ZREAD_BBI"))
		{
    		PRINT_ZREAD_BBI = JSOC_ELEMENT.VAR_GET("PRINT_ZREAD_BBI"); 

    		PRINT_ZREAD_BBI.onclick =
    			function()
    			{
    				SAVE_EOD(JSOC_ELEMENT.VAR_VALUE('ZREADING_FROM_DATE'));
    			};
		}


		// Initialize: Ribbon Buttons [End Shift - Cash breakdown]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SHIFT_END_BBI"))
		{
    		SHIFT_END_BBI = JSOC_ELEMENT.VAR_GET("SHIFT_END_BBI"); 

    		SHIFT_END_BBI.onclick =
    			function()
    			{
    				HTTP_PRINT_CASHBREAKDOWN
    				(
    					function(IS_SUCCESS) 
    					{
    						if(IS_SUCCESS == false)
    						{	
    							return;
    						}
    					}
    				);
    			};
		}

		// Initialize: Ribbon Buttons [End Shift 2]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SHIFT_END_BBI_2"))
		{
    		SHIFT_END_BBI_2 = JSOC_ELEMENT.VAR_GET("SHIFT_END_BBI_2"); 

    		SHIFT_END_BBI_2.onclick =
    			function()
    			{
    				HTTP_END_SHIFT();
    			};
		}

		// Initialize: Ribbon Buttons [X Read]
		// ...........................................
		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("REPORTS_XREAD_BBI"))
		{
    		REPORTS_XREAD_BBI = JSOC_ELEMENT.VAR_GET("REPORTS_XREAD_BBI"); 

    		REPORTS_XREAD_BBI.onclick =
    			function()
    			{
    				X_READING();
    			};
		}

		

		// Prepare onChange event
		// ...........................................
		var ON_CHANGE_EVENT = '';

		if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SHIFT_END_MODAL"))
		{
			$('input[id^="CASHBREAKDOWN_"]').on('keyup', function (e) {
				HTTP_CALCULATE_CASH($(this).attr('id'));
			});
		}
	};