<?php

	// Perform Login
    $SHORTCODE_STATUS = PHPCUS_SHORTCODE::CUS_QUICK_LOGIN();
	
	// Check Array Input
	PHPCUS_PARAM::CUS_DOES_NOT_SUPPORT_ARRAY();
	
	// Check already authenticated
	PHPCUS_PARAM::CUS_REQUIRES_AUTHENTICATION();
	// Check access rights
	PHPCUS_PARAM::CUS_HAS_PERMISSION(PHPCUS_SYSTEM::AUTHORITY_VIEW_ONLY, 'record_pos_shift');
	
	if
	(
		PHPRC_HTTP_PARAM::REF_ISSET_IN_ARRAY
		(
			[
					'PARAM_REC_SHIFT_ID',
					'PARAM_REC_SHIFT_ACC_GROUP_ID',
					'PARAM_REC_SHIFT_ACC_DEVICE_ID',
					'PARAM_REC_SHIFT_ACC_ACCOUNT_ID',
					'PARAM_REC_SHIFT_TIME_BEGIN_FROM',
					'PARAM_REC_SHIFT_TIME_BEGIN_TO',
					'PARAM_REC_SHIFT_TIME_END_FROM',
					'PARAM_REC_SHIFT_TIME_END_TO',
					'PARAM_REC_SHIFT_CASH_BEGIN_FROM',
					'PARAM_REC_SHIFT_CASH_BEGIN_TO',
					'PARAM_REC_SHIFT_CASH_END_FROM',
					'PARAM_REC_SHIFT_CASH_END_TO',
					'PARAM_REC_SHIFT_CREDIT_10KS_FROM',
					'PARAM_REC_SHIFT_CREDIT_10KS_TO',
					'PARAM_REC_SHIFT_CREDIT_5KS_FROM',
					'PARAM_REC_SHIFT_CREDIT_5KS_TO',
					'PARAM_REC_SHIFT_CREDIT_2KS_FROM',
					'PARAM_REC_SHIFT_CREDIT_2KS_TO',
					'PARAM_REC_SHIFT_CREDIT_1KS_FROM',
					'PARAM_REC_SHIFT_CREDIT_1KS_TO',
					'PARAM_REC_SHIFT_CREDIT_500S_FROM',
					'PARAM_REC_SHIFT_CREDIT_500S_TO',
					'PARAM_REC_SHIFT_CREDIT_200S_FROM',
					'PARAM_REC_SHIFT_CREDIT_200S_TO',
					'PARAM_REC_SHIFT_CREDIT_100S_FROM',
					'PARAM_REC_SHIFT_CREDIT_100S_TO',
					'PARAM_REC_SHIFT_CREDIT_50S_FROM',
					'PARAM_REC_SHIFT_CREDIT_50S_TO',
					'PARAM_REC_SHIFT_CREDIT_20S_FROM',
					'PARAM_REC_SHIFT_CREDIT_20S_TO',
					'PARAM_REC_SHIFT_CREDIT_10S_FROM',
					'PARAM_REC_SHIFT_CREDIT_10S_TO',
					'PARAM_REC_SHIFT_CREDIT_5S_FROM',
					'PARAM_REC_SHIFT_CREDIT_5S_TO',
					'PARAM_REC_SHIFT_CREDIT_1S_FROM',
					'PARAM_REC_SHIFT_CREDIT_1S_TO',
					'PARAM_REC_SHIFT_CREDIT_CENTS_FROM',
					'PARAM_REC_SHIFT_CREDIT_CENTS_TO',
					'PARAM_REC_SHIFT_AMOUNT_SALES_FROM',
					'PARAM_REC_SHIFT_AMOUNT_SALES_TO',
					'PARAM_REC_SHIFT_AMOUNT_RETURN_FROM',
					'PARAM_REC_SHIFT_AMOUNT_RETURN_TO',
					'PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_FROM',
					'PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_TO',
					'PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_FROM',
					'PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_TO',
					'PARAM_REC_SHIFT_CASHIN_FROM',
					'PARAM_REC_SHIFT_CASHIN_TO',
					'PARAM_REC_SHIFT_CASHOUT_FROM',
					'PARAM_REC_SHIFT_CASHOUT_TO',
					'PARAM_REC_SHIFT_STATUS',
					
					'PARAM_ORDER_FIELD',
					'PARAM_ORDER_TYPE',
					'PARAM_SKIP',
					'PARAM_LIMIT'
			], True
		)
	)
	{
		Try
		{
			// Read params
			// ------------------------------------------------------------------	
			$PARAM_REC_SHIFT_ID = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_ID');
			$PARAM_REC_SHIFT_ACC_GROUP_ID = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_ACC_GROUP_ID');
			$PARAM_REC_SHIFT_ACC_DEVICE_ID = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_ACC_DEVICE_ID');
			$PARAM_REC_SHIFT_ACC_ACCOUNT_ID = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_ACC_ACCOUNT_ID');
			$PARAM_REC_SHIFT_TIME_BEGIN_FROM = PHPCUS_PARAM::CUS_READ_DATETIME('PARAM_REC_SHIFT_TIME_BEGIN_FROM');
			$PARAM_REC_SHIFT_TIME_BEGIN_TO = PHPCUS_PARAM::CUS_READ_DATETIME('PARAM_REC_SHIFT_TIME_BEGIN_TO');
			$PARAM_REC_SHIFT_TIME_END_FROM = PHPCUS_PARAM::CUS_READ_DATETIME('PARAM_REC_SHIFT_TIME_END_FROM');
			$PARAM_REC_SHIFT_TIME_END_TO = PHPCUS_PARAM::CUS_READ_DATETIME('PARAM_REC_SHIFT_TIME_END_TO');
			$PARAM_REC_SHIFT_CASH_BEGIN_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASH_BEGIN_FROM');
			$PARAM_REC_SHIFT_CASH_BEGIN_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASH_BEGIN_TO');
			$PARAM_REC_SHIFT_CASH_END_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASH_END_FROM');
			$PARAM_REC_SHIFT_CASH_END_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASH_END_TO');
			$PARAM_REC_SHIFT_CREDIT_10KS_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_10KS_FROM');
			$PARAM_REC_SHIFT_CREDIT_10KS_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_10KS_TO');
			$PARAM_REC_SHIFT_CREDIT_5KS_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_5KS_FROM');
			$PARAM_REC_SHIFT_CREDIT_5KS_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_5KS_TO');
			$PARAM_REC_SHIFT_CREDIT_2KS_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_2KS_FROM');
			$PARAM_REC_SHIFT_CREDIT_2KS_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_2KS_TO');
			$PARAM_REC_SHIFT_CREDIT_1KS_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_1KS_FROM');
			$PARAM_REC_SHIFT_CREDIT_1KS_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_1KS_TO');
			$PARAM_REC_SHIFT_CREDIT_500S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_500S_FROM');
			$PARAM_REC_SHIFT_CREDIT_500S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_500S_TO');
			$PARAM_REC_SHIFT_CREDIT_200S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_200S_FROM');
			$PARAM_REC_SHIFT_CREDIT_200S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_200S_TO');
			$PARAM_REC_SHIFT_CREDIT_100S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_100S_FROM');
			$PARAM_REC_SHIFT_CREDIT_100S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_100S_TO');
			$PARAM_REC_SHIFT_CREDIT_50S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_50S_FROM');
			$PARAM_REC_SHIFT_CREDIT_50S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_50S_TO');
			$PARAM_REC_SHIFT_CREDIT_20S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_20S_FROM');
			$PARAM_REC_SHIFT_CREDIT_20S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_20S_TO');
			$PARAM_REC_SHIFT_CREDIT_10S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_10S_FROM');
			$PARAM_REC_SHIFT_CREDIT_10S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_10S_TO');
			$PARAM_REC_SHIFT_CREDIT_5S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_5S_FROM');
			$PARAM_REC_SHIFT_CREDIT_5S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_5S_TO');
			$PARAM_REC_SHIFT_CREDIT_1S_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_1S_FROM');
			$PARAM_REC_SHIFT_CREDIT_1S_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_1S_TO');
			$PARAM_REC_SHIFT_CREDIT_CENTS_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CREDIT_CENTS_FROM');
			$PARAM_REC_SHIFT_CREDIT_CENTS_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CREDIT_CENTS_TO');
			$PARAM_REC_SHIFT_AMOUNT_SALES_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_AMOUNT_SALES_FROM');
			$PARAM_REC_SHIFT_AMOUNT_SALES_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_AMOUNT_SALES_TO');
			$PARAM_REC_SHIFT_AMOUNT_RETURN_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_AMOUNT_RETURN_FROM');
			$PARAM_REC_SHIFT_AMOUNT_RETURN_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_AMOUNT_RETURN_TO');
			$PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_FROM = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_FROM');
			$PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_TO = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_TO');
			$PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_FROM');
			$PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_TO');
			$PARAM_REC_SHIFT_CASHIN_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASHIN_FROM');
			$PARAM_REC_SHIFT_CASHIN_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASHIN_TO');
			$PARAM_REC_SHIFT_CASHOUT_FROM = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASHOUT_FROM');
			$PARAM_REC_SHIFT_CASHOUT_TO = PHPCUS_PARAM::CUS_READ_DECIMAL('PARAM_REC_SHIFT_CASHOUT_TO');
			$PARAM_REC_SHIFT_STATUS = PHPCUS_PARAM::CUS_READ_INT('PARAM_REC_SHIFT_STATUS');
			
			$PARAM_ORDER_FIELD = PHPCUS_PARAM::CUS_READ_SORT_FIELD
			(
					'PARAM_ORDER_FIELD',
					[
						'REC_SHIFT_ID', 
						'REC_SHIFT_ACC_GROUP_ID', 
						'REC_SHIFT_ACC_DEVICE_ID', 
						'REC_SHIFT_ACC_ACCOUNT_ID', 
						'REC_SHIFT_TIME_BEGIN', 
						'REC_SHIFT_TIME_END', 
						'REC_SHIFT_CASH_BEGIN', 
						'REC_SHIFT_CASH_END', 
						'REC_SHIFT_CREDIT_10KS', 
						'REC_SHIFT_CREDIT_5KS', 
						'REC_SHIFT_CREDIT_2KS', 
						'REC_SHIFT_CREDIT_1KS', 
						'REC_SHIFT_CREDIT_500S', 
						'REC_SHIFT_CREDIT_200S', 
						'REC_SHIFT_CREDIT_100S', 
						'REC_SHIFT_CREDIT_50S', 
						'REC_SHIFT_CREDIT_20S', 
						'REC_SHIFT_CREDIT_10S', 
						'REC_SHIFT_CREDIT_5S', 
						'REC_SHIFT_CREDIT_1S', 
						'REC_SHIFT_CREDIT_CENTS', 
						'REC_SHIFT_AMOUNT_SALES', 
						'REC_SHIFT_AMOUNT_RETURN', 
						'REC_SHIFT_CREDIT_CHECK_COUNT', 
						'REC_SHIFT_CREDIT_CHECK_AMOUNT', 
						'REC_SHIFT_CASHIN', 
						'REC_SHIFT_CASHOUT', 
						'REC_SHIFT_STATUS'
						, 
						'ACC_GROUP_ID',		
						'ACC_GROUP_DESCRIPTION',		
						'ACC_GROUP_STATUS',		
						'ACC_GROUP_SYSTEM_GENERATED',		
						'REC_POSDEVICE_ID',		
						'REC_POSDEVICE_ACC_GROUP_ID',		
						'REC_POSDEVICE_DESCRIPTION',		
						'REC_POSDEVICE_MODEL',		
						'REC_POSDEVICE_CODE',		
						'REC_POSDEVICE_OS',		
						'REC_POSDEVICE_MACHINE_ID',		
						'REC_POSDEVICE_PERMIT_NUMBER',		
						'REC_POSDEVICE_DATE_ACCREDITED',		
						'REC_POSDEVICE_ADDRESS',		
						'REC_POSDEVICE_CONTACT',		
						'REC_POSDEVICE_TIN',		
						'REC_POSDEVICE_RESET_COUNT',		
						'REC_POSDEVICE_REGISTRATION_ACC_ACCOUNT_ID',		
						'REC_POSDEVICE_DATE_REGISTERED',		
						'REC_POSDEVICE_PROCESSED_ACC_ACCOUNT_ID',		
						'REC_POSDEVICE_DATE_PROCESSED',		
						'REC_POSDEVICE_STATUS',		
						'ACC_ACCOUNT_ID',		
						'ACC_ACCOUNT_SERVER_ID',		
						'ACC_ACCOUNT_ACC_LEVEL_ID',		
						'ACC_ACCOUNT_ACC_GROUP_ID',		
						'ACC_ACCOUNT_ADD_RESOURCE_ID',		
						'ACC_ACCOUNT_USERNAME',		
						'ACC_ACCOUNT_PASSWORD',		
						'ACC_ACCOUNT_AUTH_CODE',		
						'ACC_ACCOUNT_FIRST_NAME',		
						'ACC_ACCOUNT_MIDDLE_NAME',		
						'ACC_ACCOUNT_LAST_NAME',		
						'ACC_ACCOUNT_POSITION',		
						'ACC_ACCOUNT_SYS_GENDER_ID',		
						'ACC_ACCOUNT_STATUS',		
						'ACC_ACCOUNT_SYSTEM_GENERATED'		
					]
			);		
			$PARAM_ORDER_TYPE = PHPCUS_PARAM::CUS_READ_SORT_TYPE('PARAM_ORDER_TYPE');
			$PARAM_SKIP	= PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_SKIP');
			$PARAM_LIMIT = PHPCUS_PARAM::CUS_READ_BIGINT('PARAM_LIMIT');
			
			// ------------------------------------------------------------------
			
			
			// Populate Map Array
			// ...........................................
			$GET_MAP_ARRAY = PHPCUS_RECORD_POS_SHIFT::CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
			
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_ID'] = $PARAM_REC_SHIFT_ID;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_ACC_GROUP_ID'] = $PARAM_REC_SHIFT_ACC_GROUP_ID;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_ACC_DEVICE_ID'] = $PARAM_REC_SHIFT_ACC_DEVICE_ID;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_ACC_ACCOUNT_ID'] = $PARAM_REC_SHIFT_ACC_ACCOUNT_ID;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_TIME_BEGIN_FROM'] = $PARAM_REC_SHIFT_TIME_BEGIN_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_TIME_BEGIN_TO'] = $PARAM_REC_SHIFT_TIME_BEGIN_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_TIME_END_FROM'] = $PARAM_REC_SHIFT_TIME_END_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_TIME_END_TO'] = $PARAM_REC_SHIFT_TIME_END_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASH_BEGIN_FROM'] = $PARAM_REC_SHIFT_CASH_BEGIN_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASH_BEGIN_TO'] = $PARAM_REC_SHIFT_CASH_BEGIN_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASH_END_FROM'] = $PARAM_REC_SHIFT_CASH_END_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASH_END_TO'] = $PARAM_REC_SHIFT_CASH_END_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_10KS_FROM'] = $PARAM_REC_SHIFT_CREDIT_10KS_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_10KS_TO'] = $PARAM_REC_SHIFT_CREDIT_10KS_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_5KS_FROM'] = $PARAM_REC_SHIFT_CREDIT_5KS_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_5KS_TO'] = $PARAM_REC_SHIFT_CREDIT_5KS_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_2KS_FROM'] = $PARAM_REC_SHIFT_CREDIT_2KS_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_2KS_TO'] = $PARAM_REC_SHIFT_CREDIT_2KS_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_1KS_FROM'] = $PARAM_REC_SHIFT_CREDIT_1KS_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_1KS_TO'] = $PARAM_REC_SHIFT_CREDIT_1KS_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_500S_FROM'] = $PARAM_REC_SHIFT_CREDIT_500S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_500S_TO'] = $PARAM_REC_SHIFT_CREDIT_500S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_200S_FROM'] = $PARAM_REC_SHIFT_CREDIT_200S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_200S_TO'] = $PARAM_REC_SHIFT_CREDIT_200S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_100S_FROM'] = $PARAM_REC_SHIFT_CREDIT_100S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_100S_TO'] = $PARAM_REC_SHIFT_CREDIT_100S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_50S_FROM'] = $PARAM_REC_SHIFT_CREDIT_50S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_50S_TO'] = $PARAM_REC_SHIFT_CREDIT_50S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_20S_FROM'] = $PARAM_REC_SHIFT_CREDIT_20S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_20S_TO'] = $PARAM_REC_SHIFT_CREDIT_20S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_10S_FROM'] = $PARAM_REC_SHIFT_CREDIT_10S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_10S_TO'] = $PARAM_REC_SHIFT_CREDIT_10S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_5S_FROM'] = $PARAM_REC_SHIFT_CREDIT_5S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_5S_TO'] = $PARAM_REC_SHIFT_CREDIT_5S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_1S_FROM'] = $PARAM_REC_SHIFT_CREDIT_1S_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_1S_TO'] = $PARAM_REC_SHIFT_CREDIT_1S_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CENTS_FROM'] = $PARAM_REC_SHIFT_CREDIT_CENTS_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CENTS_TO'] = $PARAM_REC_SHIFT_CREDIT_CENTS_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_AMOUNT_SALES_FROM'] = $PARAM_REC_SHIFT_AMOUNT_SALES_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_AMOUNT_SALES_TO'] = $PARAM_REC_SHIFT_AMOUNT_SALES_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_AMOUNT_RETURN_FROM'] = $PARAM_REC_SHIFT_AMOUNT_RETURN_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_AMOUNT_RETURN_TO'] = $PARAM_REC_SHIFT_AMOUNT_RETURN_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_FROM'] = $PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_TO'] = $PARAM_REC_SHIFT_CREDIT_CHECK_COUNT_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_FROM'] = $PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_TO'] = $PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASHIN_FROM'] = $PARAM_REC_SHIFT_CASHIN_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASHIN_TO'] = $PARAM_REC_SHIFT_CASHIN_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASHOUT_FROM'] = $PARAM_REC_SHIFT_CASHOUT_FROM;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_CASHOUT_TO'] = $PARAM_REC_SHIFT_CASHOUT_TO;
			$GET_MAP_ARRAY['PARAM_REC_SHIFT_STATUS'] = $PARAM_REC_SHIFT_STATUS;
			
			$GET_MAP_ARRAY["PARAM_ORDER_FIELD"] = $PARAM_ORDER_FIELD;
			$GET_MAP_ARRAY["PARAM_ORDER_TYPE"] = $PARAM_ORDER_TYPE;
			$GET_MAP_ARRAY["PARAM_SKIP"] = $PARAM_SKIP;
			$GET_MAP_ARRAY["PARAM_LIMIT"] = $PARAM_LIMIT;
			
			
			// Execute Stored Procedure
			// ...........................................
			$DATA_SET = PHPCUS_RECORD_POS_SHIFT::CUS_GET_MA($GET_MAP_ARRAY);
			
						
			// Return JSON response
			// ...........................................
			if(empty($DATA_SET) === False)
			{
				PHPCUS_PARAM::CUS_JSON_SUCCESS($DATA_SET);
			}
			else
			{
				PHPCUS_PARAM::CUS_JSON_SUCCESS('');
			}
			
		}
		Catch(Exception $ERR)
		{		
			PHPVC_LOG::VAR_REPORT_ERROR($ERR, 0);
			if(isset($_SERVER['HTTP_ORIGIN']))
			{
			    PHPVC_LOG::VAR_ERROR('HTTP_ORIGIN', $_SERVER['HTTP_ORIGIN']);
			}
			if(isset($_SERVER['HTTP_HOST']))
			{
			    PHPVC_LOG::VAR_ERROR('HTTP_HOST', $_SERVER['HTTP_HOST']);
			}		
			if(isset($_SERVER['HTTP_REFERER']))
			{
			    PHPVC_LOG::VAR_ERROR('HTTP_REFERER', $_SERVER['HTTP_REFERER']);
			}
			if(isset($_SERVER['REMOTE_ADDR']))
			{
			    PHPVC_LOG::VAR_ERROR('REMOTE_ADDR', $_SERVER['REMOTE_ADDR']);
			}
			
			PHPCUS_PARAM::CUS_JSON_ERROR($ERR->getMessage());
		}
	}
	else
	{
		PHPCUS_PARAM::CUS_JSON_ERROR('Missing parameters');
	}

?>