Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var gvarJasURL = form_data.gvar_dev_jasper_url;
- var gvarASPURL = form_data.gvar_dev_asp_url;
- //-------------------- ADDRESS VALIDATION
- function addressValidation(){
- var cities = ['Bangued','Boliney','Bucay','Bucloc','Daguioman','Danglas','Dolores','La Paz','Lacub','Lagangilang','Lagayan','Langiden','Licuan-Baay','Luba','Malibcong','Manabo','Peñarrubia','Pidigan','Pilar','Sallapadan','San Isidro','San Juan','San Quintin','Tayum','Tineg','Tubo','Villaviciosa','Butuan City','Buenavista','Cabadbaran','Carmen','Jabonga','Kitcharao','Las Nieves','Magallanes','Nasipit','Remedios T. Romualdez','Santiago','Tubay','Bayugan','Bunawan','Esperanza','La Paz','Loreto','Prosperidad','Rosario','San Francisco','San Luis','Santa Josefa','Sibagat','Talacogon','Trento','Veruela','Altavas','Balete','Banga','Batan','Buruanga','Ibajay','Kalibo','Lezo','Libacao','Madalag','Makato','Malay','Malinao','Nabas','New Washington','Numancia','Tangalan','Legazpi City','Ligao City','Tabaco City','Bacacay','Camalig','Daraga','Guinobatan','Jovellar','Libon','Malilipot','Malinao','Manito','Oas','Pio Duran','Polangui','Rapu-Rapu','Santo Domingo','Tiwi','Anini-y','Barbaza','Belison','Bugasong','Caluya','Culasi','Hamtic','Laua-an','Libertad','Pandan','Patnongon','San Jose','San Remigio','Sebaste','Sibalom','Tibiao','Tobias Fornier','Valderrama','Calanasan','Conner','Flora','Kabugao','Luna','Pudtol','Santa Marcela','Baler','Casiguran','Dilasag','Dinalungan','Dingalan','Dipaculao','Maria Aurora','San Luis','Isabela City','Akbar','Al-Barka','Hadji Mohammad Ajul','Hadji Muhtamad','Lamitan','Lantawan','Maluso','Sumisip','Tabuan-Lasa','Tipo-Tipo','Tuburan','Ungkaya Pukan','Balanga City','Abucay','Bagac','Dinalupihan','Hermosa','Limay','Mariveles','Morong','Orani','Orion','Pilar','Samal','Basco','Itbayat','Ivana','Mahatao','Sabtang','Uyugan','Batangas City','Lipa City','Tanauan City','Agoncillo','Alitagtag','Balayan','Balete','Bauan','Calaca','Calatagan','Cuenca','Ibaan','Laurel','Lemery','Lian','Lobo','Mabini','Malvar','Mataas na Kahoy','Nasugbu','Padre Garcia','Rosario','San Jose','San Juan','San Luis','San Nicolas','San Pascual','Santa Teresita','Santo Tomas','Taal','Talisay','Taysan','Tingloy','Tuy','Baguio City','Atok','Bakun','Bokod','Buguias','Itogon','Kabayan','Kapangan','Kibungan','La Trinidad','Mankayan','Sablan','Tuba','Tublay','Almeria','Biliran','Cabucgayan','Caibiran','Culaba','Kawayan','Maripipi','Naval','Tagbilaran City','Alburquerque','Alicia','Anda','Antequera','Baclayon','Balilihan','Batuan','Bien Unido','Bilar','Buenavista','Calape','Candijay','Carmen','Catigbian','Clarin','Corella','Cortes','Dagohoy','Danao','Dauis','Dimiao','Duero','Garcia Hernandez','Getafe','Guindulman','Inabanga','Jagna','Lila','Loay','Loboc','Loon','Mabini','Maribojoc','Panglao','Pilar','President Carlos P. Garcia','Sagbayan','San Isidro','San Miguel','Sevilla','Sierra Bullones','Sikatuna','Talibon','Trinidad','Tubigon','Ubay','Valencia','Malaybalay City','Valencia City','Baungon','Cabanglasan','Damulog','Dangcagan','Don Carlos','Impasug-ong','Kadingilan','Kalilangan','Kibawe','Kitaotao','Lantapan','Libona','Malitbog','Manolo Fortich','Maramag','Pangantucan','Quezon','San Fernando','Sumilao','Talakag','Malolos City','Meycauayan City','San Jose del Monte City','Angat','Balagtas','Baliuag','Bocaue','Bulacan','Bustos','Calumpit','Doña Remedios Trinidad','Guiguinto','Hagonoy','Marilao','Norzagaray','Obando','Pandi','Paombong','Plaridel','Pulilan','San Ildefonso','San Miguel','San Rafael','Santa Maria','Tuguegarao City','Abulug','Alcala','Allacapan','Amulung','Aparri','Baggao','Ballesteros','Buguey','Calayan','Camalaniugan','Claveria','Enrile','Gattaran','Gonzaga','Iguig','Lal-lo','Lasam','Pamplona','Peñablanca','Piat','Rizal','Sanchez-Mira','Santa Ana','Santa Praxedes','Santa Teresita','Santo Niño','Solana','Tuao','Basud','Capalonga','Daet','Jose Panganiban','Labo','Mercedes','Paracale','San Lorenzo Ruiz','San Vicente','Santa Elena','Talisay','Vinzons','Iriga City','Naga City','Baao','Balatan','Bato','Bombon','Buhi','Bula','Cabusao','Calabanga','Camaligan','Canaman','Caramoan','Del Gallego','Gainza','Garchitorena','Goa','Lagonoy','Libmanan','Lupi','Magarao','Milaor','Minalabac','Nabua','Ocampo','Pamplona','Pasacao','Pili','Presentacion','Ragay','Sagñay','San Fernando','San Jose','Sipocot','Siruma','Tigaon','Tinambac','Catarman','Guinsiliban','Mahinog','Mambajao','Sagay','Roxas City','Cuartero','Dao','Dumalag','Dumarao','Ivisan','Jamindan','Ma-ayon','Mambusao','Panay','Panitan','Pilar','Pontevedra','President Roxas','Sapi-an','Sigma','Tapaz','Bagamanoc','Baras','Bato','Caramoran','Gigmoto','Pandan','Panganiban','San Andres','San Miguel','Viga','Virac','Cavite City','Dasmariñas City','Tagaytay City','Trece Martires City','Alfonso','Amadeo','Bacoor','Carmona','General Mariano Alvarez','General Emilio Aguinaldo','General Trias','Imus','Indang','Kawit','Magallanes','Maragondon','Mendez','Naic','Noveleta','Rosario','Silang','Tanza','Ternate','Bogo City','Cebu City','Carcar City','Danao City','Lapu-Lapu City','Mandaue City','Naga City','Talisay City','Toledo City','Alcantara','Alcoy','Alegria','Aloguinsan','Argao','Asturias','Badian','Balamban','Bantayan','Barili','Boljoon','Borbon','Carmen','Catmon','Compostela','Consolacion','Cordoba','Daanbantayan','Dalaguete','Dumanjug','Ginatilan','Liloan','Madridejos','Malabuyoc','Medellin','Minglanilla','Moalboal','Oslob','Pilar','Pinamungahan','Poro','Ronda','Samboan','San Fernando','San Francisco','San Remigio','Santa Fe','Santander','Sibonga','Sogod','Tabogon','Tabuelan','Tuburan','Tudela','Compostela','Laak','Mabini','Maco','Maragusan','Mawab','Monkayo','Montevista','Nabunturan','New Bataan','Pantukan','Kidapawan City','Alamada','Aleosan','Antipas','Arakan','Banisilan','Carmen','Kabacan','Libungan','Mlang','Magpet','Makilala','Matalam','Midsayap','Pigkawayan','Pikit','President Roxas','Tulunan','Panabo City','Island Garden City of Samal','Tagum City','Asuncion','Braulio E. Dujali','Carmen','Kapalong','New Corella','San Isidro','Santo Tomas','Talaingod','Davao City','Digos City','Bansalan','Don Marcelino','Hagonoy','Jose Abad Santos','Kiblawan','Magsaysay','Malalag','Malita','Matanao','Padada','Santa Cruz','Santa Maria','Sarangani','Sulop','Mati City','Baganga','Banaybanay','Boston','Caraga','Cateel','Governor Generoso','Lupon','Manay','San Isidro','Tarragona','Arteche','Balangiga','Balangkayan','Borongan','Can-avid','Dolores','General MacArthur','Giporlos','Guiuan','Hernani','Jipapad','Lawaan','Llorente','Maslog','Maydolong','Mercedes','Oras','Quinapondan','Salcedo','San Julian','San Policarpo','Sulat','Taft','Buenavista','Jordan','Nueva Valencia','San Lorenzo','Sibunag','Aguinaldo','Alfonso Lista','Asipulo','Banaue','Hingyon','Hungduan','Kiangan','Lagawe','Lamut','Mayoyao','Tinoc','Batac City','Laoag City','Adams','Bacarra','Badoc','Bangui','Banna','Burgos','Carasi','Currimao','Dingras','Dumalneg','Marcos','Nueva Era','Pagudpud','Paoay','Pasuquin','Piddig','Pinili','San Nicolas','Sarrat','Solsona','Vintar','Candon City','Vigan City','Alilem','Banayoyo','Bantay','Burgos','Cabugao','Caoayan','Cervantes','Galimuyod','Gregorio Del Pilar','Lidlidda','Magsingal','Nagbukel','Narvacan','Quirino','Salcedo','San Emilio','San Esteban','San Ildefonso','San Juan','San Vicente','Santa','Santa Catalina','Santa Cruz','Santa Lucia','Santa Maria','Santiago','Santo Domingo','Sigay','Sinait','Sugpon','Suyo','Tagudin','Iloilo City','Passi City','Ajuy','Alimodian','Anilao','Badiangan','Balasan','Banate','Barotac Nuevo','Barotac Viejo','Batad','Bingawan','Cabatuan','Calinog','Carles','Concepcion','Dingle','Dueñas','Dumangas','Estancia','Guimbal','Igbaras','Janiuay','Lambunao','Leganes','Lemery','Leon','Maasin','Miagao','Mina','New Lucena','Oton','Pavia','Pototan','San Dionisio','San Enrique','San Joaquin','San Miguel','San Rafael','Santa Barbara','Sara','Tigbauan','Tubungan','Zarraga','Cauayan City','Santiago City','Alicia','Angadanan','Aurora','Benito Soliven','Burgos','Cabagan','Cabatuan','Cordon','Delfin Albano','Dinapigue','Divilacan','Echague','Gamu','Ilagan','Jones','Luna','Maconacon','Mallig','Naguilian','Palanan','Quezon','Quirino','Ramon','Reina Mercedes','Roxas','San Agustin','San Guillermo','San Isidro','San Manuel','San Mariano','San Mateo','San Pablo','Santa Maria','Santo Tomas','Tumauini','Tabuk','Balbalan','Lubuagan','Pasil','Pinukpuk','Rizal','Tanudan','Tinglayan','San Fernando City','Agoo','Aringay','Bacnotan','Bagulin','Balaoan','Bangar','Bauang','Burgos','Caba','Luna','Naguilian','Pugo','Rosario','San Gabriel','San Juan','Santo Tomas','Santol','Sudipen','Tubao','Biñan City','Calamba City','San Pablo City','Santa Rosa City','Alaminos','Bay','Cabuyao','Calauan','Cavinti','Famy','Kalayaan','Liliw','Los Baños','Luisiana','Lumban','Mabitac','Magdalena','Majayjay','Nagcarlan','Paete','Pagsanjan','Pakil','Pangil','Pila','Rizal','San Pedro','Santa Cruz','Santa Maria','Siniloan','Victoria','Iligan City','Bacolod','Baloi','Baroy','Kapatagan','Kauswagan','Kolambugan','Lala','Linamon','Magsaysay','Maigo','Matungao','Munai','Nunungan','Pantao Ragat','Pantar','Poona Piagapo','Salvador','Sapad','Sultan Naga Dimaporo','Tagoloan','Tangcal','Tubod','Marawi City','Bacolod-Kalawi','Balabagan','Balindong','Bayang','Binidayan','Buadiposo-Buntong','Bubong','Bumbaran','Butig','Calanogas','Ditsaan-Ramain','Ganassi','Kapai','Kapatagan','Lumba-Bayabao','Lumbaca-Unayan','Lumbatan','Lumbayanague','Madalum','Madamba','Maguing','Malabang','Marantao','Marogong','Masiu','Mulondo','Pagayawan','Piagapo','Poona Bayabao','Pualas','Saguiaran','Sultan Dumalondong','Picong','Tagoloan II','Tamparan','Taraka','Tubaran','Tugaya','Wao','Ormoc City','Tacloban City','Abuyog','Alangalang','Albuera','Babatngon','Barugo','Bato','Baybay','Burauen','Calubian','Capoocan','Carigara','Dagami','Dulag','Hilongos','Hindang','Inopacan','Isabel','Jaro','Javier','Julita','Kananga','La Paz','Leyte','Liloan','MacArthur','Mahaplag','Matag-ob','Matalom','Mayorga','Merida','Palo','Palompon','Pastrana','San Isidro','San Miguel','Santa Fe','Sogod','Tabango','Tabontabon','Tanauan','Tolosa','Tunga','Villaba','Cotabato City','Ampatuan','Barira','Buldon','Buluan','Datu Abdullah Sangki','Datu Anggal Midtimbang','Datu Blah T. Sinsuat','Datu Hoffer Ampatuan','Datu Montawal','Datu Odin Sinsuat','Datu Paglas','Datu Piang','Datu Salibo','Datu Saudi-Ampatuan','Datu Unsay','General Salipada K. Pendatun','Guindulungan','Kabuntalan','Mamasapano','Mangudadatu','Matanog','Northern Kabuntalan','Pagalungan','Paglat','Pandag','Parang','Rajah Buayan','Shariff Aguak','Shariff Saydona Mustapha','South Upi','Sultan Kudarat','Sultan Mastura','Sultan sa Barongis','Talayan','Talitay','Upi','Boac','Buenavista','Gasan','Mogpog','Santa Cruz','Torrijos','Masbate City','Aroroy','Baleno','Balud','Batuan','Cataingan','Cawayan','Claveria','Dimasalang','Esperanza','Mandaon','Milagros','Mobo','Monreal','Palanas','Pio V. Corpuz','Placer','San Fernando','San Jacinto','San Pascual','Uson','Caloocan','Las Piñas','Makati','Malabon','Mandaluyong','Manila','Marikina','Muntinlupa','Navotas','Parañaque','Pasay','Pasig','Quezon City','San Juan City','Taguig','Valenzuela City','Pateros','Oroquieta City','Ozamiz City','Tangub City','Aloran','Baliangao','Bonifacio','Calamba','Clarin','Concepcion','Don Victoriano Chiongbian','Jimenez','Lopez Jaena','Panaon','Plaridel','Sapang Dalaga','Sinacaban','Tudela','Cagayan de Oro','Gingoog City','Alubijid','Balingasag','Balingoan','Binuangan','Claveria','El Salvador','Gitagum','Initao','Jasaan','Kinoguitan','Lagonglong','Laguindingan','Libertad','Lugait','Magsaysay','Manticao','Medina','Naawan','Opol','Salay','Sugbongcogon','Tagoloan','Talisayan','Villanueva','Barlig','Bauko','Besao','Bontoc','Natonin','Paracelis','Sabangan','Sadanga','Sagada','Tadian','Bacolod City','Bago City','Cadiz City','Escalante City','Himamaylan City','Kabankalan City','La Carlota City','Sagay City','San Carlos City','Silay City','Sipalay City','Talisay City','Victorias City','Binalbagan','Calatrava','Candoni','Cauayan','Enrique B. Magalona','Hinigaran','Hinoba-an','Ilog','Isabela','La Castellana','Manapla','Moises Padilla','Murcia','Pontevedra','Pulupandan','Salvador Benedicto','San Enrique','Toboso','Valladolid','Bais City','Bayawan City','Canlaon City','Guihulngan City','Dumaguete City','Tanjay City','Amlan','Ayungon','Bacong','Basay','Bindoy','Dauin','Jimalalud','La Libertad','Mabinay','Manjuyod','Pamplona','San Jose','Santa Catalina','Siaton','Sibulan','Tayasan','Valencia','Vallehermoso','Zamboanguita','Allen','Biri','Bobon','Capul','Catarman','Catubig','Gamay','Laoang','Lapinig','Las Navas','Lavezares','Lope de Vega','Mapanas','Mondragon','Palapag','Pambujan','Rosario','San Antonio','San Isidro','San Jose','San Roque','San Vicente','Silvino Lobos','Victoria','Cabanatuan City','Gapan City','Science City of Muñoz','Palayan City','San Jose City','Aliaga','Bongabon','Cabiao','Carranglan','Cuyapo','Gabaldon','General Mamerto Natividad','General Tinio','Guimba','Jaen','Laur','Licab','Llanera','Lupao','Nampicuan','Pantabangan','Peñaranda','Quezon','Rizal','San Antonio','San Isidro','San Leonardo','Santa Rosa','Santo Domingo','Talavera','Talugtug','Zaragoza','Alfonso Castaneda','Ambaguio','Aritao','Bagabag','Bambang','Bayombong','Diadi','Dupax del Norte','Dupax del Sur','Kasibu','Kayapa','Quezon','Santa Fe','Solano','Villaverde','Abra de Ilog','Calintaan','Looc','Lubang','Magsaysay','Mamburao','Paluan','Rizal','Sablayan','San Jose','Santa Cruz','Calapan City','Baco','Bansud','Bongabong','Bulalacao','Gloria','Mansalay','Naujan','Pinamalayan','Pola','Puerto Galera','Roxas','San Teodoro','Socorro','Victoria','Puerto Princesa City','Aborlan','Agutaya','Araceli','Balabac','Bataraza','Brookes Point','Busuanga','Cagayancillo','Coron','Culion','Cuyo','Dumaran','El Nido','Kalayaan','Linapacan','Magsaysay','Narra','Quezon','Rizal','Roxas','San Vicente','Sofronio Española','Taytay','Angeles City','City of San Fernando','Apalit','Arayat','Bacolor','Candaba','Floridablanca','Guagua','Lubao','Mabalacat','Macabebe','Magalang','Masantol','Mexico','Minalin','Porac','San Luis','San Simon','Santa Ana','Santa Rita','Santo Tomas','Sasmuan','Alaminos City','Dagupan City','San Carlos City','Urdaneta City','Agno','Aguilar','Alcala','Anda','Asingan','Balungao','Bani','Basista','Bautista','Bayambang','Binalonan','Binmaley','Bolinao','Bugallon','Burgos','Calasiao','Dasol','Infanta','Labrador','Laoac','Lingayen','Mabini','Malasiqui','Manaoag','Mangaldan','Mangatarem','Mapandan','Natividad','Pozzorubio','Rosales','San Fabian','San Jacinto','San Manuel','San Nicolas','San Quintin','Santa Barbara','Santa Maria','Santo Tomas','Sison','Sual','Tayug','Umingan','Urbiztondo','Villasis','Lucena City','Tayabas City','Agdangan','Alabat','Atimonan','Buenavista','Burdeos','Calauag','Candelaria','Catanauan','Dolores','General Luna','General Nakar','Guinayangan','Gumaca','Infanta','Jomalig','Lopez','Lucban','Macalelon','Mauban','Mulanay','Padre Burgos','Pagbilao','Panukulan','Patnanungan','Perez','Pitogo','Plaridel','Polillo','Quezon','Real','Sampaloc','San Andres','San Antonio','San Francisco','San Narciso','Sariaya','Tagkawayan','Tiaong','Unisan','Aglipay','Cabarroguis','Diffun','Maddela','Nagtipunan','Saguday','Antipolo City','Angono','Baras','Binangonan','Cainta','Cardona','Jalajala','Morong','Pililla','Rodriguez','San Mateo','Tanay','Taytay','Teresa','Alcantara','Banton','Cajidiocan','Calatrava','Concepcion','Corcuera','Ferrol','Looc','Magdiwang','Odiongan','Romblon','San Agustin','San Andres','San Fernando','San Jose','Santa Fe','Santa Maria','Calbayog City','Catbalogan City','Almagro','Basey','Calbiga','Daram','Gandara','Hinabangan','Jiabong','Marabut','Matuguinao','Motiong','Pagsanghan','Paranas','Pinabacdao','San Jorge','San Jose De Buan','San Sebastian','Santa Margarita','Santa Rita','Santo Niño','Tagapul-an','Talalora','Tarangnan','Villareal','Zumarraga','Alabel','Glan','Kiamba','Maasim','Maitum','Malapatan','Malungon','Enrique Villanueva','Larena','Lazi','Maria','San Juan','Siquijor','Sorsogon City','Barcelona','Bulan','Bulusan','Casiguran','Castilla','Donsol','Gubat','Irosin','Juban','Magallanes','Matnog','Pilar','Prieto Diaz','Santa Magdalena','General Santos City','Koronadal City','Banga','Lake Sebu','Norala','Polomolok','Santo Niño','Surallah','Tboli','Tampakan','Tantangan','Tupi','Maasin City','Anahawan','Bontoc','Hinunangan','Hinundayan','Libagon','Liloan','Limasawa','Macrohon','Malitbog','Padre Burgos','Pintuyan','Saint Bernard','San Francisco','San Juan','San Ricardo','Silago','Sogod','Tomas Oppus','Tacurong City','Bagumbayan','Columbio','Esperanza','Isulan','Kalamansig','Lambayong','Lebak','Lutayan','Palimbang','President Quirino','Senator Ninoy Aquino','Banguingui','Hadji Panglima Tahil','Indanan','Jolo','Kalingalan Caluang','Lugus','Luuk','Maimbung','Old Panamao','Omar','Pandami','Panglima Estino','Pangutaran','Parang','Pata','Patikul','Siasi','Talipao','Tapul','Surigao City','Alegria','Bacuag','Basilisa','Burgos','Cagdianao','Claver','Dapa','Del Carmen','Dinagat','General Luna','Gigaquit','Libjo','Loreto','Mainit','Malimono','Pilar','Placer','San Benito','San Francisco','San Isidro','San Jose','Santa Monica','Sison','Socorro','Tagana-an','Tubajon','Tubod','Bislig City','Tandag City','Barobo','Bayabas','Cagwait','Cantilan','Carmen','Carrascal','Cortes','Hinatuan','Lanuza','Lianga','Lingig','Madrid','Marihatag','San Agustin','San Miguel','Tagbina','Tago','Tarlac City','Anao','Bamban','Camiling','Capas','Concepcion','Gerona','La Paz','Mayantoc','Moncada','Paniqui','Pura','Ramos','San Clemente','San Jose','San Manuel','Santa Ignacia','Victoria','Bongao','Languyan','Mapun','Panglima Sugala','Sapa-Sapa','Sibutu','Simunul','Sitangkai','South Ubian','Tandubas','Turtle Islands','Olongapo City','Botolan','Cabangan','Candelaria','Castillejos','Iba','Masinloc','Palauig','San Antonio','San Felipe','San Marcelino','San Narciso','Santa Cruz','Subic','Dapitan City','Dipolog City','Bacungan','Baliguian','Godod','Gutalac','Jose Dalman','Kalawit','Katipunan','La Libertad','Labason','Liloy','Manukan','Mutia','Piñan','Polanco','President Manuel A. Roxas','Rizal','Salug','Sergio Osmeña Sr.','Siayan','Sibuco','Sibutad','Sindangan','Siocon','Sirawai','Tampilisan','Pagadian City','Zamboanga City','Aurora','Bayog','Dimataling','Dinas','Dumalinao','Dumingag','Guipos','Josefina','Kumalarang','Labangan','Lakewood','Lapuyan','Mahayag','Margosatubig','Midsalip','Molave','Pitogo','Ramon Magsaysay','San Miguel','San Pablo','Sominot','Tabina','Tambulig','Tigbao','Tukuran','Vincenzo A. Sagun','Alicia','Buug','Diplahan','Imelda','Ipil','Kabasalan','Mabuhay','Malangas','Naga','Olutanga','Payao','Roseller Lim','Siay','Talusan','Titay','Tungawan'];
- var citiesProvinceID = ['1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','2','2','2','2','2','2','2','2','2','2','2','2','3','3','3','3','3','3','3','3','3','3','3','3','3','3','4','4','4','4','4','4','4','4','4','4','4','4','4','4','4','4','4','5','5','5','5','5','5','5','5','5','5','5','5','5','5','5','5','5','5','6','6','6','6','6','6','6','6','6','6','6','6','6','6','6','6','6','6','7','7','7','7','7','7','7','8','8','8','8','8','8','8','8','9','9','9','9','9','9','9','9','9','9','9','9','9','10','10','10','10','10','10','10','10','10','10','10','10','11','11','11','11','11','11','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','12','13','13','13','13','13','13','13','13','13','13','13','13','13','13','14','14','14','14','14','14','14','14','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','15','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','16','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','17','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','18','19','19','19','19','19','19','19','19','19','19','19','19','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','20','21','21','21','21','21','22','22','22','22','22','22','22','22','22','22','22','22','22','22','22','22','22','23','23','23','23','23','23','23','23','23','23','23','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','24','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','25','26','26','26','26','26','26','26','26','26','26','26','27','27','27','27','27','27','27','27','27','27','27','27','27','27','27','27','27','27','28','28','28','28','28','28','28','28','28','28','28','29','29','29','29','29','29','29','29','29','29','29','29','29','29','29','29','30','30','30','30','30','30','30','30','30','30','30','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','31','32','32','32','32','32','33','33','33','33','33','33','33','33','33','33','33','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','34','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','35','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','36','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','37','38','38','38','38','38','38','38','38','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','39','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','40','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','41','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','42','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','43','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','44','45','45','45','45','45','45','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','46','47','47','47','47','47','47','47','47','47','47','47','47','47','47','47','47','47','48','48','48','48','48','48','48','48','48','48','48','48','48','48','48','48','48','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','49','50','50','50','50','50','50','50','50','50','50','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','51','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','52','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','53','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','54','55','55','55','55','55','55','55','55','55','55','55','55','55','55','55','56','56','56','56','56','56','56','56','56','56','56','57','57','57','57','57','57','57','57','57','57','57','57','57','57','57','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','58','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','59','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','60','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','61','62','62','62','62','62','62','63','63','63','63','63','63','63','63','63','63','63','63','63','63','64','64','64','64','64','64','64','64','64','64','64','64','64','64','64','64','64','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','65','66','66','66','66','66','66','66','67','67','67','67','67','67','68','68','68','68','68','68','68','68','68','68','68','68','68','68','68','69','69','69','69','69','69','69','69','69','69','69','69','70','70','70','70','70','70','70','70','70','70','70','70','70','70','70','70','70','70','70','71','71','71','71','71','71','71','71','71','71','71','71','72','72','72','72','72','72','72','72','72','72','72','72','72','72','72','72','72','72','72','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','73','74','74','74','74','74','74','74','74','74','74','74','74','74','74','74','74','74','74','74','75','75','75','75','75','75','75','75','75','75','75','75','75','75','75','75','75','75','76','76','76','76','76','76','76','76','76','76','76','77','77','77','77','77','77','77','77','77','77','77','77','77','77','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','78','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','79','80','80','80','80','80','80','80','80','80','80','80','80','80','80','80','80'];
- var provinceID = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80'];
- var provinces = ['Abra','Agusan del Norte','Agusan del Sur','Aklan','Albay','Antique','Apayao','Aurora','Basilan','Bataan','Batanes','Batangas','Benguet','Biliran','Bohol','Bukidnon','Bulacan','Cagayan','Camarines Norte','Camarines Sur','Camiguin','Capiz','Catanduanes','Cavite','Cebu','Compostela Valley','Cotabato','Davao del Norte','Davao del Sur','Davao Oriental','Eastern Samar','Guimaras','Ifugao','Ilocos Norte','Ilocos Sur','Iloilo','Isabela','Kalinga','La Union','Laguna','Lanao del Norte','Lanao del Sur','Leyte','Maguindanao','Marinduque','Masbate','Metro Manila','Misamis Occidental','Misamis Oriental','Mountain Province','Negros Occidental','Negros Oriental','Northern Samar','Nueva Ecija','Nueva Vizcaya','Occidental Mindoro','Oriental Mindoro','Palawan','Pampanga','Pangasinan','Quezon','Quirino','Rizal','Romblon','Samar','Sarangani','Siquijor','Sorsogon','South Cotabato','Southern Leyte','Sultan Kudarat','Sulu','Surigao del Norte','Surigao del Sur','Tarlac','Tawi-Tawi','Zambales','Zamboanga del Norte','Zamboanga del Sur','Zamboanga Sibugay'];
- var provincesRegionID = ['2','16','16','9','8','9','2','5','17','5','4','6','2','11','10','13','5','4','8','8','13','9','8','6','10','14','15','14','14','14','11','9','2','3','3','9','4','2','3','6','13','17','11','17','7','8','1','13','13','2','9','11','11','5','4','7','7','7','5','3','6','4','6','7','11','15','10','8','15','11','15','17','16','16','5','17','5','12','12','12'];
- var regionsID = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17'];
- var regions = ['National Capital Region','Cordillera Administrative Region','Region 1','Region 2','Region 3','Region 4-A','Region 4-B','Region 5','Region 6','Region 7','Region 8','Region 9','Region 10','Region 11','Region 12','Region 13','Autonomous Region in Muslim Mindanao'];
- var tempProvinces = [];
- var tempRegion = "";
- $j(".app_city-inputEx-fieldWrapper input[type='text']").eq($j(".app_city-inputEx-fieldWrapper").length - 1).autocomplete({
- minLength: 2,
- source: cities,
- select: function a(event, ui){
- tempProvinces.length = 0;
- $j(".app_province-inputEx-fieldWrapper input[type='text']").eq($j(".app_province-inputEx-fieldWrapper").length - 1).val("");
- $j(".app_region-inputEx-fieldWrapper input[type='text']").eq($j(".app_region-inputEx-fieldWrapper").length - 1).val("");
- $j(".app_country-inputEx-fieldWrapper input[type='text']").eq($j(".app_country-inputEx-fieldWrapper").length - 1).val("");
- getProvinces(ui.item.value);
- }
- }).focus(function() {
- $j(this).autocomplete("search", "");
- });
- function getProvinces(selCity){
- var city = selCity;
- var tempCityProvinceIDs = [];
- for (var i = 0; i < cities.length; i++){
- if (city == cities[i]){
- tempCityProvinceIDs.push(citiesProvinceID[i]);
- }
- }
- for (var j = 0; j < tempCityProvinceIDs.length; j++){
- for (var k = 0; k < provinceID.length; k++){
- if (tempCityProvinceIDs[j] == provinceID[k]){
- tempProvinces.push(provinces[k]);
- }
- }
- }
- if (tempProvinces.length > 1){
- $j(".app_province-inputEx-fieldWrapper input[type='text']").eq($j(".app_province-inputEx-fieldWrapper").length - 1).autocomplete({
- minLength: 0,
- source: tempProvinces,
- select: function b(event, ui){
- getRegion(ui.item.value);
- }
- }).focus(function() {
- $j(this).autocomplete("search", "");
- });
- }
- else{
- $j(".app_province-inputEx-fieldWrapper input[type='text']").val(tempProvinces[0]);
- getRegion(tempProvinces[0]);
- }
- }
- function getRegion(selProvince){
- var province = selProvince;
- var tempRegionID = "";
- for (var i = 0; i < provinces.length; i++){
- if (province == provinces[i]){
- tempRegionID = provincesRegionID[i];
- }
- }
- for (var j = 0; j < regionsID.length; j++){
- if (tempRegionID == regionsID[j]){
- $j(".app_region-inputEx-fieldWrapper input[type='text']").eq($j(".app_region-inputEx-fieldWrapper").length - 1).val(regions[j]);
- $j(".app_country-inputEx-fieldWrapper input[type='text']").eq($j(".app_country-inputEx-fieldWrapper").length - 1).val("Philippines");
- }
- }
- }
- }
- //--------- COMP TRIGGER
- function compTrigger()
- {
- if($j(".comp_trigger-inputEx-fieldWrapper input[type='radio']:checked").val() === "Less") {
- $j("#valrep_landimp_comparison_4").hide();
- //$j("#valrep_landimp_comparison_5").hide();
- $j("#valrep_landimp_comparison_5 span").hide();
- $j("#valrep_landimp_comp5_date_month").hide();
- $j("#valrep_landimp_comp5_date_day").hide();
- $j("#valrep_landimp_comp5_date_year").hide();
- $j("#valrep_landimp_comp5_source").hide();
- $j("#valrep_landimp_comp5_contact_no").hide();
- $j("#valrep_landimp_comp5_location").hide();
- $j("#valrep_landimp_comp5_area").hide();
- $j("#valrep_landimp_comp5_base_price").hide();
- $j("#valrep_landimp_comp5_price_sqm").hide();
- $j("#valrep_landimp_comp5_discount_rate").hide();
- $j("#valrep_landimp_comp5_discounts").hide();
- $j("#valrep_landimp_comp5_selling_price").hide();
- $j("#valrep_landimp_comparison_5 .-inputEx-fieldWrapper").hide();
- $j("#valrep_landimp_comp5_rec_location").hide();
- $j("#valrep_landimp_comp5_rec_size").hide();
- $j("#valrep_landimp_comp5_rec_shape").hide();
- $j("#valrep_landimp_comp5_rec_corner_influence").hide();
- $j("#valrep_landimp_comp5_rec_tru_lot").hide();
- $j("#valrep_landimp_comp5_rec_elevation").hide();
- $j("#valrep_landimp_comp5_rec_time_element").hide();
- $j("#valrep_landimp_comp5_rec_degree_of_devt").hide();
- $j("#valrep_landimp_comp5_concluded_adjustment").hide();
- $j("#valrep_landimp_comp5_adjusted_value").hide();
- $j("#valrep_landimp_comp5_remarks").hide();
- }
- else {
- $j("#valrep_landimp_comparison_4").show();
- //$j("#valrep_landimp_comparison_5").show();
- $j("#valrep_landimp_comparison_5 span").show();
- $j("#valrep_landimp_comp5_date_month").show();
- $j("#valrep_landimp_comp5_date_day").show();
- $j("#valrep_landimp_comp5_date_year").show();
- $j("#valrep_landimp_comp5_source").show();
- $j("#valrep_landimp_comp5_contact_no").show();
- $j("#valrep_landimp_comp5_location").show();
- $j("#valrep_landimp_comp5_area").show();
- $j("#valrep_landimp_comp5_base_price").show();
- $j("#valrep_landimp_comp5_price_sqm").show();
- $j("#valrep_landimp_comp5_discount_rate").show();
- $j("#valrep_landimp_comp5_discounts").show();
- $j("#valrep_landimp_comp5_selling_price").show();
- $j("#valrep_landimp_comparison_5 .-inputEx-fieldWrapper").show();
- $j("#valrep_landimp_comp5_rec_location").show();
- $j("#valrep_landimp_comp5_rec_size").show();
- $j("#valrep_landimp_comp5_rec_shape").show();
- $j("#valrep_landimp_comp5_rec_corner_influence").show();
- $j("#valrep_landimp_comp5_rec_tru_lot").show();
- $j("#valrep_landimp_comp5_rec_elevation").show();
- $j("#valrep_landimp_comp5_rec_time_element").show();
- $j("#valrep_landimp_comp5_rec_degree_of_devt").show();
- $j("#valrep_landimp_comp5_concluded_adjustment").show();
- $j("#valrep_landimp_comp5_adjusted_value").show();
- $j("#valrep_landimp_comp5_remarks").show();
- }
- }
- $j(".comp_trigger-inputEx-fieldWrapper input[type='radio']").on("click", function() {
- compTrigger();
- });
- var appraisal_request = ".app_request_appraisal-inputEx-fieldWrapper";
- var arrLengthrequest = $j(".app_request_appraisal-inputEx-fieldWrapper").length-1;
- var address_area = $j(".app_tct_no-inputEx-fieldWrapper").parent().parent();
- var contactPerson = ".app_contact_person-inputEx-fieldWrapper";
- var contactNo = ".app_contact-inputEx-fieldWrapper";
- var month = ".app_daterequested_month-inputEx-fieldWrapper";
- var day = ".app_daterequested_day-inputEx-fieldWrapper";
- var year = ".app_daterequested_year-inputEx-fieldWrapper";
- var d = new Date();
- /*
- var curr_month = d.getMonth();
- var curr_day = d.getDate();
- var curr_year = d.getFullYear();
- */
- var months = new Array(12);
- var pref_date1_month = ".app_pref_inspection_date2_month-inputEx-fieldWrapper";
- months[0] = "01";
- months[1] = "02";
- months[2] = "03";
- months[3] = "04";
- months[4] = "05";
- months[5] = "06";
- months[6] = "07";
- months[7] = "08";
- months[8] = "09";
- months[9] = "10";
- months[10] = "11";
- months[11] = "12";
- var quantity = ".app_me_quantity-inputEx-fieldWrapper";
- var type = ".app_me_type-inputEx-fieldWrapper";
- var manufacturer = ".app_me_manufacturer-inputEx-fieldWrapper";
- var model = ".app_me_model-inputEx-fieldWrapper";
- var serial_no = ".app_me_serial_no-inputEx-fieldWrapper";
- var age = ".app_me_age-inputEx-fieldWrapper";
- var condition = ".app_me_condition-inputEx-fieldWrapper";
- var address_area = $j(".app_tct_no-inputEx-fieldWrapper").parent().parent();
- var car_appraisal_purpose = ".appraisal_purpose_style-inputEx-fieldWrapper";
- var car_loan = ".loan_style-inputEx-fieldWrapper";
- var car_loan_purpose = ".app_car_loan_purpose-inputEx-fieldWrapper";
- var vehicle_type = ".app_vehicle_type-inputEx-fieldWrapper";
- var car_series = ".app_car_series-inputEx-fieldWrapper";
- var car_model = ".app_car_model-inputEx-fieldWrapper";
- var car_color = ".app_car_color-inputEx-fieldWrapper";
- var car_milage = ".app_car_mileage-inputEx-fieldWrapper";
- var car_plate_no = ".app_car_plate_no-inputEx-fieldWrapper";
- var car_body_type = ".app_car_body_type-inputEx-fieldWrapper";
- var car_displacement = ".app_car_displacement-inputEx-fieldWrapper";
- var car_motor_no = ".app_car_motor_no-inputEx-fieldWrapper";
- var car_chassis_no = ".app_car_chassis_no-inputEx-fieldWrapper";
- var cr_no = ".app_car_cr_no-inputEx-fieldWrapper";
- var cr_date_month = ".app_car_cr_date_month-inputEx-fieldWrapper";
- var cr_date_day = ".app_car_cr_date_day-inputEx-fieldWrapper";
- var cr_date_year = ".app_car_cr_date_year-inputEx-fieldWrapper";
- var car_header = ".appraisal_header-inputEx-fieldWrapper";
- var lot_direction = ".lot_plotting_direction-inputEx-fieldWrapper";
- window.onload = function(){
- //ON LOAD INDENTATION
- compTrigger();
- addressValidation();
- //ONLY SHOW NECESSARY FIELDS
- $j(".app_request_appraisal-inputEx-fieldWrapper").each(function(index, el) {
- if($j(appraisal_request + " select:eq(" + index + ")").val() === "motor_vehicle") {
- address_area.eq(index).hide();
- $j(car_appraisal_purpose + ":eq("+ index + ")").show();
- $j(car_loan + ":eq("+ index + ")").show();
- $j(car_loan_purpose + ":eq("+ index + ")").show();
- $j(car_series + ":eq("+ index + ")").show();
- $j(car_model + ":eq("+ index + ")").show();
- $j(car_color + ":eq("+ index + ")").show();
- $j(car_milage + ":eq("+ index + ")").show();
- $j(car_plate_no + ":eq("+ index + ")").show();
- $j(car_body_type + ":eq("+ index + ")").show();
- $j(car_displacement + ":eq("+ index + ")").show();
- $j(car_motor_no + ":eq("+ index + ")").show();
- $j(car_chassis_no + ":eq("+ index + ")").show();
- $j(cr_no + ":eq("+ index + ")").show();
- $j(cr_date_month + ":eq("+ index + ")").show();
- $j(cr_date_day + ":eq("+ index + ")").show();
- $j(cr_date_year + ":eq("+ index + ")").show();
- $j(vehicle_type + ":eq("+ index + ")").show();
- $j(car_header + ":eq("+ index + ")").show();
- $j(quantity + ":eq("+ index + ")").hide();
- $j(type + ":eq("+ index + ")").hide();
- $j(manufacturer + ":eq("+ index + ")").hide();
- $j(model + ":eq("+ index + ")").hide();
- $j(serial_no + ":eq("+ index + ")").hide();
- $j(age + ":eq("+ index + ")").hide();
- $j(condition + ":eq("+ index + ")").hide();
- }
- else if($j(appraisal_request + " select:eq(" + index + ")").val() === "townhouse_condo") {
- $j(".app_tct_no-inputEx-fieldWrapper label:eq("+ index + ")").text("CCT No.");
- address_area.eq(index).show();
- $j(quantity + ":eq("+ index + ")").hide();
- $j(type + ":eq("+ index + ")").hide();
- $j(manufacturer + ":eq("+ index + ")").hide();
- $j(model + ":eq("+ index + ")").hide();
- $j(serial_no + ":eq("+ index + ")").hide();
- $j(age + ":eq("+ index + ")").hide();
- $j(condition + ":eq("+ index + ")").hide();
- $j(car_appraisal_purpose + ":eq("+ index + ")").hide();
- $j(car_loan + ":eq("+ index + ")").hide();
- $j(car_loan_purpose + ":eq("+ index + ")").hide();
- $j(car_series + ":eq("+ index + ")").hide();
- $j(car_model + ":eq("+ index + ")").hide();
- $j(car_color + ":eq("+ index + ")").hide();
- $j(car_milage + ":eq("+ index + ")").hide();
- $j(car_plate_no + ":eq("+ index + ")").hide();
- $j(car_body_type + ":eq("+ index + ")").hide();
- $j(car_displacement + ":eq("+ index + ")").hide();
- $j(car_motor_no + ":eq("+ index + ")").hide();
- $j(car_chassis_no + ":eq("+ index + ")").hide();
- $j(cr_no + ":eq("+ index + ")").hide();
- $j(cr_date_month + ":eq("+ index + ")").hide();
- $j(cr_date_day + ":eq("+ index + ")").hide();
- $j(cr_date_year + ":eq("+ index + ")").hide();
- $j(vehicle_type + ":eq("+ index + ")").hide();
- $j(car_header + ":eq("+ index + ")").hide();
- }
- else if($j(appraisal_request + " select:eq(" + index + ")").val() === "machinery_equipment") {
- address_area.eq(index).hide();
- $j(quantity + ":eq("+ index + ")").show();
- $j(type + ":eq("+ index + ")").show();
- $j(manufacturer + ":eq("+ index + ")").show();
- $j(model + ":eq("+ index + ")").show();
- $j(serial_no + ":eq("+ index + ")").show();
- $j(age + ":eq("+ index + ")").show();
- $j(condition + ":eq("+ index + ")").show();
- $j(car_appraisal_purpose + ":eq("+ index + ")").hide();
- $j(car_loan + ":eq("+ index + ")").hide();
- $j(car_loan_purpose + ":eq("+ index + ")").hide();
- $j(car_series + ":eq("+ index + ")").hide();
- $j(car_model + ":eq("+ index + ")").hide();
- $j(car_color + ":eq("+ index + ")").hide();
- $j(car_milage + ":eq("+ index + ")").hide();
- $j(car_plate_no + ":eq("+ index + ")").hide();
- $j(car_body_type + ":eq("+ index + ")").hide();
- $j(car_displacement + ":eq("+ index + ")").hide();
- $j(car_motor_no + ":eq("+ index + ")").hide();
- $j(car_chassis_no + ":eq("+ index + ")").hide();
- $j(cr_no + ":eq("+ index + ")").hide();
- $j(cr_date_month + ":eq("+ index + ")").hide();
- $j(cr_date_day + ":eq("+ index + ")").hide();
- $j(cr_date_year + ":eq("+ index + ")").hide();
- $j(vehicle_type + ":eq("+ index + ")").hide();
- $j(car_header + ":eq("+ index + ")").hide();
- }
- else {
- address_area.eq(index).show();
- $j(car_appraisal_purpose + ":eq("+ index + ")").hide();
- $j(car_loan + ":eq("+ index + ")").hide();
- $j(car_loan_purpose + ":eq("+ index + ")").hide();
- $j(car_series + ":eq("+ index + ")").hide();
- $j(car_model + ":eq("+ index + ")").hide();
- $j(car_color + ":eq("+ index + ")").hide();
- $j(car_milage + ":eq("+ index + ")").hide();
- $j(car_plate_no + ":eq("+ index + ")").hide();
- $j(car_body_type + ":eq("+ index + ")").hide();
- $j(car_displacement + ":eq("+ index + ")").hide();
- $j(car_motor_no + ":eq("+ index + ")").hide();
- $j(car_chassis_no + ":eq("+ index + ")").hide();
- $j(cr_no + ":eq("+ index + ")").hide();
- $j(cr_date_month + ":eq("+ index + ")").hide();
- $j(cr_date_day + ":eq("+ index + ")").hide();
- $j(cr_date_year + ":eq("+ index + ")").hide();
- $j(vehicle_type + ":eq("+ index + ")").hide();
- $j(car_header + ":eq("+ index + ")").hide();
- $j(quantity + ":eq("+ index + ")").hide();
- $j(type + ":eq("+ index + ")").hide();
- $j(manufacturer + ":eq("+ index + ")").hide();
- $j(model + ":eq("+ index + ")").hide();
- $j(serial_no + ":eq("+ index + ")").hide();
- $j(age + ":eq("+ index + ")").hide();
- $j(condition + ":eq("+ index + ")").hide();
- $j(".app_tct_no-inputEx-fieldWrapper label:eq("+ index + ")").text("TCT No.");
- $j(".app_block_no-inputEx-fieldWrapper:eq("+ index + ")").hide();
- $j(".app_lot_no-inputEx-fieldWrapper:eq("+ index + ")").hide();
- }
- });
- };
- //----------- VIEW PDF
- //Fix original attachments list margin
- $j("#app_attachment-List").css({"margin-left": "35px", "width": "300px"});
- //Apply link to PDF viewing
- $j(".viewpdf_btn-inputEx-fieldWrapper input[type='button']").each(function(index,el){
- $j(this).click(function(){
- var fn = $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- window.open(gvarASPURL+"/AppraisalWebApp/ViewPDF.aspx?fn="+fn);
- //window.open("http://122.3.65.204:3000/AppraisalWebApp/ViewPDF.aspx?fn="+fn);
- });
- });
- //FIRST APRPAISAL TYPE
- var appTypeIndex = form_data.Counter - 1;
- $j(".app_attachment-inputEx-fieldWrapper").find($j(".inputEx-ListField-subFieldEl")).each(function(index, el){
- var eachAppType = $j(this).find($j(".app_attachment_appraisal_type-inputEx-fieldWrapper input[type='text']")).val();
- var mainAppType = $j(".app_request_appraisal-inputEx-fieldWrapper select").eq(0).val() + "_" + appTypeIndex;
- if (mainAppType != eachAppType){
- $j(".app_attachment-inputEx-fieldWrapper").find($j(".inputEx-ListField-subFieldEl")).eq(index).hide();
- }
- else{
- $j(".app_attachment-inputEx-fieldWrapper").find($j(".inputEx-ListField-subFieldEl")).eq(index).show();
- }
- });
- //----------- DOWNLOAD PDF
- $j(".downloadpdf_btn-inputEx-fieldWrapper input[type='button']").each(function(index, el){
- $j(this).click(function(){
- var fn = $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- window.open(gvarASPURL+"/AppraisalWebApp/DownloadAttachment.ashx?fn="+fn);
- //window.open("http://122.3.65.204:3000/AppraisalWebApp/DownloadAttachment.ashx?fn="+fn);
- });
- });
- //--------------NO PDF
- $j(".nopdf_btn-inputEx-fieldWrapper input[type='button']").each(function(index, el){
- var fn = $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- if (fn === "NO FILE"){
- $j(".downloadpdf_btn-inputEx-fieldWrapper").eq(index).hide();
- $j(".viewpdf_btn-inputEx-fieldWrapper").eq(index).hide();
- $j(this).click(function(){
- alert("No file has been uploaded for this requirement.");
- });
- }
- else{
- $j(".nopdf_btn-inputEx-fieldWrapper").eq(index).hide();
- }
- });
- //-------------View Print Friendly Report
- $j(".print_form-inputEx-fieldWrapper input[type='button']").click(function() {
- var at = $j(".app_request_appraisal-inputEx-fieldWrapper select:eq(0)").val();
- window.open(gvarASPURL+"/AppraisalWebApp/ViewBlank.aspx?at="+at);
- //window.open(gvarASPURL+"/AppraisalWebApp/BlankForm.aspx?fn="+gvarJasURL+"/jasperserver/rest_v2/reports/reports/GDS_Link_Asia/Appraisal/Blank/Appraisal-VacantLotwithImprovements.pdf?record_id="+form_data.system.record_id);
- });
- //-------------Valuation Report
- var url1 = gvarJasURL+"/jasperserver/rest_v2/reports/reports/Security_Bank/Land_with_Improvements.pdf?record_id="+form_data.system.record_id;
- //var url1 = "http://reports.gdslinkasia.com:8080/jasperserver/rest_v2/reports/reports/GDS_Link_Asia/Appraisal/Appraisal-VacantLotwithImprovements.pdf?record_id="+form_data.system.record_id;
- var url2;
- var url3;
- var url4;
- $j(".app_attachment_file-inputEx-fieldWrapper input[type='text']").each(function(index, el){
- if ($j(".app_attachment_file-inputEx-fieldWrapper input[type='text']").eq(index).val() === "Vicinity"){
- url2 = gvarASPURL+"/AppraisalWebApp/ViewPDF.aspx?fn=" + $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- }
- if ($j(".app_attachment_file-inputEx-fieldWrapper input[type='text']").eq(index).val() === "Plans"){
- url3 = gvarASPURL+"/AppraisalWebApp/ViewPDF.aspx?fn=" + $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- }
- if ($j(".app_attachment_file-inputEx-fieldWrapper input[type='text']").eq(index).val() === "Property Pictures"){
- url4 = gvarASPURL+"/AppraisalWebApp/ViewPDF.aspx?fn=" + $j(".app_attachment_filename-inputEx-fieldWrapper input[type='text']").eq(index).val();
- }
- });
- $j(".btn_valuation_report-inputEx-fieldWrapper input[type='button']").click(function() {
- window.open(gvarASPURL+"/AppraisalWebApp/ValuationReport.aspx?url1="+url1+"&url2="+url2+"&url3="+url3+"&url4="+url4);
- //window.open("http://122.3.65.204:3000/AppraisalWebApp/ValuationReport.aspx?url1="+url1+"&url2="+url2);
- });
- //--------------Upload Supplementary Docs
- $j("#appraisal_request-List-0-more_docs_btn-button").click(function() {
- var ln = $j("#app_account_last_name-field").val();
- var fn = form_data.app_account_first_name;
- var mn = form_data.app_account_middle_name;
- var mm = form_data.app_daterequested_month;
- var dd = form_data.app_daterequested_day;
- var yy = form_data.app_daterequested_year;
- var uid = ln + "_" + fn + "_" + mm + dd + yy;
- var index = parseInt(form_data.Counter, 10) - 1;
- var at = $j(".app_request_appraisal-inputEx-fieldWrapper select:eq(0)").val();
- window.open(gvarASPURL+"/AppraisalWebApp/RequestUpload2.aspx?uid="+uid+"&at="+at+"&id="+index);
- });
- //----------- APPRAISAL REQUEST VIEW
- $j("#appraisal_request-List-0-app_request_appraisal-label").html($j("#appraisal_request-List-0-app_request_appraisal-field option:selected").text());
- $j("#appraisal_request-List-0-app_request_appraisal-label").attr("style", "text-decoration: underline");
- $j(".app_request_appraisal").hide();
- $j("#appraisal_request-List-0-app_request_appraisal").attr("style", "margin-left: 300px; font-size: 16;");
- $j("#appraisal_request-List-0-app_request_appraisal-label-wrapper").attr("style", "width: 300px;");
- $j(".valrep_land_propdesc_area-inputEx-fieldWrapper input[type='text']").blur(function() {
- $j(".valrep_landimp_value_total_area-inputEx-fieldWrapper input[type='text']").val($j(".valrep_landimp_propdesc_area-inputEx-fieldWrapper input[type='text']").val());
- });
- //------------------Land Plot Validation
- $j(".inputEx-ListField-addButton").click(function() {
- direction_length = $j(".lot_plotting_direction-inputEx-fieldWrapper").length-1;
- $j(lot_direction).each(function(idx, el) {
- if(idx === direction_length) {
- $j(bearing + " select:eq("+idx+")").val("E");
- $j(lot_direction + " select:eq("+idx+")").change(function() {
- for(var i in arrValue) {
- if(arrValue.indexOf($j(lot_direction + " select:eq("+idx+")").val()) > -1) {
- $j(bearing + " select:eq("+idx+")").val("");
- $j(bearing + " select:eq("+idx+")").attr('disabled', 'disabled');
- $j(degrees + " input[type='text']:eq("+idx+")").attr('disabled', 'disabled');
- }
- else {
- $j(bearing + " select:eq("+idx+")").val("E");
- $j(bearing + " select:eq("+idx+")").removeAttr('disabled');
- $j(degrees + " input[type='text']:eq("+idx+")").removeAttr('disabled');
- }
- }
- });
- $j(bearing + " select:eq("+idx+")").change(function() {
- if($j(lot_direction + " select:eq("+idx+")").val() === "N" && $j(bearing + " select:eq("+idx+")").val() === "") {
- $j(degrees + " input[type='text']:eq("+idx+")").attr('disabled', 'disabled');
- $j(bearing + " select:eq("+idx+")").removeAttr('disabled');
- }
- else if($j(lot_direction + " select:eq("+idx+")").val() === "S" && $j(bearing + " select:eq("+idx+")").val() === "") {
- $j(degrees + " input[type='text']:eq("+idx+")").attr('disabled', 'disabled');
- $j(bearing + " select:eq("+idx+")").removeAttr('disabled');
- }
- else {
- $j(bearing + " select:eq("+idx+")").removeAttr('disabled');
- $j(degrees + " input[type='text']:eq("+idx+")").removeAttr('disabled');
- }
- });
- }
- });
- });
- $j("#view_btn-button").click(function(){
- var svr = window.location.origin;
- var plotCount = $j(".lot_plotting_direction").length;
- var toPass = "";
- for (var i = 0; i < plotCount; i++)
- {
- var direction = $j(".lot_plotting_direction select").eq(i).val();
- var degrees = $j(".lot_plotting_degrees input[type='text']").eq(i).val();
- var bearing = $j(".lot_plotting_bearing select").eq(i).val();
- var distance = $j(".lot_plotting_distance input[type='text']").eq(i).val();
- if (i < (plotCount-1))
- {
- toPass += '{"lot_plotting_direction":"'+direction+'","lot_plotting_degrees":"'+degrees+'","lot_plotting_bearing":"'+bearing+'","lot_plotting_distance":"'+distance+'"},';
- }
- else
- {
- toPass += '{"lot_plotting_direction":"'+direction+'","lot_plotting_degrees":"'+degrees+'","lot_plotting_bearing":"'+bearing+'","lot_plotting_distance":"'+distance+'"}';
- }
- }
- function onAjaxLoad(el){
- $j(el).css({background:'url("/system/ckeditor_assets/pictures/gds_link_asia/4e4f3595-b8f6-46f7-af42-21e1c3e8c391/content_loader.gif?1372060142") no-repeat right #FFFFFF'});
- }
- function onAjaxComplete(el){
- $j(el).attr('style','background-color: white');
- }
- PLOTTING = {
- getArray: function(callback){
- $j.ajax({
- type: "POST",
- url: svr+'/gds_link_asia/appraisal/new/update_plotting.json?authenticated',
- //data: 'data={"record":'+JSON.stringify(getFormValues())+'}',
- data: 'data={"record":{"temp_record_id":"'+form_data.system.record_id+'","lot_plotting":['+toPass+']}}',
- success: function(data){
- callback.call(this,data);
- },
- contentType: "application/x-www-form-urlencoded",
- dataType: 'json',
- beforeSend: function(){onAjaxLoad("#load_status-field"); $j("#load_status-field").val("Please wait while the plotting image is being loaded.");},
- complete: function(){onAjaxComplete("#load_status-field"); $j("#load_status-field").val(""); openPlot();}
- });
- }
- };
- PLOTTING.getArray(function(data) {
- });
- });
- function openPlot()
- {
- var f = form_data.app_account_first_name;
- var m = form_data.app_account_middle_name;
- var l = form_data.app_account_last_name;
- window.open(gvarASP+"/AppraisalWebApp/Plotting.aspx?uid="+form_data.system.record_id+"&fn="+f+"&mn="+m+"&ln="+l);
- }
- /* Price Computation */
- var area1 = ".valrep_landimp_comp1_area-inputEx-fieldWrapper";
- var ask_price1 = ".valrep_landimp_comp1_base_price-inputEx-fieldWrapper";
- var price1 = ".valrep_landimp_comp1_price_sqm-inputEx-fieldWrapper";
- var discount_rate1 = ".valrep_landimp_comp1_discount_rate-inputEx-fieldWrapper";
- var discounted_price1 = ".valrep_landimp_comp1_discounts-inputEx-fieldWrapper";
- var index_price1 = ".valrep_landimp_comp1_selling_price-inputEx-fieldWrapper";
- var adj_value1 = ".valrep_landimp_comp1_adjusted_value-inputEx-fieldWrapper";
- var average = ".valrep_landimp_comp_average-inputEx-fieldWrapper";
- var area2 = ".valrep_landimp_comp2_area-inputEx-fieldWrapper";
- var ask_price2 = ".valrep_landimp_comp2_base_price-inputEx-fieldWrapper";
- var price2 = ".valrep_landimp_comp2_price_sqm-inputEx-fieldWrapper";
- var discount_rate2 = ".valrep_landimp_comp2_discount_rate-inputEx-fieldWrapper";
- var discounted_price2 = ".valrep_landimp_comp2_discounts-inputEx-fieldWrapper";
- var index_price2 = ".valrep_landimp_comp2_selling_price-inputEx-fieldWrapper";
- var adj_value2 = ".valrep_landimp_comp2_adjusted_value-inputEx-fieldWrapper";
- var area3 = ".valrep_landimp_comp3_area-inputEx-fieldWrapper";
- var ask_price3 = ".valrep_landimp_comp3_base_price-inputEx-fieldWrapper";
- var price3 = ".valrep_landimp_comp3_price_sqm-inputEx-fieldWrapper";
- var discount_rate3 = ".valrep_landimp_comp3_discount_rate-inputEx-fieldWrapper";
- var discounted_price3 = ".valrep_landimp_comp3_discounts-inputEx-fieldWrapper";
- var index_price3 = ".valrep_landimp_comp3_selling_price-inputEx-fieldWrapper";
- var adj_value3 = ".valrep_landimp_comp3_adjusted_value-inputEx-fieldWrapper";
- var area4 = ".valrep_landimp_comp4_area-inputEx-fieldWrapper";
- var ask_price4 = ".valrep_landimp_comp4_base_price-inputEx-fieldWrapper";
- var price4 = ".valrep_landimp_comp4_price_sqm-inputEx-fieldWrapper";
- var discount_rate4 = ".valrep_landimp_comp4_discount_rate-inputEx-fieldWrapper";
- var discounted_price4 = ".valrep_landimp_comp4_discounts-inputEx-fieldWrapper";
- var index_price4 = ".valrep_landimp_comp4_selling_price-inputEx-fieldWrapper";
- var adj_value4 = ".valrep_landimp_comp4_adjusted_value-inputEx-fieldWrapper";
- var area5 = ".valrep_landimp_comp5_area-inputEx-fieldWrapper";
- var ask_price5 = ".valrep_landimp_comp5_base_price-inputEx-fieldWrapper";
- var price5 = ".valrep_landimp_comp5_price_sqm-inputEx-fieldWrapper";
- var discount_rate5 = ".valrep_landimp_comp5_discount_rate-inputEx-fieldWrapper";
- var discounted_price5 = ".valrep_landimp_comp5_discounts-inputEx-fieldWrapper";
- var index_price5 = ".valrep_landimp_comp5_selling_price-inputEx-fieldWrapper";
- var adj_value5 = ".valrep_landimp_comp5_adjusted_value-inputEx-fieldWrapper";
- var location1 = ".valrep_landimp_comp1_rec_location-inputEx-fieldWrapper";
- var size1 = ".valrep_landimp_comp1_rec_size-inputEx-fieldWrapper";
- var shape1 = ".valrep_landimp_comp1_rec_shape-inputEx-fieldWrapper";
- var cor_influence1 = ".valrep_landimp_comp1_rec_corner_influence-inputEx-fieldWrapper";
- var tru_lot1 = ".valrep_landimp_comp1_rec_tru_lot-inputEx-fieldWrapper";
- var elevation1 = ".valrep_landimp_comp1_rec_elevation-inputEx-fieldWrapper";
- var deg_devt1 = ".valrep_landimp_comp1_rec_degree_of_devt-inputEx-fieldWrapper";
- var time_element1 = ".valrep_landimp_comp1_rec_time_element-inputEx-fieldWrapper";
- var arrRectification1 = [
- ".valrep_landimp_comp1_rec_location-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_size-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_shape-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_corner_influence-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_tru_lot-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_elevation-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_degree_of_devt-inputEx-fieldWrapper",
- ".valrep_landimp_comp1_rec_time_element-inputEx-fieldWrapper" ];
- var total_adjust1 = ".valrep_landimp_comp1_concluded_adjustment-inputEx-fieldWrapper";
- var location2 = ".valrep_landimp_comp2_rec_location-inputEx-fieldWrapper";
- var size2 = ".valrep_landimp_comp2_rec_size-inputEx-fieldWrapper";
- var shape2 = ".valrep_landimp_comp2_rec_shape-inputEx-fieldWrapper";
- var cor_influence2 = ".valrep_landimp_comp2_rec_corner_influence-inputEx-fieldWrapper";
- var tru_lot2 = ".valrep_landimp_comp2_rec_tru_lot-inputEx-fieldWrapper";
- var elevation2 = ".valrep_landimp_comp2_rec_elevation-inputEx-fieldWrapper";
- var deg_devt2 = ".valrep_landimp_comp2_rec_degree_of_devt-inputEx-fieldWrapper";
- var time_element2 = ".valrep_landimp_comp2_rec_time_element-inputEx-fieldWrapper";
- var arrRectification2 = [
- ".valrep_landimp_comp2_rec_location-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_size-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_shape-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_corner_influence-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_tru_lot-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_elevation-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_degree_of_devt-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_rec_time_element-inputEx-fieldWrapper" ];
- var total_adjust2 = ".valrep_landimp_comp2_concluded_adjustment-inputEx-fieldWrapper";
- var location3 = ".valrep_landimp_comp3_rec_location-inputEx-fieldWrapper";
- var size3 = ".valrep_landimp_comp3_rec_size-inputEx-fieldWrapper";
- var shape3 = ".valrep_landimp_comp3_rec_shape-inputEx-fieldWrapper";
- var cor_influence3 = ".valrep_landimp_comp3_rec_corner_influence-inputEx-fieldWrapper";
- var tru_lot3 = ".valrep_landimp_comp3_rec_tru_lot-inputEx-fieldWrapper";
- var elevation3 = ".valrep_landimp_comp3_rec_elevation-inputEx-fieldWrapper";
- var deg_devt3 = ".valrep_landimp_comp3_rec_degree_of_devt-inputEx-fieldWrapper";
- var time_element3 = ".valrep_landimp_comp3_rec_time_element-inputEx-fieldWrapper";
- var arrRectification3 = [
- ".valrep_landimp_comp3_rec_location-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_size-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_shape-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_corner_influence-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_tru_lot-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_elevation-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_degree_of_devt-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_rec_time_element-inputEx-fieldWrapper" ];
- var total_adjust3 = ".valrep_landimp_comp3_concluded_adjustment-inputEx-fieldWrapper";
- var location4 = ".valrep_landimp_comp4_rec_location-inputEx-fieldWrapper";
- var size4 = ".valrep_landimp_comp4_rec_size-inputEx-fieldWrapper";
- var shape4 = ".valrep_landimp_comp4_rec_shape-inputEx-fieldWrapper";
- var cor_influence4 = ".valrep_landimp_comp4_rec_corner_influence-inputEx-fieldWrapper";
- var tru_lot4 = ".valrep_landimp_comp4_rec_tru_lot-inputEx-fieldWrapper";
- var elevation4 = ".valrep_landimp_comp4_rec_elevation-inputEx-fieldWrapper";
- var deg_devt4 = ".valrep_landimp_comp4_rec_degree_of_devt-inputEx-fieldWrapper";
- var time_element4 = ".valrep_landimp_comp4_rec_time_element-inputEx-fieldWrapper";
- var arrRectification4 = [
- ".valrep_landimp_comp4_rec_location-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_size-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_shape-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_corner_influence-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_tru_lot-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_elevation-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_degree_of_devt-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_rec_time_element-inputEx-fieldWrapper" ];
- var total_adjust4 = ".valrep_landimp_comp4_concluded_adjustment-inputEx-fieldWrapper";
- var location5 = ".valrep_landimp_comp5_rec_location-inputEx-fieldWrapper";
- var size5 = ".valrep_landimp_comp5_rec_size-inputEx-fieldWrapper";
- var shape5 = ".valrep_landimp_comp5_rec_shape-inputEx-fieldWrapper";
- var cor_influence5 = ".valrep_landimp_comp5_rec_corner_influence-inputEx-fieldWrapper";
- var tru_lot5 = ".valrep_landimp_comp5_rec_tru_lot-inputEx-fieldWrapper";
- var elevation5 = ".valrep_landimp_comp5_rec_elevation-inputEx-fieldWrapper";
- var deg_devt5 = ".valrep_landimp_comp5_rec_degree_of_devt-inputEx-fieldWrapper";
- var time_element5 = ".valrep_landimp_comp5_rec_time_element-inputEx-fieldWrapper";
- var arrRectification5 = [
- ".valrep_landimp_comp5_rec_location-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_size-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_shape-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_corner_influence-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_tru_lot-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_elevation-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_degree_of_devt-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_rec_time_element-inputEx-fieldWrapper" ];
- var total_adjust5 = ".valrep_landimp_comp5_concluded_adjustment-inputEx-fieldWrapper";
- var arrAdj = [
- ".valrep_landimp_comp1_adjusted_value-inputEx-fieldWrapper",
- ".valrep_landimp_comp2_adjusted_value-inputEx-fieldWrapper",
- ".valrep_landimp_comp3_adjusted_value-inputEx-fieldWrapper",
- ".valrep_landimp_comp4_adjusted_value-inputEx-fieldWrapper",
- ".valrep_landimp_comp5_adjusted_value-inputEx-fieldWrapper"
- ];
- var rounded_to = ".valrep_landimp_comp_rounded_to-inputEx-fieldWrapper";
- var eco_life = ".valrep_landimp_desc_economic_life-inputEx-fieldWrapper";
- var eff_life = ".valrep_landimp_desc_effective_age-inputEx-fieldWrapper";
- var rem_life = ".valrep_landimp_desc_imp_remain_life-inputEx-fieldWrapper";
- $j(document).ready(function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(ask_price1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(area1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(price1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discount_rate1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(price1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(location1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(size1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(shape1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(cor_influence1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(tru_lot1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(elevation1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(deg_devt1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(time_element1).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(index_price1).on("keydown keyup change paste", function() {
- $j(price1 + " input[type='text']").val(getPrice(ask_price1,area1));
- $j(discounted_price1 + " input[type='text']").val(getDiscount(price1,discount_rate1));
- $j(index_price1 + " input[type='text']").val(getIndexPrice(price1,discounted_price1));
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust1).on("keydown keyup change paste", function() {
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(ask_price2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(area2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(price2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discount_rate2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(price2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(location2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(size2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(shape2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(cor_influence2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(tru_lot2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(elevation2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(deg_devt2).on("keydown keyup change paste", function() {
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(time_element2).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value1 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(index_price2).on("keydown keyup change paste", function() {
- $j(price2 + " input[type='text']").val(getPrice(ask_price2,area2));
- $j(discounted_price2 + " input[type='text']").val(getDiscount(price2,discount_rate2));
- $j(index_price2 + " input[type='text']").val(getIndexPrice(price2,discounted_price2));
- $j(total_adjust2 + " input[type='text']").val(getTotalAdjustment(arrRectification2,index_price2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust2).on("keydown keyup change paste", function() {
- $j(adj_value2 + " input[type='text']").val(getAdjustedValue(index_price2,total_adjust2));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(ask_price3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(area3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(price3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discount_rate3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(price3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(location3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(size3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(shape3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(cor_influence3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(tru_lot3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(elevation3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(deg_devt3).on("keydown keyup change paste", function() {
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(time_element3).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(index_price3).on("keydown keyup change paste", function() {
- $j(price3 + " input[type='text']").val(getPrice(ask_price3,area3));
- $j(discounted_price3 + " input[type='text']").val(getDiscount(price3,discount_rate3));
- $j(index_price3 + " input[type='text']").val(getIndexPrice(price3,discounted_price3));
- $j(total_adjust3 + " input[type='text']").val(getTotalAdjustment(arrRectification3,index_price3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust3).on("keydown keyup change paste", function() {
- $j(adj_value3 + " input[type='text']").val(getAdjustedValue(index_price3,total_adjust3));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(ask_price4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(area4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(price4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discount_rate4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(price4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(location4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(size4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(shape4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(cor_influence4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(tru_lot4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(elevation4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(deg_devt4).on("keydown keyup change paste", function() {
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(time_element4).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(index_price4).on("keydown keyup change paste", function() {
- $j(price4 + " input[type='text']").val(getPrice(ask_price4,area4));
- $j(discounted_price4 + " input[type='text']").val(getDiscount(price4,discount_rate4));
- $j(index_price4 + " input[type='text']").val(getIndexPrice(price4,discounted_price4));
- $j(total_adjust4 + " input[type='text']").val(getTotalAdjustment(arrRectification4,index_price4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust4).on("keydown keyup change paste", function() {
- $j(adj_value4 + " input[type='text']").val(getAdjustedValue(index_price4,total_adjust4));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(ask_price5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(area5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(price5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discount_rate5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(price5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(discounted_price5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(location5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(size5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(shape5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(cor_influence5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(tru_lot5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(elevation5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(deg_devt5).on("keydown keyup change paste", function() {
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(time_element5).on("keydown keyup change paste", function() {
- $j(total_adjust1 + " input[type='text']").val(getTotalAdjustment(arrRectification1,index_price1));
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price1,total_adjust1));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(index_price5).on("keydown keyup change paste", function() {
- $j(price5 + " input[type='text']").val(getPrice(ask_price5,area5));
- $j(discounted_price5 + " input[type='text']").val(getDiscount(price5,discount_rate5));
- $j(index_price5 + " input[type='text']").val(getIndexPrice(price5,discounted_price5));
- $j(total_adjust5 + " input[type='text']").val(getTotalAdjustment(arrRectification5,index_price5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- $j(total_adjust5).on("keydown keyup change paste", function() {
- $j(adj_value5 + " input[type='text']").val(getAdjustedValue(index_price5,total_adjust5));
- $j(average + " input[type='text']").val(getAverage(arrAdj));
- $j(rounded_to + " input[type='text']").val(roundNum(average));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- });
- });
- /*Market Valaution*/
- var mval_total_area = ".valrep_landimp_value_area-inputEx-fieldWrapper";
- var mval_deduction = ".valrep_landimp_value_deduction-inputEx-fieldWrapper";
- var mval_net_area = ".valrep_landimp_value_net_area-inputEx-fieldWrapper";
- var mval_unit_value = ".valrep_landimp_value_unit_value-inputEx-fieldWrapper";
- var mval_total_value = ".valrep_landimp_value_land_value-inputEx-fieldWrapper";
- var mval_length = $j(mval_total_area).length;
- var tval_total_area = ".valrep_landimp_value_total_area-inputEx-fieldWrapper";
- var tval_total_deduction = ".valrep_landimp_value_total_deduction-inputEx-fieldWrapper";
- var tval_total_net_area = ".valrep_landimp_value_total_net_area-inputEx-fieldWrapper";
- var tval_total_value = ".valrep_landimp_value_total_landimp_value-inputEx-fieldWrapper";
- $j(document).ready(function() {
- $j(mval_unit_value).each(function(index, el) {
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(mval_total_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_area + " input[type='text']").val(getTotal(mval_total_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- $j(mval_deduction + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_deduction + " input[type='text']").val(getTotal(mval_deduction));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- });
- $j(mval_net_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- });
- });
- $j(".inputEx-ListField-addButton:eq(4)").click(function(){
- $j(mval_unit_value).each(function(index, el) {
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- if(mval_length === index) {
- $j(mval_total_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_area + " input[type='text']").val(getTotal(mval_total_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- $j(mval_deduction + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_deduction + " input[type='text']").val(getTotal(mval_deduction));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- });
- $j(mval_net_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- }
- });
- mval_length++;
- });
- //Compute Remaining Eco Life
- $j("#valrep_land_improve_description_improve").find($j(".inputEx-ListField-addButton")).on("click", function() {
- $j(eff_life).each(function(index, el) {
- $j(eff_life).on("keydown keyup change paste", function() {
- $j(rem_life + " input[type='text']:eq("+index+")").val(getRemLife(eco_life,eff_life,index));
- });
- $j(eco_life).on("keydown keyup change paste", function() {
- $j(rem_life + " input[type='text']:eq("+index+")").val(getRemLife(eco_life,eff_life,index));
- });
- });
- });
- var ca_floor_area = ".valrep_landimp_imp_value_area-inputEx-fieldWrapper";
- var ca_cost = ".valrep_landimp_imp_value_cost_per_sqm-inputEx-fieldWrapper";
- var rep_cost = ".valrep_landimp_imp_value_reproduction_cost-inputEx-fieldWrapper";
- //Compute Cost Approach
- $j('#valrep_land_improve_cost_approach').on("keydown keyup change paste",ca_floor_area + " input[type='text']", function(){
- var index = $j(ca_floor_area + " input[type='text']").index(this);
- $j(this).parents(ca_floor_area).siblings(rep_cost).find("input[type='text']").val(getRepCost(ca_floor_area,ca_cost,index));
- var parent = $j(this).parents('.inputEx-ListField-subFieldEl').parent();
- var parent_label = '#valrep_land_improve_cost_approach .inputEx-ListField-childContainer';
- var parent_index = $j(parent_label).children('div').index(parent);
- //alert(parent_index);
- $j(this).parents('.inputEx-ListField-subFieldEl').find(".valrep_landimp_imp_value_total_area input[type='text']").val(getTotalArea(parent_label,ca_floor_area,parent_index));
- })
- $j('#valrep_land_improve_cost_approach').on("keydown keyup change paste",ca_cost + " input[type='text']", function(){
- var index = $j(ca_cost + " input[type='text']").index(this);
- $j(this).parents(ca_cost).siblings(rep_cost).find("input[type='text']").val(getRepCost(ca_floor_area,ca_cost,index));
- })
- var desc_tct_no = ".valrep_landimp_propdesc_tct_no-inputEx-fieldWrapper";
- var desc_lot_no = ".valrep_landimp_propdesc_lot-inputEx-fieldWrapper";
- var desc_block_no = ".valrep_landimp_propdesc_block-inputEx-fieldWrapper";
- var desc_area = ".valrep_landimp_propdesc_area-inputEx-fieldWrapper";
- var val_tct_no = ".valrep_landimp_value_tct_no-inputEx-fieldWrapper";
- var val_lot_no = ".valrep_landimp_value_lot_no-inputEx-fieldWrapper";
- var val_block_no = ".valrep_landimp_value_block_no-inputEx-fieldWrapper";
- var val_area = ".valrep_landimp_value_area-inputEx-fieldWrapper";
- //Match the number and value of Ownership & Property Description
- var desc_length = $j("#valrep_land_improve_property_description").find($j(desc_tct_no)).length;
- for(var i=0; i < desc_length; i++) {
- $j("#valrep_land_improve_market_valuation").find($j(".inputEx-ListField-addButton")).eq(0).trigger('click');
- addMarketApproach();
- }
- $j("#valrep_land_improve_property_description").find($j(".inputEx-ListField-addButton")).eq(0).on("click", function() {
- $j("#valrep_land_improve_market_valuation").find($j(".inputEx-ListField-addButton")).eq(0).trigger('click');
- addMarketApproach();
- });
- function addMarketApproach() {
- $j(desc_tct_no).each(function(index, el) {
- $j(desc_tct_no + " input[type='text']:eq("+index+")").focus();
- $j(desc_tct_no + ":eq("+index+")").on("change keydown keyup paste", function() {
- $j(val_tct_no + " input[type='text']:eq("+index+")").val($j(desc_tct_no + " input[type='text']:eq("+index+")").val());
- });
- $j(desc_lot_no + ":eq("+index+")").on("change keydown keyup paste", function() {
- $j(val_lot_no + " input[type='text']:eq("+index+")").val($j(desc_lot_no + " input[type='text']:eq("+index+")").val());
- });
- $j(desc_block_no + ":eq("+index+")").on("change keydown keyup paste", function() {
- $j(val_block_no + " input[type='text']:eq("+index+")").val($j(desc_block_no + " input[type='text']:eq("+index+")").val());
- });
- $j(desc_area + ":eq("+index+")").on("change keydown keyup paste", function() {
- $j(val_area + " input[type='text']:eq("+index+")").val($j(desc_area + " input[type='text']:eq("+index+")").val());
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(tval_total_deduction + " input[type='text']").val(getTotal(mval_deduction));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- });
- //--- try
- $j(mval_unit_value).each(function(index, el) {
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(mval_total_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_area + " input[type='text']").val(getTotal(mval_total_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- $j(mval_deduction + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_net_area + " input[type='text']:eq("+index+")").val(getNetArea(mval_total_area,mval_deduction,index));
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_deduction + " input[type='text']").val(getTotal(mval_deduction));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- });
- $j(mval_net_area + ":eq("+index+")").on("keydown keyup change paste", function() {
- $j(mval_total_value + " input[type='text']:eq("+index+")").val(getTotalLandVal(mval_net_area,mval_unit_value,index));
- $j(mval_unit_value + " input[type='text']").val($j(rounded_to + " input[type='text']").val());
- $j(tval_total_net_area + " input[type='text']").val(getTotal(mval_net_area));
- $j(tval_total_value + " input[type='text']").val(getTotal(mval_total_value));
- });
- });
- //-- end try
- });
- }
- function getPrice(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return $j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') / $j(y + " input[type='text']").val();
- }
- }
- function getDiscount(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return $j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') * ($j(y + " input[type='text']").val() / 100);
- }
- }
- function getIndexPrice(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')) - parseFloat($j(y + " input[type='text']").val());
- }
- }
- function getTotalAdjustment(arrElem,y) {
- var total = 0;
- for (var i = 0; i < arrElem.length; i++) {
- total += parseFloat($j(arrElem[i] + " input[type='text']").val() << 0);
- }
- return $j(y + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') * (total/100);
- }
- function getAdjustedValue(x,y) {
- var total_adj = 0;
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')) + parseFloat($j(y + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, ''));
- }
- }
- function getAverage(arrAdj) {
- var total = 0;
- var filledOut = 0;
- for (var i = 0; i < arrAdj.length; i++) {
- if($j(arrAdj[i] + " input[type='text']").val() !== "NaN" && $j(arrAdj[i] + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') !== "0") {
- filledOut++;
- //alert("Adjusted Value= " + $j(arrAdj[i] + " input[type='text']").val() + " filledOut= " + filledOut);
- }
- total += $j(arrAdj[i] + " input[type='text']").val() << 0;
- }
- return total / filledOut;
- }
- function roundNum(x) {
- //return Math.ceil($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')).toFixed(2);
- return Math.round($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') / 100) * 100;
- }
- function getNetArea(x,y,index) {
- if($j(x + " input[type='text']:eq("+index+")").val() === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']:eq("+index+")").val()) - parseFloat($j(y + " input[type='text']:eq("+index+")").val());
- }
- }
- function getTotalLandVal(x,y,index) {
- if($j(x + " input[type='text']:eq("+index+")").val().replace('PhP', '') === "" || $j(x + " input[type='text']:eq("+index+")").val().replace('PhP', '') === "NaN") {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']:eq("+index+")").val()) * parseFloat($j(y + " input[type='text']:eq("+index+")").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, ''));
- }
- }
- function getTotal(x) {
- var sum_total = 0;
- $j(x).each(function(index, el){
- if($j(x + " input[type='text']:eq("+index+")").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '') !== "") {
- sum_total += parseFloat($j(x + " input[type='text']:eq("+index+")").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, ''));
- }
- else {
- sum_total += 0;
- }
- });
- return sum_total;
- }
- function getAppraisedTotal(x) {
- var sum_total = 0;
- $j(x).each(function(index, el){
- if($j(x + " input[type='text']:eq("+index+")").val() === "") {
- sum_total += 0;
- }
- else {
- sum_total += parseFloat($j(x + " input[type='text']:eq("+index+")").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, ''));
- }
- });
- return sum_total;
- }
- function getFinalDiscount(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')) * parseFloat($j(y + " input[type='text']").val() / -100);
- }
- }
- function getAppraisedTotal2(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')) + parseFloat($j(y + " input[type='text']").val());
- }
- }
- function getFinalAppraised(x,y) {
- if($j(x + " input[type='text']").val().replace('PhP', '') === 0) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']").val()) * (parseFloat($j(y + " input[type='text']").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, '')) / 100);
- }
- }
- function getRemLife(x,y,index) {
- if(parseFloat($j(x + " input[type='text']:eq("+index+")").val()) <= parseFloat($j(y + " input[type='text']:eq("+index+")").val())) {
- return 0;
- }
- else {
- return parseFloat($j(x + " input[type='text']:eq("+index+")").val()) - parseFloat($j(y + " input[type='text']:eq("+index+")").val());
- }
- }
- function getRepCost(x,y,idx) {
- return parseFloat($j(x + " input[type='text']:eq("+idx+")").val()) * parseFloat($j(y + " input[type='text']:eq("+idx+")").val().replace('PhP', '').replace(/[^0-9a-zA-Z.]/g, ''));
- }
- function getTotalArea(x,y,idx){
- var total = 0;
- alert($j(x).children('div:eq('+idx+')').length);
- alert($j(x).children('div:eq('+idx+')').find(y).length);
- $j(x).children('div:eq('+idx+')').find(y).each(function(){
- total += parseFloat($j(this).find("input[type='text']").val());
- });
- return total;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement