PageSourceSearch

https://van311.ca/dformresources/verint_developments/manageorganisation.js

js van311.ca collected 2026-10-01 23:43:36 UTC 22,654 bytes, 526 lines download raw bytes

1var organisationTemplateIdentifier = 'organisation_template_';
2var override_Gotonextpage_Create_Organisation=false;
3var override_Gotonextpage_Update_Organisation=false;
4var citizen_continue_button_no_citizen_change_go_to_case_summary=false
5
6function do_KDF_Ready_Organisation(event, kdf) {
7
8	if (KDF.kdf().authenticated && (KDF.kdf().params.organisationid|| KDF.getVal('txt_organisation_id') || (KDF.kdf().params.customerodmtype && KDF.kdf().params.customerodmtype == 'C2'))) {
9		KDF.showSection('area_organisation_info');
10		KDF.showWidget('but_org_detail_continue');
11		if(KDF.getVal('rad_viewmode') != 'R'){
12			KDF.showWidget('but_org_info_update_address');
13		}
14		let searchRequiredID = KDF.kdf().params.organisationid;
15		if (typeof searchRequiredID === "undefined" || searchRequiredID == "") {
16			searchRequiredID = KDF.getVal('txt_organisation_id');
17		}
18		if (typeof searchRequiredID === "undefined" || searchRequiredID == "") {
19			searchRequiredID = KDF.kdf().params.customerodmid;
20		}
21		KDF.setVal('txt_is_search_required', searchRequiredID);
22
23	} else {
24		KDF.hideSection('area_organisation_info');	
25		KDF.hideWidget('but_org_info_update_address');
26	}
27	$('#dform_widget_os_organisation_search_resultholder').on('show', function () {
28		console.log('About to show but_organisation_not_found widget on SHOW');
29		/* dm trying to sort results */
30		 sortSelectResults('dform_widget_os_organisation_search_resultholder');
31		$('#dform_widget_txta_org_info_address').prop('readonly', true);
32		KDF.showWidget('but_organisation_not_found');
33		clearCustomerLogicInfo();
34	});
35	
36	
37	$('#dform_widget_os_organisation_search_resultholder').on('hide', function () {
38		console.log('About to hide but_organisation_not_found widget on HIDE');
39		$('#dform_widget_txta_org_info_address').prop('readonly', false);
40		clearOrganisationInformation();
41		KDF.hideWidget('but_organisation_not_found');
42		KDF.hideWidget('but_org_info_update_address');
43		KDF.hideSection('area_organisation_info');
44	});
45	var form_name ='';
46	if(kdf){
47		if(kdf.name){
48			var form_name = kdf.name;
49		}
50	}	
51
52	$('#dform_' + form_name).off('click', '.copy_o_addressvalue').on('click', '.copy_o_addressvalue', function () {
53		
54		KDF.setVal('txt_u_o_name', KDF.getVal('txt_logic_o_name'));
55		KDF.setVal('eml_u_o_email', KDF.getVal('txt_logic_o_email'));
56		KDF.setVal('tel_u_o_phone', KDF.getVal('txt_logic_o_phone'));
57        KDF.setVal('num_p_streetnumber', KDF.getVal('txt_logic_o_streetnumber'));
58        KDF.setVal('txt_p_streetname', KDF.getVal('txt_logic_o_streetname'));
59		 KDF.setVal('txt_p_unit', KDF.getVal('txt_logic_o_unit'));
60        KDF.setVal('txt_p_town', KDF.getVal('txt_logic_o_town'));
61        KDF.setVal('txt_p_postcode', KDF.getVal('txt_logic_o_postcode'));
62		KDF.showWidget('but_continue_org_address');
63		KDF.hideWidget('but_continue_customer_address');
64		KDF.hideSection('area_u_customer_info');
65		KDF.showSection('area_u_org_info');
66    });
67
68	$('#dform_' + form_name).off('click', '#dform_widget_button_but_back_create_organisation').on('click', '#dform_widget_button_but_back_create_organisation', function () {
69        KDF.hidePage('create_organisation');
70    });
71
72
73	// Button "Continue" on Your Details page click event.
74	$('#dform_widget_button_but_org_detail_continue').off('click').on('click', function () {
75		console.log('but_org_detail_continue clicked - start');
76		console.log('KDF.getVal(txt_access)=' + KDF.getVal('txt_access'));
77		console.log('orgDetailsCheck= ' + orgDetailsCheck());
78		//KDF.setVal('eml_subscriber', KDF.getVal('eml_cust_info_email'));  
79		
80		if (KDF.kdf().access === 'agent' && false) {
81			//    if (KDF.getVal('txt_access') === 'agent' && orgDetailsCheck()) {
82			console.log('but_org_detail_continue and start agent with orgDetailsCheck');
83			if (KDF.check('.dform_section_area_organisation_info') === 0) {
84
85				//DM place holder for running the custom action to update the reporter
86					var the_interaction=KDF.getParams().interactionid;
87					if(typeof the_interaction !='undefined' && the_interaction>0){
88						//isolate the changes to first and surname only 
89						
90							if (KDF.getVal('txt_org_info_name') !== KDF.getVal('txt_logic_o_name') ){
91						
92						
93							var forename=KDF.getVal('txt_cust_info_first_name');//)response['profile-Forename1'];	
94							console.log('change organisation2 and forename=',forename);
95							console.log('new_organisation surname= '+surname);
96							var id=KDF.getVal('txt_organisationID');
97							var current_type=KDF.getVal('txt_organisation_object_type');
98							var new_type='1';
99								if(typeof current_type !='undefined' ){
100									if(current_type=='C2'){	new_type='2';}
101								}// end if(typeof new_type =='undefined' || new_type =='')
102							console.log('new_type= '+new_type);
103								if(typeof id != 'undefined' || id !=''){
104									KDF.customdata('v_update_reporter_by_interaction_id','organisation_update',true,false,{
105										"clientid":id,
106										"clienttype":new_type,
107										"clientname":surname+', '+forename,
108										"interactionid":the_interaction
109										});
110								}//end if(typeof id != 'undefined' || id !='')
111						}// end if (KDF.getVal('txt_cust_info_first_name') !== KDF.getVal('txt_logic_o_name')  }
112						
113					}//end if(typeof the_interaction !='undefined' && the_interaction>0
114
115				//END DM place holder for running the custom action to update the reporter
116			}  
117			else if (KDF.getVal('txt_access') === 'citizen') {	
118				var address = KDF.getVal('txt_org_info_street_number') + ', ' + KDF.getVal('txt_org_info_street_name') +' '+ KDF.getVal('txt_cust_info_unit') + ', ' + KDF.getVal('txt_cust_info_town') + ', ' + KDF.getVal('txt_cust_info_postcode');
119				KDF.setVal('txta_org_info_address', address);
120				if(override_Gotonextpage_Create_Organisation==false){
121					console.log('about to go to next page: 146');
122							if(citizen_continue_button_no_citizen_change_go_to_case_summary==true){
123						KDF.showPage('page_summary');
124						KDF.gotoPage('page_summary',true,true,true);
125						} else {
126						KDF.gotoNextPage();
127					}
128					
129				}
130				//dm testx KDF.gotoNextPage();
131			}   else {
132				if(override_Gotonextpage_Create_Organisation==false){
133					console.log('About to go to next page: point 2');  
134				// KDF.gotoNextPage();
135				}
136			}
137		}
138		else {
139			if(override_Gotonextpage_Create_Organisation==false){
140					console.log('override_Gotonextpage_Create_Organisation inner2= '+override_Gotonextpage_Create_Organisation)
141					console.log('About to go to next page: point 3');  
142					if(citizen_continue_button_no_citizen_change_go_to_case_summary==true){
143						KDF.showPage('page_summary');
144						KDF.gotoPage('page_summary',true,true,true);
145						} else {
146						KDF.gotoNextPage();
147					}
148				}
149		}//end if (KDF.getVal('txt_access') === 'agent' && orgDetailsCheck()) {
150		
151			
152		console.log('but_organisation_detail_continue done');	
153	});//end  $('#dform_widget_button_but_organisation_detail_continue').off('click')
154
155	// Button "Next" on address page click event.
156	$('#dform_widget_button_but_continue_org_address').click(function () {
157		if (KDF.kdf().access === 'agent' && orgAddresssCheck() || orgDetailsCheck()) {
158			if (KDF.check('.dform_section_area_details_address') === 0) {
159				KDF.customdata('update-organisation', organisationTemplateIdentifier + 'create', true, false, {
160					'organisationID': KDF.getVal('txt_organisation_id'),
161					'txt_org_name': KDF.getVal('txt_u_o_name'),
162					'phone': KDF.getVal('tel_u_o_phone'),
163					'email': KDF.getVal('eml_u_o_email'),
164					'num_p_streetnumber': KDF.getVal('num_p_streetnumber'),
165					'txt_p_streetname': KDF.getVal('txt_p_streetname'),
166					'txt_p_unit':KDF.getVal('txt_p_unit'),
167					'txt_p_town': KDF.getVal('txt_p_town'),
168					'txt_p_postcode': KDF.getVal('txt_p_postcode'),
169					'txt_p_uprn': KDF.getVal('txt_p_uprn')
170				});	
171				console.log('override_Gotonextpage_Create_Organisation= '+override_Gotonextpage_Create_Organisation);
172				if(override_Gotonextpage_Create_Organisation==false){
173					console.log('override_Gotonextpage_Create_Organisation inner= '+override_Gotonextpage_Create_Organisation);
174					console.log('About to go to next page: point 4');  
175					KDF.gotoNextPage();
176				}
177			}
178		}
179		else {
180			if(override_Gotonextpage_Create_Organisation==false){
181					console.log('override_Gotonextpage_Create_Organisation inner2= '+override_Gotonextpage_Create_Organisation);
182					console.log('About to go to next page: point 5');  
183				KDF.gotoNextPage();
184			}
185		}
186	});
187	$('#dform_widget_button_but_organisation_not_found').click(function () {
188		//clear fields
189		KDF.gotoPage('create_organisation',false,true,true);
190		KDF.hidePage('provide_details');
191		//resetSearchWidget('os_organisation_search');
192		
193		/*
194	   KDF.setVal('txt_cust_info_first_name',''); 
195	   KDF.setVal('txt_cust_info_last_name','');  
196		KDF.setVal('eml_cust_info_email',''); 
197	   KDF.setVal('tel_cust_info_phone','');  
198		KDF.setVal('txta_cust_info_address',''); 
199		*/
200		console.log('About to go to next page: point 6');  
201	  // KDF.gotoNextPage();
202   });
203
204   $('#dform_widget_button_but_org_info_update_address').click(function () {
205	KDF.gotoPage('provide_details_address',false,false,false);
206	});
207
208   $('#dform_widget_button_but_continue_organisation').click(function () {
209	console.log('dform_widget_button_but_continue_organisation clicked');
210
211		if (KDF.check('.dform_section_area_create_org_info') === 0) {
212			KDF.customdata('create-organisation', organisationTemplateIdentifier + 'create', true, false, {
213				'txt_org_name': KDF.getVal('txt_org_name'),
214				'tel_org_phone': KDF.getVal('tel_org_phone'),
215				'eml_org_email': KDF.getVal('eml_org_email'),
216				'txt_org_street_number': KDF.getVal('txt_org_street_number'),
217				'txt_org_street_name': KDF.getVal('txt_org_street_name'),
218				'txt_org_unit': KDF.getVal('txt_org_unit'),
219				'txt_org_city': KDF.getVal('txt_org_city'),
220				'txt_org_postcode': KDF.getVal('txt_org_postcode'),
221				'txt_org_uprn': KDF.getVal('txt_org_uprn')
222			});	
223		}
224	
225	});
226	$('#dform_widget_ps_create_organisation_resultholder').on('show', function () {
227		sortSelectResults('dform_widget_ps_create_organisation_resultholder');
228        console.log('dform_widget_ps_create_organisation_resultholder on show event');
229        //KDF.showWidget('txt_c_addressnumber');
230        //KDF.showWidget('txt_c_addressline1');
231	//	 KDF.showWidget('txt_c_unit');
232        //KDF.showWidget('txt_c_town');
233        //KDF.showWidget('txt_c_postcode');
234        //KDF.showWidget('but_continue_individual_address');
235        //KDF.showWidget('but_property_not_found');
236	//$('#cancel_edit_manually_createindividual').click();
237    });
238
239    $('#dform_widget_ps_create_organisation_resultholder').on('hide', function () {
240        console.log('dform_widget_ps_create_organisation_resultholder on hide event');
241       // KDF.hideWidget('txt_c_addressnumber');
242       // KDF.hideWidget('txt_c_addressline1');
243	//	 KDF.hideWidget('txt_c_unit');
244       // KDF.hideWidget('txt_c_town');
245       // KDF.hideWidget('txt_c_postcode');
246        //KDF.hideWidget('but_continue_individual_address');
247       // KDF.hideWidget('ahtm_edit_manual_createindividual');
248       // KDF.hideWidget('but_property_not_found');
249       // KDF.hideWidget('ahtm_cancel_edit_manual_createindividual');
250	//$('#dform_widget_button_but_property_not_found').click();
251    });
252	$('#dform_widget_tel_org_phone').keyup(function (){
253
254		if (/\D/g.test(this.value))
255		{
256			// Filter non-digits from input value.
257			this.value = this.value.replace(/\D/g, '');
258		}
259	});
260	$('#dform_widget_tel_u_o_phone').keyup(function (){
261		if (/\D/g.test(this.value))
262		{
263			// Filter non-digits from input value.
264			this.value = this.value.replace(/\D/g, '');
265		}
266		
267	});
268
269	$('#dform_widget_os_organisation_search_searchbutton').prop('disabled', true);
270	$('#dform_widget_os_txt_name,#dform_widget_os_txt_emailaddress,#dform_widget_os_txt_phonenumber').each(function(){
271		$(this).on('keyup', function() {
272			if(KDF.getVal('os_txt_name') == '' &&KDF.getVal('os_txt_emailaddress')== ''&&KDF.getVal('os_txt_phonenumber')== ''){
273				$('#dform_widget_os_organisation_search_searchbutton').prop('disabled', true);
274			}else{
275				$('#dform_widget_os_organisation_search_searchbutton').prop('disabled', false);
276			}
277		});
278    });
279}//end do_KDF_Ready_Organisation
280
281
282function do_KDF_objectdataLoaded_Organisation(event, kdf, response, type, id) {
283    console.log('do_KDF_objectdataLoaded_Organisation type: ' + type);
284    console.log('do_KDF_objectdataLoaded_Organisation id: ' + id);
285    console.log('do_KDF_objectdataLoaded_Organisation response: ', response);
286    if (type === 'organisation') {
287        console.log('I am a organisation ');
288        KDF.setVal('txt_organisation_id', id);
289		 KDF.setVal('txt_organisationID', id);
290		 KDF.setVal('txt_is_search_required', id);
291        KDF.showWidget('but_org_info_update_address');
292        KDF.showSection('area_organisation_info');
293		hideIndividualsSearch();
294		clearCustomerLogicInfo();
295		clearCustomerInformation();
296		KDF.showWidget('but_org_detail_continue');/*Fikri - changes*/
297		KDF.showWidget('but_org_info_update_address');/*Fikri - changes*/
298		 KDF.setVal('txt_organisation_object_type', 'C2'); //dm added
299		 // PAN18 - 20210925 - set customer object type
300		 KDF.setVal('txt_customer_object_type', 'C2');
301			
302var old_organisation='';
303
304			if(KDF.kdf().access=='citizen'){
305				
306			 old_organisation=KDF.kdf().profileData.organisationID;//was KDF.getParams().organisationID;
307				
308			}
309			if(KDF.kdf().access=='agent'){
310				
311			 old_organisation=KDF.getParams().organisationID;
312			KDF.hideWidget('but_property_notfound_citizen');
313				
314			}
315			
316			
317			var the_interaction=KDF.getParams().interactionid;
318			if(typeof the_interaction !='undefined' && the_interaction>0){
319				
320				
321			
322			if(old_organisation!=id){
323				
324			console.log('change organisation1');
325				//console.log('change organisation1a and data=',response.data);
326			var name=response['orgprofile-Name'];	
327			var surname=response["profile-Surname"];
328			var new_type;
329			
330			
331			if(type=='organisation'){new_type='1';}
332				console.log('change organisation3');
333			
334			console.log('new_organisation surname= '+surname);
335			if(new_type=='1'){
336			KDF.customdata('v_update_reporter_by_interaction_id','organisation_update',true,false,{
337				"clientid":id,
338				"clienttype":new_type,
339				"clientname":surname+', '+forename,
340				"interactionid":the_interaction
341				});
342			}
343			}//end organisation compare
344		}//end if(typeof the_interaction !='undefined && the_interaction>0)
345			
346		
347    }
348}//end do_KDF_objectdataLoaded_Organisation
349
350function do_KDF_Custom_Organisation(event, kdf, response, action) {
351    //if (typeof response.actionedby == 'undefined' || response.actionedby == '') { response.actionedby = 'na'; }
352    //console.log('actionedby= ' + response.actionedby);
353	console.log('do_KDF_Custom_Organisation 1');
354	var isOrganisationTemplate = false;
355	
356	if (response.actionedby.indexOf(organisationTemplateIdentifier) === 0) {isOrganisationTemplate = true;}
357	console.log('is Organisation template ? ', isOrganisationTemplate);
358	console.log('do_KDF_Custom_Organisation 2');
359	if (isOrganisationTemplate) {		
360	console.log('do_KDF_Custom_Organisation 3');
361		var actionedBySource = response.actionedby.replace(organisationTemplateIdentifier, '');
362		console.log('Actioned by source :', actionedBySource);
363		
364		if (action === 'organisation-retrieve' && actionedBySource === 'KDF_Ready') {
365			console.log('do_KDF_Custom_Organisation 4');
366			console.log('organisation-retrieve show update address button');
367			KDF.showWidget('but_org_info_update_address');
368		
369			
370			KDF.showWidget('but_organisation_detail_continue'); /*Fikri - changes*/
371			//KDF.showWidget('but_cust_info_update_address');
372			KDF.showSection('area_organisation_info');
373			$('#dform_widget_txta_cust_info_address').prop('readonly', true);
374
375		}
376		else if (action === 'organisation-retrieve' && actionedBySource == 'update-organisation') {
377			console.log('do_KDF_Custom_Organisation 4');
378			
379			// get the current page.
380			//if it is summary, then go to it again
381			var currentPage = $('#dform_pagenav_page_summary');
382			console.log(' post person retrieve currentPage= ',currentPage);
383			
384			
385		
386			if(override_Gotonextpage_Update_Organisation==false){
387				console.log('do_KDF_Custom_Organisation 4a');
388				console.log('About to go to next page: point 7');  
389				if($('#dform_pagenav_page_summary :selected')){
390				console.log('do_KDF_Custom_Organisation 8b');
391						console.log('at post person retrieve currentPage= ',currentPage);
392				KDF.showPage('page_summary');
393				KDF.gotoPage('page_summary',true,true,true);
394				}
395				
396			  //dm test KDF.gotoNextPage();
397				} 
398
399		}
400		else if (action === 'organisation-retrieve' && actionedBySource == 'create-organisation') {
401			console.log('do_KDF_Custom_Organisation 5');
402			KDF.setOrganisationID(KDF.getVal('txt_organisation_id'), true, false); /*set Reporter*/
403			
404			if(override_Gotonextpage_Create_Organisation==false){
405				console.log('do_KDF_Custom_Organisation 5a');
406				console.log('About to go to next page: point 8');  
407				if($('#dform_pagenav_page_summary :selected')){
408				console.log('do_KDF_Custom_Organisation 8b');
409						console.log('at post person retrieve currentPage= ',currentPage);
410				KDF.showPage('page_summary');
411				KDF.gotoPage('page_summary',true,true,true);
412				}
413			//KDF.gotoNextPage();
414			}
415
416		}
417		else if (action === 'organisation-retrieve' && actionedBySource == 'public-user') {
418			KDF.setVal('txt_customer_object_type', 'C2');
419			if(override_Gotonextpage_Create_Organisation==false){
420
421				if($('#dform_pagenav_page_summary :selected')){
422				KDF.showPage('page_summary');
423				KDF.gotoPage('page_summary',true,true,true);
424				}
425			//KDF.gotoNextPage();
426			}
427
428		}
429		else if (action === 'update-organisation') {
430		console.log('do_KDF_Custom_Organisation 6');
431			KDF.showSuccess('Organisation Details Updated');
432			KDF.customdata('organisation-retrieve', organisationTemplateIdentifier + 'update-organisation', true, false, { 'org_search_results': KDF.getVal('txt_organisation_id') });
433			KDF.showInfo('Organisation Details Updated');
434			//dm update reporter functionality start
435				//dm temp	  v_update_reporter();
436			//dm update reporter functionality end
437		}
438		else if (action == 'create-organisation') {
439			console.log('do_KDF_Custom_Organisation 7');
440			if (response.data.txt_organisationID !== undefined) {
441				console.log('custom action point 5a');
442				KDF.showSuccess('Organisation Details Created');
443				KDF.showInfo('Organisation Details Created');
444				KDF.setVal('txt_organisation_id', response.data.txt_organisationID);
445				//KDF.setOrganisationID(response.data.txt_organisationID, true, false); /*set Reporter*/
446			KDF.customdata('organisation-retrieve', organisationTemplateIdentifier + 'public-user', true, false, { 'org_search_results': KDF.getVal('txt_organisation_id') });
447			}
448		}
449		else if (action == 'cov-user-search') {
450			if (response.data.txt_organisationID !== undefined) {
451				clearCustomerLogicInfo();
452				console.log('custom action point 5a');
453				KDF.showSection('area_organisation_info');
454				KDF.setVal('txt_organisationID', response.data.txt_organisationID);
455				//KDF.setCustomerID(response.data.txt_customerID, true, false); /*set Reporter*/
456				KDF.customdata('organisation-retrieve', organisationTemplateIdentifier + 'create-individual', true, false, { 'person_search_results': KDF.getVal('txt_customer_id') });
457			}	
458		}
459		console.log('do_KDF_Custom_Organisation 8');
460		
461		if(override_Gotonextpage_Update_Organisation==false || override_Gotonextpage_Create_Organisation==false){
462			console.log('do_KDF_Custom_Organisation 8a');
463			if(KDF.getVal('txt_transaction_person_retieve_flag')=='true'){//set in verint_template_2 to prevent going to summary page on ready event
464				KDF.setVal('txt_transaction_person_retieve_flag','false');
465				console.log('do_KDF_Custom_Organisation 8a1');
466			
467				if($('#dform_pagenav_page_summary :selected')){
468					console.log('do_KDF_Custom_Organisation 8b');
469						console.log('at post person retrieve currentPage= ',currentPage);
470					KDF.showPage('page_summary');
471					KDF.gotoPage('page_summary',true,true,true);
472				}
473				}//end if(KDF.getVal(txt_transaction_person_retieve_flag)=='true'){
474		}//end if(override_Gotonextpage_Update_Organisation==false)
475	}
476}
477
478function hideOrganisationsSearch(){
479	KDF.hideSection('area_organisation_info');
480	KDF.hideWidget('but_org_detail_continue');
481	KDF.hideWidget('but_org_info_update_address');
482	KDF.hideWidget('but_organisation_not_found');
483	KDF.hidePage('create_organisation');
484	//clearOrganisationInformation();
485	//clearOrganisationLogicInfo();
486	//resetSearchWidget('os_organisation_search');
487}
488
489// Check if the organisation detail is change
490function orgDetailsCheck() {
491    if (KDF.getVal('txt_u_o_name') !== KDF.getVal('txt_logic_o_name') ||
492        KDF.getVal('eml_u_o_email') !== KDF.getVal('txt_logic_o_email') || KDF.getVal('tel_u_o_phone') !== KDF.getVal('txt_logic_o_phone')) {
493		return true;
494    } else {
495		console.log('orgDetailsCheck failed');
496        return false;
497    }
498}	
499function orgAddresssCheck() {
500    if (KDF.getVal('num_p_streetnumber') !== KDF.getVal('txt_logic_o_streetnumber') || KDF.getVal('txt_p_streetname') !== KDF.getVal('txt_logic_o_streetname') ||
501        KDF.getVal('txt_p_town') !== KDF.getVal('txt_logic_o_town') || KDF.getVal('txt_p_postcode') !== KDF.getVal('txt_logic_o_postcode') || KDF.getVal('txt_logic_o_unit') !== KDF.getVal('txt_p_unit')) {
502        return true;
503    } else {
504		console.log('orgAddresssCheck failed');
505        return false;
506    }
507}	
508
509function clearOrganisationLogicInfo() {
510    KDF.setVal('txt_logic_o_name', '');
511    KDF.setVal('txt_logic_o_email', '');
512    KDF.setVal('txt_logic_o_phone', '');
513    KDF.setVal('txt_logic_o_streetnumber', '');
514	KDF.setVal('txt_logic_o_streetname', '');
515	KDF.setVal('txt_logic_o_unit', '');
516	KDF.setVal('txt_logic_o_town', '');
517	KDF.setVal('txt_logic_o_postcode', '');
518	KDF.setVal('txt_organisation_id','');
519}
520
521function clearOrganisationInformation() {
522    KDF.setVal('txt_org_info_name', '');
523    KDF.setVal('eml_org_info_email', '');
524    KDF.setVal('tel_org_info_phone', '');
525    KDF.setVal('txta_org_info_address', '');
526}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.