	// ===============================================================
	// Load Parent Information Flags
	// ===============================================================	
	function HTTP_PARENT_LOAD()
	{
	}
	

	// ===============================================================
	// EditHandler Flags
	// ===============================================================	
	
	function HTTP_LOAD(CALLBACK_FUNCTION)
	{
		// Escape if new item
		// ...........................................
		/*if(JSRC_FLAG.IS_NULL_BIGINT(PROPERTY_REC_POSSALE_ID, 1, 1))
		{
			return;
		}*/
		
		
		// Load DB data of item
		// ...........................................
		
		
		
		// Clear Changes due to loading
		// ...........................................
	}


	// ===============================================================
	// Print Cash Flow
	// ===============================================================
	function HTTP_PRINT_CASHFLOW(CALLBACK_METHOD)
	{
		var RECEIPT = '';

		var REPORT_DATE = JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD") + ' 00:00:00.0000000';

		var CASH_IN = 0;
		var CASH_OUT = 0;

		var TOTAL_SALES = 0;

		var TOTAL_CASH_IN = 0;
		var TOTAL_CASH_OUT = 0;

		var TOTAL_COLLECTION = 0;


		//GET TOTAL SALES
		var GET_MAP_ARRAY = JSCUS_SQL._RECORD._POS_SALE.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();

		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSSALE_ACC_ACCOUNT_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_ID));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSSALE_DATE_TRANSACT_FROM", REPORT_DATE);
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSSALE_REC_POSDEVICE_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ID));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSSALE_STATUS", 4);

		var RESPONSE_HANDLER =
			function(IS_SUCCESS, RESPONSE_STRING)
			{
				if(IS_SUCCESS === false) {
					JSOC_DIALOG.VAR_LOADING_SPINNER(false);
					alert("CONNECTION ERROR: \n" + RESPONSE_STRING);
					return;
				}

				var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);

				if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false) {
					JSOC_DIALOG.VAR_LOADING_SPINNER(false);
					alert("REQUEST ERROR: \n" + RESPONSE_STRING); 
					return;
				}

				if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") < 0) {
					JSOC_DIALOG.VAR_LOADING_SPINNER(false);
					return;
				}

				else
				{
					//COMPUTE FOR TOTAL SALES
					if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") > 0) {
						$.each(JSON_OBJECT.REC_POSSALE_ID, function(i, item) {
							TOTAL_SALES += (JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_VATABLE[i]) +
								JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_VATEXEMPT[i]) +
								JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_NONVAT[i]) +
								JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_ZERORATED[i]) +
								JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_VATOTHER[i]) +
								JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSSALE_TOTAL_VAT[i]));
						});
					}

					//GET CASHFLOW
					var GET_MAP_ARRAY = JSCUS_SQL._RECORD._POS_CASHFLOW.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();

					JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSCASHFLOW_DATE_PROCESSED_FROM", REPORT_DATE);
					JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSCASHFLOW_ACC_ACCOUNT_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_ID));
					JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSCASHFLOW_REC_POSDEVICE_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ID));
					JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, "PARAM_REC_POSCASHFLOW_STATUS", 2);

					var RESPONSE_HANDLER =
						function(IS_SUCCESS, RESPONSE_STRING)
						{
							if(IS_SUCCESS === false) {
								JSOC_DIALOG.VAR_LOADING_SPINNER(false);
								alert("CONNECTION ERROR: \n" + RESPONSE_STRING);
								return;
							}

							var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);

							if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false) {
								JSOC_DIALOG.VAR_LOADING_SPINNER(false);
								alert("REQUEST ERROR: \n" + RESPONSE_STRING); 
								return;
							}

							if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") < 0) {
								JSOC_DIALOG.VAR_LOADING_SPINNER(false);
								return;
							}

							else
							{
								//CALCULATE CASH FLOWS
								if(JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT") > 0) {
									$.each(JSON_OBJECT.REC_POSCASHFLOW_ID, function(i, item) {
										if(JSON_OBJECT.REC_POSCASHFLOW_IS_IN[i] == 1)
											TOTAL_CASH_IN += JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSCASHFLOW_AMOUNT[i]);
										else
											TOTAL_CASH_OUT += JSVC_NUM.VAR_NVAL(JSON_OBJECT.REC_POSCASHFLOW_AMOUNT[i]);
									});
								}

								CASH_IN = JSVC_NUM.VAR_NVAL(SHIFT_TIME_START_AMOUNT + TOTAL_CASH_IN + TOTAL_SALES + TOTAL_COLLECTION);
								CASH_OUT = JSVC_NUM.VAR_NVAL(CASH_IN - TOTAL_CASH_OUT);


								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_DESCRIPTION+'</td></tr>';
									RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ADDRESS+'</td></tr>';
									RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_CONTACT+'</td></tr>';
									RECEIPT += '<tr><td style="text-align: center;">VAT Reg TIN: '+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_TIN+'</td></tr>';
								RECEIPT += '</table>';

								RECEIPT += '<br>';
											
								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><th style="text-align: center;">Cash Flow Report</th></tr>';
								RECEIPT += '</table>';

								RECEIPT += '<hr style="border: 1px dashed black;">';

								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><td>Report Date: '+JSVC_DATE.VAR_FORMAT(REPORT_DATE, "MMM DD, YYYY")+'</td></tr>';
									RECEIPT += '<tr><td>Report Time: '+JSVC_DATE.VAR_FORMAT(REPORT_DATE, "hh:mm TT")+'</td></tr>';
								RECEIPT += '</table>';

								RECEIPT += '<br>';

								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><td>Cashier: '+JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_NAME+'</td></tr>';
									RECEIPT += '<tr><td>Terminal ID: '+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_MACHINE_ID+'</td></tr>';
								RECEIPT += '</table>';

								RECEIPT += '<br>';

								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><th colspan="3">CASH IN</th></tr>';
									RECEIPT += '<tr><td></td><td>Starting Balance</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(SHIFT_TIME_START_AMOUNT)+'</td></tr>';
									RECEIPT += '<tr><td></td><td>Cash In</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(TOTAL_CASH_IN)+'</td></tr>';
									RECEIPT += '<tr><td></td><td>Sales</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(TOTAL_SALES)+'</td></tr>';
									RECEIPT += '<tr><td></td><td>Collection</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(TOTAL_COLLECTION)+'</td></tr>';
									RECEIPT += '<tr><td></td><td style="font-weight:bold;">Total Cash In</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(CASH_IN)+'</td></tr>';
								RECEIPT += '</table>';
																
								RECEIPT += '<br>';
												
								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><th colspan="3">CASH OUT</th></tr>';
									RECEIPT += '<tr><td></td><td>Cash Out</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(TOTAL_CASH_OUT, 2)+'</td></tr>';
									RECEIPT += '<tr><td></td><td style="font-weight:bold;">Total Cash Out</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(TOTAL_CASH_OUT, 2)+'</td></tr>';
								RECEIPT += '</table>';

								RECEIPT += '<br><br>';

								RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
									RECEIPT += '<tr><td></td><td style="font-weight:bold;" colspan="2">CASH ON HAND</td><td style="text-align: right;">'+JSVC_NUM.VAR_CFORMAT(CASH_OUT, 2)+'</td></tr>';
									RECEIPT += '<tr><th colspan="4" style="text-align: center;"><hr style="border: 1px dashed black;"></th></tr>';
									RECEIPT += '<tr><th colspan="4" style="text-align: center;">Cash Flow Report End</th></tr>';
								RECEIPT += '</table>';

								JSOC_DIALOG.VAR_LOADING_SPINNER(false);

								alertify.confirm
								(
									'PeakPOS', 'Print Cash Flow Report?', 
									function() 
									{ 
										Android.CALL('PRINT', '<html><body>' + RECEIPT + '</body></html>');

										if(JSVC_VAR.VAR_ISSET(CALLBACK_METHOD))
										{
											CALLBACK_METHOD(true);
										}
									}, 
									function() 
									{ 
										if(JSVC_VAR.VAR_ISSET(CALLBACK_METHOD))
										{
											CALLBACK_METHOD(true);
										}
									}
								).set('closable', false, 'labels', {ok:'YES', cancel:'NO'});
							}
						};

					JSCUS_SQL._RECORD._POS_CASHFLOW.CUS_GET
					(
						GET_MAP_ARRAY,
						RESPONSE_HANDLER,
						true
					);
				}
			};


		JSCUS_SQL._RECORD._POS_SALE.CUS_GET
		(
			GET_MAP_ARRAY,
			RESPONSE_HANDLER,
			true
		);
	}


	
	// ===============================================================
	// End Shift
	// ===============================================================
	function END_SHIFT()
	{
		var cents = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_CENTS"]').val());
		var ones = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_1"]').val());
		var fives = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_5"]').val());
		var tens = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_10"]').val());
		var twenties = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_20"]').val());
		var fifties = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_50"]').val());
		var hundreds = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_100"]').val());
		var twohundreds = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_200"]').val());
		var fivehundreds = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_500"]').val());
		var thousands = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_1000"]').val());
		var check_qty = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_CHECKS_QTY"]').val());
		var check_amt = JSVC_NUM.VAR_NVAL($('#CASH_BREAKDOWN_MODAL input[id="CASHBREAKDOWN_CHECKS"]').val());

		var SAVE_MAP_ARRAY = JSCUS_SQL._RECORD._POS_SHIFT.CUS_PREPARE_MAPPED_ARRAY_FOR_SAVE();

		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_ACC_GROUP_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ACC_GROUP_ID));
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_ACC_DEVICE_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ID));
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_ACC_ACCOUNT_ID", JSVC_NUM.VAR_NVALL(JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_ID));
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_ID", SHIFT_ID);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_TIME_END", JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_TO_DATE(JSOC_ELEMENT.VAR_VALUE('SHIFT_END_END_TIME')), "YYYY-MM-DD HH:mm:ss"));
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_1KS", thousands);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_500S", fivehundreds);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_200S", twohundreds);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_100S", hundreds);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_50S", fifties);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_20S", twenties);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_10S", tens);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_5S", fives);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_1S", ones);
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_CENTS", cents);			
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_CHECK_COUNT", check_qty);			
		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_CREDIT_CHECK_AMOUNT", check_amt);	

		JSVC_MAP_ARRAY.VAR_SET(SAVE_MAP_ARRAY, "PARAM_REC_SHIFT_STATUS", 1); //log out

		var RESPONSE_HANDLER =
			function(IS_SUCCESS, RESPONSE_STRING)
			{
				if(IS_SUCCESS === false) {
					alert("CONNECTION ERROR: \n" + RESPONSE_STRING);
					return;
				}

				var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);

				if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false) {
					alert("REQUEST ERROR: \n" + RESPONSE_STRING); 
					return;
				}
				else {
					var JSON_OBJECT = JSRC_JSON.REF_CREATE(RESPONSE_STRING);
																
					if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false) {
						METHOD_REQUEST_FAILURE(CALLBACK_METHOD, JSON_OBJECT);
						return;
					}

					JSOC_DIALOG.VAR_MODAL("SHIFT_END_MODAL_2", false);

					JSOC_DIALOG.VAR_MESSAGE_BOX
					(
						'Your shift has ended.',
						'Information',
						'OK', 'SUCCESS',
						function() {
							//redirect back to POS
							location.reload();
						}
					);

					
				}
			};

		JSCUS_SQL._RECORD._POS_SHIFT.CUS_SAVE
		(
			SAVE_MAP_ARRAY,
			RESPONSE_HANDLER
		);
	}


	// ===============================================================
	// Calculate Cash Breakdown
	// ===============================================================
	function HTTP_CALCULATE_CASH(id)
	{
		var input = $('#SHIFT_END_MODAL input[id="'+id+'"]');
		var output = $('#SHIFT_END_MODAL input[id="'+id+'_TOTAL"]');

		var amount = JSVC_NUM.VAR_NVAL(id.replace('CASHBREAKDOWN_', ''));
		var multiplier = JSVC_NUM.VAR_NVAL(input.val());

		var TOTAL = 0;

		if(id === 'CASHBREAKDOWN_CENTS')
			TOTAL = multiplier * 0.01;
		else if(id === 'CASHBREAKDOWN_CHECKS')
			TOTAL = multiplier;
		else
			TOTAL = amount * multiplier;

		output.val(TOTAL);
		output.next().html(JSVC_NUM.VAR_FORMAT(TOTAL, 2));

		HTTP_CALCULATE_TOTAL_CASH();
	}

	function HTTP_CALCULATE_TOTAL_CASH() 
	{
		var output = $('#SHIFT_END_MODAL #CASHBREAKDOWN_TOTAL');
		var amounts = [1000, 500, 200, 100, 50, 20, 10, 5, 1, 'CENTS', 'CHECKS'];

		var TOTAL = 0;
		var value = 0;
		
		$.each(amounts, function(i, item) {
			value = JSVC_NUM.VAR_NVAL($('input[id="CASHBREAKDOWN_'+item+'_TOTAL"]').val());
			TOTAL += value;
		});

		//send to end shift modal
		SHIFT_TIME_END_AMOUNT = TOTAL;
		output.html(JSVC_NUM.VAR_CFORMAT(TOTAL));
	}


	// ===============================================================
	// Print Cash Breakdown
	// ===============================================================
	function HTTP_PRINT_CASHBREAKDOWN(CALLBACK_METHOD)
	{
		var RECEIPT = '';

		var REPORT_DATE = JSVC_DATE.VAR_FORMAT(JSVC_DATE.VAR_NOW(), "YYYY-MM-DD HH:mm:ss") + '.999999';;

		var DENOMINATIONS = [1000, 500, 200, 100, 50, 20, 10, 5, 1, 'CENTS', 'CHECKS'];
		var SUBTOTAL = 0;

		var TOTAL = 0;
		var QTY = 0;

		RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
			RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_DESCRIPTION+'</td></tr>';
			RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_ADDRESS+'</td></tr>';
			RECEIPT += '<tr><td style="text-align: center;">'+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_CONTACT+'</td></tr>';
			RECEIPT += '<tr><td style="text-align: center;">VAT Reg TIN: '+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_TIN+'</td></tr>';
		RECEIPT += '</table>';

		RECEIPT += '<br>';
		
		RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
			RECEIPT += '<tr><td style="text-align: center;">CASH BREAKDOWN</td></tr>';
		RECEIPT += '</table>';

		RECEIPT += '<hr style="border: 1px dashed black;">';

		RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
			RECEIPT += '<tr><td>DATE AND TIME: '+JSVC_DATE.VAR_FORMAT(REPORT_DATE, "MMM DD, YYYY hh:mm TT")+'</td></tr>';
			RECEIPT += '<tr><td>CASHIER: '+JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_NAME+'</td></tr>';
			RECEIPT += '<tr><td>TERMINAL ID: '+JSCUS_SQL._RECORD._POSDEVICE._LOGIN.REC_POSDEVICE_MACHINE_ID+'</td></tr>';
		RECEIPT += '</table>';

		RECEIPT += '<hr style="border: 1px dashed black;">';
		RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 0 !important;">';

		$.each(DENOMINATIONS, function(i, item) {
			TOTAL = JSVC_NUM.VAR_NVAL(JSOC_ELEMENT.VAR_VALUE('CASHBREAKDOWN_'+item+'_TOTAL'));
			QTY = JSVC_NUM.VAR_NVAL(JSOC_ELEMENT.VAR_VALUE('CASHBREAKDOWN_'+item));

			if(item === 'CENTS') {
				RECEIPT += '<tr>';
					RECEIPT += '<td colspan="3" style="text-align: left; vertical-align: middle; width: 60%;">'+item+'</td>';
					RECEIPT += '<td style="text-align: center; vertical-align: middle; width: 20%;">=</td>'
					RECEIPT += '<td width="20%" style="text-align: right; vertical-align: middle;">'+JSVC_NUM.VAR_CFORMAT(TOTAL)+'</td>';
				RECEIPT += '</tr>';
			}
			else if(item === 'CHECKS') {
				RECEIPT += '<tr>';
					RECEIPT += '<td style="text-left: right; vertical-align: middle; width: 20%;">'+item+'</td>';
					RECEIPT += '<td style="text-align: center; vertical-align: middle; width: 20%;"><small>QTY: '+JSOC_ELEMENT.VAR_VALUE('CASHBREAKDOWN_CHECKS_QTY')+'</small></td>';
					RECEIPT += '<td width="20%" style="text-align: right; vertical-align: middle;">'+JSVC_NUM.VAR_CFORMAT(QTY)+'</td>';
					RECEIPT += '<td style="text-align: center; vertical-align: middle; width: 10%;">=</td>'
					RECEIPT += '<td style="text-align: right; vertical-align: middle; width: 20%;">'+JSVC_NUM.VAR_CFORMAT(TOTAL)+'</td>';
				RECEIPT += '</tr>';
			}
			else {
				RECEIPT += '<tr>';
					RECEIPT += '<td style="text-align: right; vertical-align: middle; width: 20%;">'+JSVC_NUM.VAR_CFORMAT(item)+'</td>';
					RECEIPT += '<td style="text-align: center; vertical-align: middle; width: 20%;">x</td>';
					RECEIPT += '<td style="text-align: right; vertical-align: middle; width: 20%;">'+JSVC_NUM.VAR_CFORMAT(QTY)+'</td>';
					RECEIPT += '<td style="text-align: center; vertical-align: middle; width: 20%;">=</td>'
					RECEIPT += '<td style="text-align: right; vertical-align: middle; width: 20%;">'+JSVC_NUM.VAR_CFORMAT(TOTAL)+'</td>';
				RECEIPT += '</tr>';
			}

			SUBTOTAL += TOTAL;
		});

		RECEIPT += '</table>';

		RECEIPT += '<hr style="border: 1px dashed black;">';

		RECEIPT += '<table border="0" style="width: 100%; border-collapse: collapse; font-size: 10px; margin-bottom: 0 !important;">';
			RECEIPT += '<thead>';
				RECEIPT += '<tr><td style="width: 60%">TOTAL: </td><td style="width: 40%; text-align: right;">'+JSVC_NUM.VAR_CFORMAT(SUBTOTAL)+'</td></tr>';
			RECEIPT += '</thead>';
		RECEIPT += '</table>';

		JSOC_DIALOG.VAR_MODAL("SHIFT_END_MODAL", false);
		JSOC_DIALOG.VAR_LOADING_SPINNER(false);

		alertify.confirm
		(
			'PeakPOS', 'Print Cash Breakdown Report?', 
			function() 
			{ 
				Android.CALL('PRINT', '<html><body>' + RECEIPT + '</body></html>');

				if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SHIFT_END_MODAL_2") == true)
				{
					// Clear Modal
					if(JSVC_VAR.VAR_ISSET(INPUT_INSTANCE))
					{
						JSOC_WINDOW.VAR_INPUT_INSTANCE_RESTORE(INPUT_INSTANCE);
					}
												
					// Display Modal
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_NAME', JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_NAME);
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_START_TIME', JSVC_DATE.VAR_FORMAT(SHIFT_TIME_START, "MMM DD, YYYY hh:mm TT"));
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_END_TIME', JSVC_DATE.VAR_FORMAT(REPORT_DATE, "MMM DD, YYYY hh:mm TT"));
					JSOC_DIALOG.VAR_MODAL("SHIFT_END_MODAL_2", true);
					return;
				}

				CALLBACK_METHOD(true);
			}, 
			function() 
			{ 
				if(JSOC_ELEMENT.VAR_ELEMENT_EXISTS("SHIFT_END_MODAL_2") == true)
				{												
					// Display Modal
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_NAME', JSCUS_SQL._ACCOUNT._LOGIN.ACC_ACCOUNT_NAME);
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_START_TIME', JSVC_DATE.VAR_FORMAT(SHIFT_TIME_START, "MMM DD, YYYY hh:mm TT"));
					JSOC_ELEMENT.VAR_VALUE('SHIFT_END_END_TIME', JSVC_DATE.VAR_FORMAT(REPORT_DATE, "MMM DD, YYYY hh:mm TT"));
					JSOC_DIALOG.VAR_MODAL("SHIFT_END_MODAL_2", true);
					return;
				}

				CALLBACK_METHOD(true);
			}
		).set('closable', false, 'labels', {ok:'YES', cancel:'NO'});
	}