// Required: common.js

// RECORD_PSACTUAL GET
JSCUS_SQL._RECORD._PSAPLAN = function(){};

	
	/** 
	 * =======================================================================================================
	 * Perform SQL GET request to the table RECORD_PSACTUAL. Returns DataSet.
	 *
	 * @param VAR_PARAMETER_ARRAY String() Array with Request ParameterSet.
	 * @param CALLBACK_ADDRESS(bool, String) A callback method when the server response is received.
	 *
	 * @param SQL_KEEP_PARAMETER_TO_CACHE bool (Optional) If TRUE save to cache, for easier paging request.
	 * =======================================================================================================
	 */
	JSCUS_SQL._RECORD._PSAPLAN.CUS_OVERVIEW = function
	(
		PARAM_CAT_PRODUCT_ID,
		PARAM_DATE,
		CALLBACK_ADDRESS
	)
	{
		// Process SQL Request
		// _______________________________________________________________________
		var PARAM_SET = "";			
		PARAM_SET = JSRC_HTTP.REF_ADD(PARAM_SET, 'PARAM_CAT_PRODUCT_ID', PARAM_CAT_PRODUCT_ID);
		PARAM_SET = JSRC_HTTP.REF_ADD(PARAM_SET, 'PARAM_DATE', PARAM_DATE);
							
		// Send SQL Request
		// _______________________________________________________________________					
		CUS_SEND_REQUEST
		(
			CALLBACK_ADDRESS,
			JSCUS_CACHE.SERVER_URL + '/Record/psaplan/overview',
			'',
			PARAM_SET
		);	
	};
	
	
	/** 
	 * =======================================================================================================
	 * Perform SQL GET request to the table RECORD_PSACTUAL. Returns DataSet.
	 *
	 * @param VAR_PARAMETER_ARRAY String() Array with Request ParameterSet.
	 * @param CALLBACK_ADDRESS(bool, String) A callback method when the server response is received.
	 *
	 * @param SQL_KEEP_PARAMETER_TO_CACHE bool (Optional) If TRUE save to cache, for easier paging request.
	 * =======================================================================================================
	 */
	JSCUS_SQL._RECORD._PSAPLAN.CUS_PENDING = function
	(
		PARAM_DATE,
		CALLBACK_ADDRESS
	)
	{
		// Process SQL Request
		// _______________________________________________________________________
		var PARAM_SET = "";			
		PARAM_SET = JSRC_HTTP.REF_ADD(PARAM_SET, 'PARAM_DATE', PARAM_DATE);
							
		// Send SQL Request
		// _______________________________________________________________________					
		CUS_SEND_REQUEST
		(
			CALLBACK_ADDRESS,
			JSCUS_CACHE.SERVER_URL + '/Record/psaplan/pending',
			'',
			PARAM_SET
		);	
	};