:: housing
<<set $here = 'housing'>>
<<set $ARGS = $location_var[$here]>>
<!-- ! 'rent' checks rent days given matches days of the month, and how much each rental costs.-->
<!-- ! 'util' checks which properties having working utilities, then multiplies the amount owed accordingly.-->
<!-- ! 'cable' checks which properties can have cable TV, then multiplies the amount owed accordingly.-->
<!-- ! home_owned[1] = 2: 'Apartment in St. Petersburg residential area.'-->
<!-- ! home_owned[1] = 3: 'Apartment in St. Petersburg residential area, that is currently occupied by your tenants.'-->
<!-- ! home_owned[2] = 1: 'Apartment in Pavlovsk where you live with your parents.'-->
<!-- ! home_owned[3] > 0: 'An cottage located in the cooperative village.'-->
<!-- ! home_owned[4] = 1: 'An apartment in Pushkin.'-->
<!-- ! home_owned[5] = 1: 'A plot of land in the St. Petersburg suburbs.'-->
<!-- ! home_owned[15] = 1: 'A house on the edge of St. Petersburg residential area.'-->
<<if $location_var[$here][0] == 'rent'>>
	<<if $time.month == 1>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 2>>
		<<if ($time.year % 4 == 0 and $time.year % 100 != 0) or $time.year % 400 == 0>>
			<<set $ArendHouseSL_due = 29>>
		<<else>>
			<<set $ArendHouseSL_due = 28>>
		<</if>>
	<<elseif $time.month == 3>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 4>>
		<<set $ArendHouseSL_due = 30>>
	<<elseif $time.month == 5>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 6>>
		<<set $ArendHouseSL_due = 30>>
	<<elseif $time.month == 7>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 8>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 9>>
		<<set $ArendHouseSL_due = 30>>
	<<elseif $time.month == 10>>
		<<set $ArendHouseSL_due = 31>>
	<<elseif $time.month == 11>>
		<<set $ArendHouseSL_due = 30>>
	<<elseif $time.month == 12>>
		<<set $ArendHouseSL_due = 31>>
	<</if>>
	<<setinit $home_rent[1] = 15000>>
	<<setinit $home_rent_txt[1] = '15,000'>>
	<!-- !home_rent[3] = 00000-->
	<!-- !$home_rent_txt[3] = '00,000'-->
	<<setinit $home_rent[4] = 10000>>
	<<setinit $home_rent_txt[4] = '10,000'>>
	<!-- !home_rent[5] = 00000-->
	<!-- !$home_rent_txt[5] = '00,000'-->
<</if>>
<<if $location_var[$here][0] == 'sale'>>
	<<setinit $home_value[1] = 800000>>
	<<setinit $home_value_txt[1] = '800,000'>>
	<<setinit $home_value[3] = 150000>>
	<<setinit $home_value_txt[3] = '150,000'>>
	<!-- !home_value[4] = 000000-->
	<!-- !$home_value_txt[4] = '000,000'-->
	<<setinit $home_value[5] = 1500000>>
	<<setinit $home_value_txt[5] = '1,500,000'>>
	<<setinit $home_value[15] = 800000>>
	<<setinit $home_value_txt[15] = '800,000'>>
<</if>>
<<if $location_var[$here][0] == 'util'>>
	<<set $hcount_util to null>>
	<<if getvar("$accessible_property['city_apartment']") == 1>>
		<<setn $hcount_util += 1>>

	<</if>>
	<<if getvar("$accessible_property['village_cottage']") > 1>>
		<<setn $hcount_util += 1>>

	<</if>>
	<<if getvar("$accessible_property['old_town_apartment']") > 0>>
		<<setn $hcount_util += 1>>

	<</if>>
	<<if getvar("$accessible_property['matryona_mansion']") > 2>>
		<<setn $hcount_util += 1>>

	<</if>>
	<<if getvar("$accessible_property['city_house']") == 1>>
		<<setn $hcount_util += 1>>

	<</if>>
<</if>>
<<if $location_var[$here][0] == 'cable'>>
	<<if getvar("$accessible_property['city_apartment']") == 1>>
		<<setn $hcount_cable += 1>>

	<</if>>
	<!-- !if accessible_property['village_cottage'] > 1: hcount_cable += 1-->
	<<if getvar("$accessible_property['old_town_apartment']") > 0>>
		<<setn $hcount_cable += 1>>

	<</if>>
	<<if getvar("$accessible_property['matryona_mansion']") > 2>>
		<<setn $hcount_cable += 1>>

	<</if>>
	<<if getvar("$accessible_property['city_house']") == 1>>
		<<setn $hcount_cable += 1>>

	<</if>>
<</if>>
