


	function HTTP_LOAD(CALLBACK_METHOD)
	{
		// Load DB data of item
		// ...........................................
		JSOC_DIALOG.VAR_LOADING_SPINNER(true);


		// Actual Function
		var GET_MAP_ARRAY = JSCUS_SQL._RECORD._JOB_ORDER_TASK.CUS_PREPARE_MAPPED_ARRAY_FOR_GET();
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_LONG_A_FROM', JSVC_NUM.VAR_NVALL(PROPERTY_PARENT_ID));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_LONG_A_TO', JSVC_NUM.VAR_NVALL(PROPERTY_PARENT_ID));
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_DECIMAL_A_FROM', 1);
		JSVC_MAP_ARRAY.VAR_SET(GET_MAP_ARRAY, 'PARAM_REC_JORDER_TASK_DECIMAL_A_TO', 1);

		// Declare Post Request Handler
		// _______________________________________________________________________
		var RESPONSE_HANDLER = 			
			function(IS_SUCCESS, HTTP_RESPONSE)
			{
				// Disable Dialogs
				// ...........................................
				CUS_SEND_DIALOG_TRY_DISMISS();
				
				// Handle Error
				// ...........................................
				if(IS_SUCCESS === false)
				{
					METHOD_UNABLE_TO_SEND_REQUEST(CALLBACK_METHOD);	
					return;
				}
				
				// Catch JSON Error
				// ...........................................
				else if(JSRC_JSON.REF_IS_JSTRING(HTTP_RESPONSE) == false)
				{
					METHOD_SERVER_ISSUE(CALLBACK_METHOD, HTTP_RESPONSE);
					return;			
				}
					
				// Read Response
				// ...........................................
				else
				{
					// Load Response
					var JSON_OBJECT = JSRC_JSON.REF_CREATE(HTTP_RESPONSE);

					if(JSRC_JSON.REF_IS_SUCCESS(JSON_OBJECT) === false)
					{
						METHOD_REQUEST_FAILURE(CALLBACK_METHOD, JSON_OBJECT);
						return;
					}
					else
					{
						var JSON_COUNT = JSRC_JSON.REF_READ(JSON_OBJECT, "JSON_COUNT");
						var COUNTER = 1;

						while(COUNTER <= JSON_COUNT)
						{
							var R_INDEX = 1; var IS_INSERTED = 0;
							while(JOB_ORDER_TASK_DGV.ROW.COUNT() >= R_INDEX)
							{
								if
								(
									JSVC_NUM.VAR_NVAL(JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_DECIMAL_B", R_INDEX-1)) ==
									JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_DECIMAL_B", COUNTER))
								)
								{
									IS_INSERTED = 1;
									JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_QUANTITY", R_INDEX-1, JSVC_NUM.VAR_NVAL(JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_QUANTITY", R_INDEX-1)) + JSVC_NUM.VAR_NVAL(JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_QTY_TARGET", COUNTER)));
									break;
								}
								R_INDEX++;
							}

							if(IS_INSERTED == 0)
							{
								var RINDEX = JOB_ORDER_TASK_DGV.ROW.COUNT();
								JOB_ORDER_TASK_DGV.ROW.INSERT_AT(RINDEX);
								JOB_ORDER_TASK_DGV.CELL.VALUE("ROW_COUNT", RINDEX, RINDEX + 1);
								JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_DECIMAL_B", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_DECIMAL_B", COUNTER));
								JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_DESCRIPTION", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_DESCRIPTION", COUNTER));
								JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_QUANTITY", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_QTY_TARGET", COUNTER));
								JOB_ORDER_TASK_DGV.CELL.VALUE("REC_JORDER_TASK_VARCHAR_A", RINDEX, JSRC_JSON.REF_READ(JSON_OBJECT, "REC_JORDER_TASK_VARCHAR_A", COUNTER));
							}
							
							COUNTER++;
						}

						CALLBACK_METHOD(true);
					}
				}
			};

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


