appraisermetrics_report_service 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/appraisermetrics_report_service/version.rb +1 -1
- data/lib/closed_sale.rb +19 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a25e1b4880b271a5b79ec518e4901e42017f9846
|
4
|
+
data.tar.gz: 47ca61fadb95626416ea6551943a94f05c4c86f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2005fde48459b5b3dbec14c845c1354542a3fe601212ccef4834fed37fb62c535dac70043605de015d34195cafe51335c0c74fabb164d92ab676462c4c50d55
|
7
|
+
data.tar.gz: 7e85c79ae62d3b7249c9c9954e7c314586c8ccf909b26fc0c70f2db11673b0770454bfa8e5a8ad85f19ac9781b03fc5b935b2ee07aea58cc667a6d36b88a6bb1
|
data/lib/closed_sale.rb
CHANGED
@@ -84,8 +84,8 @@ class ClosedSale < Prawn::Document
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# stroke boundary line
|
87
|
-
stroke_line [270, 720], [270, cursor]
|
88
87
|
move_down 30
|
88
|
+
stroke_line [270, 720], [270, cursor]
|
89
89
|
stroke_horizontal_rule
|
90
90
|
move_down 5
|
91
91
|
# move to full width table
|
@@ -149,7 +149,11 @@ class ClosedSale < Prawn::Document
|
|
149
149
|
end
|
150
150
|
|
151
151
|
stroke_bounds
|
152
|
-
|
152
|
+
|
153
|
+
# check to see if externalities needs to be populated
|
154
|
+
if @rep[:property_affectedby] || @rep[:has_hazardous_waste] || @rep[:problem_descr] || @rep[:env_problems] || @rep[:env_problem_descr] || @rep[:ttowers] || @rep[:windgeneratortype] || @rep[:tt_annual_income] || @rep[:windspeed] || @rep[:transtower_comments] || @rep[:num_of_gentowers] || @rep[:avgtowerhight] || @rep[:windgenincome] || @rep[:windgen_comment]
|
155
|
+
externalities
|
156
|
+
end
|
153
157
|
|
154
158
|
## page 4 ##
|
155
159
|
additional_images
|
@@ -330,8 +334,8 @@ class ClosedSale < Prawn::Document
|
|
330
334
|
|
331
335
|
def property_type_and_address
|
332
336
|
pos = @rep[:position] # lat and long
|
333
|
-
if pos
|
334
|
-
lat, long = pos[0], pos[1]
|
337
|
+
if pos && pos[0] && pos[1]
|
338
|
+
lat, long = pos[0].round(6), pos[1].round(6)
|
335
339
|
else
|
336
340
|
lat, long = " ", " "
|
337
341
|
end
|
@@ -449,19 +453,20 @@ class ClosedSale < Prawn::Document
|
|
449
453
|
|
450
454
|
def legal_transaction
|
451
455
|
taxes = @rep[:taxes]
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
assessed_value = moneymaker(taxes[0][:assessed_value], true)
|
456
|
-
real_estate_taxes = moneymaker(taxes[0][:RET], true)
|
457
|
-
end
|
458
|
-
else # deal with nil values to avoid no method errors
|
459
|
-
tax_parcel_no, assessed_value, real_estate_taxes = "", "", ""
|
456
|
+
tax_parcel_nos = ""
|
457
|
+
if taxes && taxes.any?
|
458
|
+
taxes.each {|t| tax_parcel_nos << "#{t[:tax_parcel_no]}, "}
|
460
459
|
end
|
461
460
|
|
461
|
+
assessed_val_check = @rep[:total_assessed_value] ? (@rep[:total_assessed_value].to_f) : 0
|
462
|
+
assessed_value = Money.new(assessed_val_check * 100, 'USD').format(no_cents: true)
|
463
|
+
|
464
|
+
real_estate_tax_check = @rep[:total_RET] ? (@rep[:total_RET].to_f) : 0
|
465
|
+
real_estate_taxes = Money.new(real_estate_tax_check * 100, 'USD').format(no_cents: true)
|
466
|
+
|
462
467
|
legal_transaction_data = [
|
463
468
|
[{content: "Legal/Transaction Detail", colspan: 4}],
|
464
|
-
["Tax Parcel ID(s)",
|
469
|
+
["Tax Parcel ID(s)", {content: tax_parcel_nos, colspan: 3}],
|
465
470
|
[" ", " ", " ", " "],
|
466
471
|
["Year of Assessment:", "#{@rep[:year_of_assessment]}", "Year of RE Taxes:", "#{@rep[:year_of_real_estate_taxes]}"],
|
467
472
|
["Assessed Value:", assessed_value, "RE Taxes", real_estate_taxes],
|
@@ -628,6 +633,7 @@ class ClosedSale < Prawn::Document
|
|
628
633
|
column(0).width = 135
|
629
634
|
columns(1..6).width = 67.5
|
630
635
|
columns(0..6).style(font_style: :bold)
|
636
|
+
column(3).style(align: :right)
|
631
637
|
row(0).style(align: :center, background_color: 'd7d7d7', size: 11, font_style: :bold)
|
632
638
|
cells.padding = [1, 2.5]
|
633
639
|
cells.style(border_width: 0)
|