appraisermetrics_report_service 0.0.4 → 0.0.5
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 +534 -510
- data/spec/lib/closed_sale_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76209e93e69b409b9e9c24ceca2dac133599adfd
|
4
|
+
data.tar.gz: 6183ca92a72da04e99b70000f7591fb37160407d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58082fe0e600d82681f7db4f2614f9ba4fb4f5f0833fa383607b61fb467150996a6f1eaa390324d194569198d28799f77d291651af7dbc67294f99bf1562531b
|
7
|
+
data.tar.gz: ece0f82c35142dad2dc552e91e322cd03c957baafbac720aaa1a61a7f4cbdbd2d7702083262595e2c75a189e5304d239c729d601f9adf29972c19bb2aab3fb81
|
data/lib/closed_sale.rb
CHANGED
@@ -18,37 +18,133 @@ class ClosedSale < Prawn::Document
|
|
18
18
|
## page 1 ##
|
19
19
|
|
20
20
|
# render office logo image if present
|
21
|
+
stroke_bounds
|
21
22
|
render_logo
|
22
23
|
|
23
|
-
# rendering
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
24
|
+
# rendering tables
|
25
|
+
float do
|
26
|
+
meta_data
|
27
|
+
end
|
28
|
+
|
29
|
+
indent(270) do
|
30
|
+
property_class
|
31
|
+
end
|
32
|
+
|
33
|
+
move_down 45
|
34
|
+
stroke_horizontal_rule
|
35
|
+
move_down 5
|
36
|
+
float do
|
37
|
+
profile_image
|
38
|
+
end
|
39
|
+
|
40
|
+
indent(270) do
|
41
|
+
property_type_and_address
|
42
|
+
transaction_summary
|
43
|
+
end
|
44
|
+
|
45
|
+
move_down 45
|
46
|
+
stroke_horizontal_rule
|
47
|
+
move_down 5
|
48
|
+
float do
|
49
|
+
land_classification
|
50
|
+
end
|
51
|
+
|
52
|
+
indent(270) do
|
53
|
+
physical_overview
|
54
|
+
end
|
55
|
+
|
56
|
+
move_down 45
|
57
|
+
stroke_horizontal_rule
|
58
|
+
move_down 5
|
59
|
+
float do
|
60
|
+
cash_flow
|
61
|
+
end
|
62
|
+
|
63
|
+
indent(270) do
|
64
|
+
income_expense
|
65
|
+
end
|
66
|
+
cursor_pos = cursor
|
67
|
+
stroke_line [270, 720], [270, cursor_pos]
|
33
68
|
|
34
69
|
start_new_page
|
35
70
|
|
36
71
|
## page 2 ##
|
37
|
-
|
38
|
-
|
72
|
+
stroke_horizontal_rule
|
73
|
+
stroke_bounds
|
74
|
+
move_down 5
|
75
|
+
float do
|
76
|
+
comments
|
77
|
+
end
|
78
|
+
|
79
|
+
indent(270) do
|
80
|
+
legal_transaction
|
81
|
+
end
|
82
|
+
move_down 45
|
83
|
+
stroke_horizontal_rule
|
84
|
+
move_down 5
|
39
85
|
# move to full width table
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
86
|
+
if @rep[:transactions] && @rep[:transactions].any?
|
87
|
+
transaction_history
|
88
|
+
move_down 45
|
89
|
+
stroke_horizontal_rule
|
90
|
+
move_down 5
|
91
|
+
end
|
44
92
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
93
|
+
if @rep[:utilities] && @rep[:utilities].any?
|
94
|
+
utilities
|
95
|
+
move_down 45
|
96
|
+
stroke_horizontal_rule
|
97
|
+
move_down 5
|
98
|
+
end
|
99
|
+
|
100
|
+
if @rep[:improvements] && @rep[:improvements].any?
|
101
|
+
improvements
|
102
|
+
move_down 45
|
103
|
+
stroke_horizontal_rule
|
104
|
+
move_down 5
|
105
|
+
end
|
106
|
+
|
107
|
+
if @rep[:waterrights] && @rep[:waterrights].any?
|
108
|
+
water_rights
|
109
|
+
move_down 45
|
110
|
+
stroke_horizontal_rule
|
111
|
+
move_down 5
|
112
|
+
end
|
113
|
+
|
114
|
+
if @rep[:waterdistributions] && @rep[:waterdistributions].any?
|
115
|
+
water_distribution
|
116
|
+
move_down 45
|
117
|
+
stroke_horizontal_rule
|
118
|
+
move_down 5
|
119
|
+
end
|
120
|
+
|
121
|
+
if @rep[:crops] && @rep[:crops].any?
|
122
|
+
crop_yield
|
123
|
+
move_down 45
|
124
|
+
stroke_horizontal_rule
|
125
|
+
move_down 5
|
126
|
+
end
|
127
|
+
|
128
|
+
if @rep[:estimatedproductivity] && @rep[:estimatedproductivity].any?
|
129
|
+
estimated_productivity
|
130
|
+
move_down 45
|
131
|
+
stroke_horizontal_rule
|
132
|
+
move_down 5
|
133
|
+
end
|
134
|
+
|
135
|
+
# stroke bounds again for third page
|
136
|
+
|
137
|
+
|
138
|
+
if @rep[:plantings] && @rep[:plantings].any?
|
139
|
+
perm_plantings
|
140
|
+
move_down 45
|
141
|
+
stroke_horizontal_rule
|
142
|
+
move_down 5
|
143
|
+
end
|
144
|
+
|
145
|
+
stroke_bounds
|
51
146
|
externalities
|
147
|
+
|
52
148
|
## page 4 ##
|
53
149
|
additional_images
|
54
150
|
|
@@ -63,603 +159,531 @@ class ClosedSale < Prawn::Document
|
|
63
159
|
|
64
160
|
|
65
161
|
def meta_data
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
cells.padding = [1, 2.5]
|
78
|
-
end
|
79
|
-
stroke_bounds
|
162
|
+
meta_data = [
|
163
|
+
["Record Number:", "#{@rep[:sequence]}"],
|
164
|
+
["Record Created By:", "#{@rep[:record_created_by]}"],
|
165
|
+
["Date Created or Last Modified:", datemaker(@rep[:record_edited])]
|
166
|
+
]
|
167
|
+
|
168
|
+
table(meta_data) do # record meta data table with image
|
169
|
+
columns(0..1).width = 135
|
170
|
+
columns([0]).style(font_style: :bold)
|
171
|
+
cells.style(border_width: 0)
|
172
|
+
cells.padding = [1, 2.5]
|
80
173
|
end
|
81
174
|
end
|
82
175
|
|
83
176
|
def profile_image
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
text "No Image"
|
89
|
-
end
|
90
|
-
stroke_bounds
|
177
|
+
if @property_images && @property_images.any?
|
178
|
+
image "#{@property_images.first}", width: 265
|
179
|
+
else
|
180
|
+
text "No Image"
|
91
181
|
end
|
92
182
|
end
|
93
183
|
|
94
184
|
def land_classification
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
]
|
100
|
-
|
101
|
-
land_classes = @rep[:landclassifications]
|
102
|
-
if land_classes # node could be nil
|
103
|
-
|
104
|
-
total_acres = 0 # value to add to in loop
|
105
|
-
total_dollar = 0
|
106
|
-
|
107
|
-
land_classes.each do |l|
|
108
|
-
if l # array could be empty
|
109
|
-
if l[:priceperacre] # priceperacre could be nil, avoid nomethod errors below by checking
|
110
|
-
m = Money.new(l[:priceperacre][:cents], l[:priceperacre][:currency_iso])
|
111
|
-
per_acre_string = m.format(no_cents: true)
|
112
|
-
total_string = (m * l[:numacres]).format(no_cents: true)
|
113
|
-
|
114
|
-
total_acres += no_nil_number(l[:numacres]) # add to total
|
115
|
-
total_dollar += m.to_f * l[:numacres]
|
116
|
-
|
117
|
-
classification_data.push(
|
118
|
-
[
|
119
|
-
"#{l[:landclass]}",
|
120
|
-
'%.2f' % no_nil_number(l[:numacres]), # => adds .00 to acres
|
121
|
-
per_acre_string,
|
122
|
-
total_string
|
123
|
-
]
|
124
|
-
)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end # end block
|
128
|
-
|
129
|
-
total_dollar_string = Money.new(total_dollar * 100, 'USD').format(no_cents: true)
|
130
|
-
total_per_acre = Money.new((total_dollar / total_acres) * 100, 'USD')
|
131
|
-
total_per_acre_string = total_per_acre.format(no_cents: true)
|
132
|
-
|
133
|
-
# push totals into table
|
134
|
-
classification_data.push(
|
135
|
-
["", "", "", ""], # line space
|
136
|
-
["Totals", '%.2f' % total_acres, total_per_acre_string, total_dollar_string]
|
137
|
-
)
|
185
|
+
classification_data = [
|
186
|
+
[{content: "Land Classification Breakdown", colspan: 4}],
|
187
|
+
["Land Class:", "Acres:", "$/Acre:", "Total:"],
|
188
|
+
]
|
138
189
|
|
139
|
-
|
140
|
-
|
141
|
-
else
|
142
|
-
improv_alloc = Money.new(0, 'USD')
|
143
|
-
end
|
144
|
-
|
145
|
-
classification_data.push([
|
146
|
-
"Total $ to Imprv", moneymaker(@rep[:total_imprv_budget], true),
|
147
|
-
"Imprv $/AC Alloc", improv_alloc.format(no_cents: :true)],
|
148
|
-
[{content: "Total Land and Improvement $/AC", colspan: 3}, (total_per_acre + improv_alloc).format(no_cents: :true)])
|
149
|
-
end
|
190
|
+
land_classes = @rep[:landclassifications]
|
191
|
+
if land_classes # node could be nil
|
150
192
|
|
151
|
-
|
152
|
-
|
153
|
-
columns(2..3).width = 67
|
154
|
-
columns(1..3).style(align: :right)
|
155
|
-
cells.style(border_width: 0)
|
156
|
-
cells.padding = [1, 2.5]
|
157
|
-
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
158
|
-
row(1).style(align: :right, font_style: :bold, border_bottom_width: 0.5)
|
159
|
-
row(-3).style(border_bottom_width: 0.5, font_style: :bold)
|
160
|
-
end
|
161
|
-
stroke_bounds
|
162
|
-
end
|
163
|
-
end
|
193
|
+
total_acres = 0 # value to add to in loop
|
194
|
+
total_dollar = 0
|
164
195
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
196
|
+
land_classes.each do |l|
|
197
|
+
if l # array could be empty
|
198
|
+
if l[:priceperacre] # priceperacre could be nil, avoid nomethod errors below by checking
|
199
|
+
m = Money.new(l[:priceperacre][:cents], l[:priceperacre][:currency_iso])
|
200
|
+
per_acre_string = m.format(no_cents: true)
|
201
|
+
total_string = (m * l[:numacres]).format(no_cents: true)
|
171
202
|
|
172
|
-
|
203
|
+
total_acres += no_nil_number(l[:numacres]) # add to total
|
204
|
+
total_dollar += m.to_f * l[:numacres]
|
173
205
|
|
174
|
-
|
175
|
-
incomes.each do |i|
|
176
|
-
if i # array could be nil
|
177
|
-
cash_flow_data.push(
|
206
|
+
classification_data.push(
|
178
207
|
[
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
208
|
+
"#{l[:landclass]}",
|
209
|
+
'%.2f' % no_nil_number(l[:numacres]), # => adds .00 to acres
|
210
|
+
per_acre_string,
|
211
|
+
total_string
|
183
212
|
]
|
184
213
|
)
|
185
214
|
end
|
186
215
|
end
|
216
|
+
end # end block
|
217
|
+
|
218
|
+
total_dollar_string = Money.new(total_dollar * 100, 'USD').format(no_cents: true)
|
219
|
+
total_per_acre = Money.new((total_dollar / total_acres) * 100, 'USD')
|
220
|
+
total_per_acre_string = total_per_acre.format(no_cents: true)
|
221
|
+
|
222
|
+
# push totals into table
|
223
|
+
classification_data.push(
|
224
|
+
["", "", "", ""], # line space
|
225
|
+
["Totals", '%.2f' % total_acres, total_per_acre_string, total_dollar_string]
|
226
|
+
)
|
227
|
+
|
228
|
+
if @rep[:imprv_unitprice]
|
229
|
+
improv_alloc = Money.new(@rep[:imprv_unitprice][:cents], 'USD')
|
230
|
+
else
|
231
|
+
improv_alloc = Money.new(0, 'USD')
|
187
232
|
end
|
188
233
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
234
|
+
classification_data.push([
|
235
|
+
"Total $ to Imprv", moneymaker(@rep[:total_imprv_budget], true),
|
236
|
+
"Imprv $/AC Alloc", improv_alloc.format(no_cents: :true)],
|
237
|
+
[{content: "Total Land and Improvement $/AC", colspan: 3}, (total_per_acre + improv_alloc).format(no_cents: :true)])
|
238
|
+
end
|
239
|
+
|
240
|
+
table(classification_data) do # land classification breakdown table
|
241
|
+
columns(0..1).width = 68
|
242
|
+
columns(2..3).width = 67
|
243
|
+
columns(1..3).style(align: :right)
|
244
|
+
cells.style(border_width: 0)
|
245
|
+
cells.padding = [1, 2.5]
|
246
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
247
|
+
row(1).style(align: :right, font_style: :bold, border_bottom_width: 0.5)
|
248
|
+
row(-3).style(border_bottom_width: 0.5, font_style: :bold)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
def cash_flow
|
253
|
+
cash_flow_data = [
|
254
|
+
[{content: "Cash Flow - Production Analysis", colspan: 4}],
|
255
|
+
["Income Source", "Stable $/Unit", "Stablilized Yield/Unit", "No. of Source, i.e. AC"]
|
256
|
+
]
|
257
|
+
|
258
|
+
incomes = @rep[:incomes]
|
259
|
+
|
260
|
+
if incomes # node could be nil
|
261
|
+
incomes.each do |i|
|
262
|
+
if i # array could be nil
|
263
|
+
cash_flow_data.push(
|
264
|
+
[
|
265
|
+
i[:incomesrc],
|
266
|
+
moneymaker(i[:stabcashperunit], false),
|
267
|
+
'%.2f' % no_nil_number(i[:stabilizedyield]),
|
268
|
+
'%.2f' % no_nil_number(i[:totalunits])
|
269
|
+
]
|
270
|
+
)
|
271
|
+
end
|
198
272
|
end
|
199
|
-
|
273
|
+
end
|
274
|
+
|
275
|
+
table(cash_flow_data) do
|
276
|
+
columns(0..1).width = 68
|
277
|
+
columns(2..3).width = 67
|
278
|
+
columns(1..3).style(align: :right, font_style: :bold)
|
279
|
+
column(0).style(align: :left, font_style: :bold)
|
280
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, border_top_width: 0.5)
|
281
|
+
cells.style(border_width: 0)
|
282
|
+
row(1).style(border_bottom_width: 0.5, align: :center, font_style: nil)
|
283
|
+
cells.padding = [1, 2.5]
|
200
284
|
end
|
201
285
|
end
|
202
286
|
|
203
287
|
def comments
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
cells.style(border_width: 0)
|
216
|
-
end
|
217
|
-
stroke_bounds
|
288
|
+
comments_data = [
|
289
|
+
["Comments"],
|
290
|
+
["#{@rep[:general_comments]}"]
|
291
|
+
]
|
292
|
+
|
293
|
+
table(comments_data) do
|
294
|
+
row(0).style align: :center
|
295
|
+
column(0).width = 270
|
296
|
+
cells.padding = [1, 2.5]
|
297
|
+
cells.style(border_width: 0)
|
298
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
218
299
|
end
|
219
300
|
end
|
220
301
|
|
221
302
|
def property_class
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
cells.padding = [1, 2.5]
|
235
|
-
end
|
236
|
-
stroke_bounds
|
303
|
+
property_data = [
|
304
|
+
["Property Classification:", "#{@rep[:land_use_zone]}"],
|
305
|
+
["Transaction Type:", "#{@rep[:type_of_transaction]}"],
|
306
|
+
["Property Name:", "#{@rep[:property_name]}"]
|
307
|
+
]
|
308
|
+
|
309
|
+
table(property_data) do
|
310
|
+
column(0).style(align: :right)
|
311
|
+
column([1]).style(font_style: :bold)
|
312
|
+
columns(0..1).width = 135
|
313
|
+
cells.style(border_width: 0)
|
314
|
+
cells.padding = [1, 2.5]
|
237
315
|
end
|
238
316
|
end
|
239
317
|
|
240
318
|
def property_type_and_address
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
end
|
248
|
-
|
249
|
-
property_inclusions = no_nil_array(@rep[:property_inclusions]).join(" ")
|
250
|
-
type_and_address_data = [
|
251
|
-
[{content: "Property Type and Address", colspan: 4}],
|
252
|
-
["Property Name:", "#{@rep[:property_name]}", "Primary Land Use:", "#{@rep[:primary_ag_use]}"],
|
253
|
-
["What does this property include?",
|
254
|
-
{content: property_inclusions, colspan: 3}],
|
255
|
-
["Address:", {content: "#{@rep[:property_address_number]}" + " #{@rep[:street_or_road_name]}", colspan: 3}],
|
256
|
-
["City:", "#{@rep[:city]}", "County:", "#{@rep[:ordinance_authority]}"],
|
257
|
-
["State:", "#{@rep[:county_state]}".strip.split('').last(2).join(""), "Zip Code:", "#{@rep[:zip_code]}"],
|
258
|
-
["Township/Range:","#{@rep[:townshipINT]}" + "#{@rep[:rangeINT]}", "Section(s):", "#{@rep[:legal_description]}"],
|
259
|
-
["Latitude:", lat, "Longitude:", long],
|
260
|
-
[{content: "Property Location and Directions:" + "#{@rep[:directions_or_ownership_comments]}", colspan: 4}]
|
261
|
-
]
|
319
|
+
pos = @rep[:position] # lat and long
|
320
|
+
if pos
|
321
|
+
lat, long = pos[0], pos[1]
|
322
|
+
else
|
323
|
+
lat, long = " ", " "
|
324
|
+
end
|
262
325
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
326
|
+
property_inclusions = no_nil_array(@rep[:property_inclusions]).join(" ")
|
327
|
+
type_and_address_data = [
|
328
|
+
[{content: "Property Type and Address", colspan: 4}],
|
329
|
+
["Property Name:", "#{@rep[:property_name]}", "Primary Land Use:", "#{@rep[:primary_ag_use]}"],
|
330
|
+
["What does this property include?",
|
331
|
+
{content: property_inclusions, colspan: 3}],
|
332
|
+
["Address:", {content: "#{@rep[:property_address_number]}" + " #{@rep[:street_or_road_name]}", colspan: 3}],
|
333
|
+
["City:", "#{@rep[:city]}", "County:", "#{@rep[:ordinance_authority]}"],
|
334
|
+
["State:", "#{@rep[:county_state]}".strip.split('').last(2).join(""), "Zip Code:", "#{@rep[:zip_code]}"],
|
335
|
+
["Township/Range:","#{@rep[:townshipINT]}" + "#{@rep[:rangeINT]}", "Section(s):", "#{@rep[:legal_description]}"],
|
336
|
+
["Latitude:", lat, "Longitude:", long],
|
337
|
+
[{content: "Property Location and Directions:" + "#{@rep[:directions_or_ownership_comments]}", colspan: 4}]
|
338
|
+
]
|
339
|
+
|
340
|
+
table(type_and_address_data) do
|
341
|
+
columns(0..1).width = 68
|
342
|
+
columns(2..3).width = 67
|
343
|
+
columns([0, 2]).style(align: :right)
|
344
|
+
columns([1, 3]).style(font_style: :bold)
|
345
|
+
cells.padding = [1, 2.5]
|
346
|
+
cells.style(border_width: 0)
|
347
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
273
348
|
end
|
274
349
|
end
|
275
350
|
|
276
351
|
def transaction_summary
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
colspan: 2}, "Date Inspected:", datemaker(@rep[:date_inspected])
|
291
|
-
]
|
352
|
+
price = moneymaker(@rep[:sale_price], true)
|
353
|
+
adjustment = moneymaker(@rep[:sale_adjustment], true)
|
354
|
+
ce_sale_price = moneymaker(@rep[:cesaleprice], true)
|
355
|
+
transaction_data = [
|
356
|
+
[{content: "Transaction Summary", colspan: 4}],
|
357
|
+
["Sale Price $:", price, "Sale Date:", datemaker(@rep[:sale_date])],
|
358
|
+
["Cond. Adjust $:", '(' + adjustment +')', "Adj. CE Sale $:", ce_sale_price],
|
359
|
+
["Unit Description:", "#{@rep[:unit]}", "No. of Units:", '%.2f' % no_nil_number(@rep[:num_of_units])],
|
360
|
+
["Instrument No.:", "#{@rep[:public_rec_ref_numer]}", "$/Unit:", moneymaker(@rep[:cesaleunitprice], true)],
|
361
|
+
["Seller:", "#{@rep[:grantor]}", "Buyer:", "#{@rep[:grantee]}"],
|
362
|
+
["Extent of Verification:", {content: no_nil_array(@rep[:verifications]).join(', '), colspan: 3}],
|
363
|
+
[{content: "#{@rep[:grantor]}" + " #{@rep[:information_source_contact]}",
|
364
|
+
colspan: 2}, "Date Inspected:", datemaker(@rep[:date_inspected])
|
292
365
|
]
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
stroke_bounds
|
366
|
+
]
|
367
|
+
|
368
|
+
table(transaction_data) do
|
369
|
+
columns(0..1).width = 68
|
370
|
+
columns(2..3).width = 67
|
371
|
+
columns([0, 2]).style align: :right
|
372
|
+
cells.padding = [1, 2.5]
|
373
|
+
cells.style(border_width: 0)
|
374
|
+
columns([1, 3]).style(font_style: :bold)
|
375
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
304
376
|
end
|
305
377
|
end
|
306
378
|
|
307
379
|
def physical_overview
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
row(9).style(align: :left)
|
332
|
-
end
|
333
|
-
stroke_bounds
|
380
|
+
overview_data = [
|
381
|
+
[{content: "Physical Overview", colspan: 4}],
|
382
|
+
["Farming Practice:", "#{@rep[:farming_practices]}", {content: "Predominant Soil Type and Description:", colspan: 2}],
|
383
|
+
["Ann. Rainfall-Inches:", "#{@rep[:avg_precipitation]}", {content: "#{@rep[:soils]}", colspan: 2, rowspan: 3}],
|
384
|
+
["Avg Frost Free Days:", "#{@rep[:growing_season]}"],
|
385
|
+
["Elevation(Range):", "#{@rep[:elevation]}"],
|
386
|
+
["Predom Top Slope:", "#{@rep[:topography]}", "Legal Access:", {content: "#{@rep[:legal_access]}", rowspan: 2}],
|
387
|
+
["Corn Suitability Rating:", @rep[:CSR2]],
|
388
|
+
["Land Use Zone:", "#{@rep[:land_use_zone]}", "Physical Access:", "#{@rep[:physical_access]}"],
|
389
|
+
["Flood Zone:", no_nil_array(@rep[:flood_zone]).join(", "), "Wetlands:", "#{@rep[:wetlands]}"],
|
390
|
+
[{content: "Land Development Potential, Change or Use, or Limitations Comments:", colspan: 4}],
|
391
|
+
[{content: "#{@rep[:development_potential]}" , colspan: 4}]
|
392
|
+
]
|
393
|
+
|
394
|
+
table(overview_data) do
|
395
|
+
columns(0..1).width = 68
|
396
|
+
columns(2..3).width = 67
|
397
|
+
columns([0, 2]).style(align: :right)
|
398
|
+
columns([1, 3]).style(font_style: :bold)
|
399
|
+
cells.padding = [1, 2.5]
|
400
|
+
cells.style(border_width: 0)
|
401
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
402
|
+
row(9).style(align: :left)
|
334
403
|
end
|
335
404
|
end
|
336
405
|
|
337
406
|
def income_expense
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
366
|
-
row([5, 6]).style(align: :left)
|
367
|
-
end
|
368
|
-
stroke_bounds
|
407
|
+
income = Money.new(no_nil_number(@rep[:eff_gross_income]) * 100, 'USD')
|
408
|
+
expense = Money.new(no_nil_number(@rep[:total_expenses]) * 100, 'USD')
|
409
|
+
noi = income - expense
|
410
|
+
noi_string = noi.format(no_cents: :true)
|
411
|
+
expense_ratio = "#{((expense / income) * 100).round(2)}" + "%"
|
412
|
+
|
413
|
+
income_expense_data = [
|
414
|
+
[{content: "Income/Expense Information", colspan: 4}],
|
415
|
+
["Total Farm Income:", income.format(no_cents: true), "Total Income to LL:", income.format(no_cents: true)],
|
416
|
+
["Total Farm Expenses:", expense.format(no_cents: true), "Total Exp pd by LL:", expense.format(no_cents: true)],
|
417
|
+
["NOI:", noi_string, "Expense Ratio:", expense_ratio],
|
418
|
+
["Cap Rate or OAR", "#{@rep[:overall_capitalization_rate]}%", " ", " "],
|
419
|
+
[{content: "Cash Flow Comments:", colspan: 4}],
|
420
|
+
[{content: @rep[:income_comments], colspan: 4}],
|
421
|
+
["Annual Water $/Acre:", moneymaker(@rep[:irrig_cost_per_acre], true)],
|
422
|
+
["Annual Pumping $/Acre:", moneymaker(@rep[:pumping_cost_per_acre], true)]
|
423
|
+
]
|
424
|
+
|
425
|
+
table(income_expense_data) do
|
426
|
+
columns(0..1).width = 68
|
427
|
+
columns(2..3).width = 67
|
428
|
+
columns(0..3).style(align: :right)
|
429
|
+
cells.padding = [1, 2.5]
|
430
|
+
cells.style(border_width: 0)
|
431
|
+
columns([1, 3]).style(font_style: :bold)
|
432
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
433
|
+
row([5, 6]).style(align: :left)
|
369
434
|
end
|
370
435
|
end
|
371
436
|
|
372
437
|
def legal_transaction
|
373
|
-
|
374
|
-
|
375
|
-
taxes
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
tax_parcel_no, assessed_value, real_estate_taxes = "", "", ""
|
384
|
-
end
|
385
|
-
|
386
|
-
legal_transaction_data = [
|
387
|
-
[{content: "Legal/Transaction Detail", colspan: 4}],
|
388
|
-
["Tax Parcel ID(s)", tax_parcel_no, " ", " "],
|
389
|
-
[" ", " ", " ", " "],
|
390
|
-
["Year of Assessment:", "#{@rep[:year_of_assessment]}", "Year of RE Taxes:", "#{@rep[:year_of_real_estate_taxes]}"],
|
391
|
-
["Assessed Value:", assessed_value, "RE Taxes", real_estate_taxes],
|
392
|
-
["Financing:", "#{@rep[:financing_type]}", "Property Rights:", "#{@rep[:property_rights]}"],
|
393
|
-
["At Market Trans?:", "#{@rep[:atmarket_trans]}", "Days on Market:", "#{@rep[:exposure_period]}"],
|
394
|
-
[{content: "Transaction History Comments:", colspan: 4}],
|
395
|
-
[{content: "#{@rep[:listing_comments]}", colspan: 4}]
|
396
|
-
]
|
438
|
+
taxes = @rep[:taxes]
|
439
|
+
if taxes # node could be nil
|
440
|
+
if taxes[0] # array could be empty
|
441
|
+
tax_parcel_no = taxes[0][:tax_parcel_no]
|
442
|
+
assessed_value = moneymaker(taxes[0][:assessed_value], true)
|
443
|
+
real_estate_taxes = moneymaker(taxes[0][:RET], true)
|
444
|
+
end
|
445
|
+
else # deal with nil values to avoid no method errors
|
446
|
+
tax_parcel_no, assessed_value, real_estate_taxes = "", "", ""
|
447
|
+
end
|
397
448
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
449
|
+
legal_transaction_data = [
|
450
|
+
[{content: "Legal/Transaction Detail", colspan: 4}],
|
451
|
+
["Tax Parcel ID(s)", tax_parcel_no, " ", " "],
|
452
|
+
[" ", " ", " ", " "],
|
453
|
+
["Year of Assessment:", "#{@rep[:year_of_assessment]}", "Year of RE Taxes:", "#{@rep[:year_of_real_estate_taxes]}"],
|
454
|
+
["Assessed Value:", assessed_value, "RE Taxes", real_estate_taxes],
|
455
|
+
["Financing:", "#{@rep[:financing_type]}", "Property Rights:", "#{@rep[:property_rights]}"],
|
456
|
+
["At Market Trans?:", "#{@rep[:atmarket_trans]}", "Days on Market:", "#{@rep[:exposure_period]}"],
|
457
|
+
[{content: "Transaction History Comments:", colspan: 4}],
|
458
|
+
[{content: "#{@rep[:listing_comments]}", colspan: 4}]
|
459
|
+
]
|
460
|
+
|
461
|
+
table(legal_transaction_data) do
|
462
|
+
columns(0..1).width = 68
|
463
|
+
columns(2..3).width = 67
|
464
|
+
columns([1, 3]).style(font_style: :bold)
|
465
|
+
cells.padding = [1, 2.5]
|
466
|
+
cells.style(border_width: 0)
|
467
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
407
468
|
end
|
408
469
|
end
|
409
470
|
|
410
471
|
def transaction_history
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
)
|
425
|
-
end
|
472
|
+
transaction_history_data = [
|
473
|
+
[{content: "Transaction History", colspan: 4}],
|
474
|
+
["Historic Transaction Type", "Transaction Description", "Date", "Sale Price, List Price, or List Price"]
|
475
|
+
]
|
476
|
+
|
477
|
+
transactions = @rep[:historyrecords]
|
478
|
+
|
479
|
+
if transactions # node could be nil
|
480
|
+
transactions.each do |t|
|
481
|
+
if t # array could be nil
|
482
|
+
transaction_history_data.push(
|
483
|
+
["#{t[:transType]}", "#{t[:transDescr]}", datemaker(t[:transDate]), moneymaker(t[:price], true)]
|
484
|
+
)
|
426
485
|
end
|
427
486
|
end
|
487
|
+
end
|
428
488
|
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
end
|
437
|
-
stroke_bounds
|
489
|
+
table(transaction_history_data) do
|
490
|
+
columns(0..3).width = 135
|
491
|
+
columns(0..3).style(align: :right, font_style: :bold)
|
492
|
+
cells.padding = [1, 2.5]
|
493
|
+
cells.style(border_width: 0)
|
494
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
495
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
438
496
|
end
|
439
497
|
end
|
440
498
|
|
441
499
|
def utilities
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
)
|
455
|
-
end
|
500
|
+
utilities_data = [
|
501
|
+
[{content: "Description of Utilities", colspan: 4}],
|
502
|
+
["Utility Description", "Service Availability", "Service Provider", "Comments"]
|
503
|
+
]
|
504
|
+
|
505
|
+
utilities = @rep[:utilities]
|
506
|
+
if utilities # node could be nil
|
507
|
+
utilities.each do |u|
|
508
|
+
if u # array could be empty
|
509
|
+
utilities_data.push(
|
510
|
+
["#{u[:description]}", "#{u[:availability]}", "#{u[:provider]}", "#{u[:comments]}"]
|
511
|
+
)
|
456
512
|
end
|
457
513
|
end
|
514
|
+
end
|
458
515
|
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
end
|
467
|
-
stroke_bounds
|
516
|
+
table(utilities_data) do
|
517
|
+
columns(0..3).width = 135
|
518
|
+
columns(0..3).style(align: :right, font_style: :bold)
|
519
|
+
cells.padding = [1, 2.5]
|
520
|
+
cells.style(border_width: 0)
|
521
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
522
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
468
523
|
end
|
469
524
|
end
|
470
525
|
|
471
526
|
def improvements
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
485
|
-
end
|
486
|
-
stroke_bounds
|
487
|
-
end
|
527
|
+
improvements_array = @rep[:improvements]
|
528
|
+
|
529
|
+
sorted_array = flip_improvements_array(improvements_array)
|
530
|
+
|
531
|
+
table(sorted_array) do
|
532
|
+
columns(0..7).width = 67.5
|
533
|
+
columns(1..7).style(font_style: :bold)
|
534
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
535
|
+
cells.padding = [1, 2.5]
|
536
|
+
cells.style(border_width: 0)
|
537
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
538
|
+
end
|
488
539
|
end
|
489
540
|
|
490
541
|
def water_rights
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
rights
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}"]
|
504
|
-
)
|
505
|
-
end
|
542
|
+
water_rights_data = [
|
543
|
+
[{content: "Water Rights", colspan: 8}],
|
544
|
+
["Water Right No.", "Water Right", "Water Source", "Priority Date", "Beneficial Use", "No. Acres Irrigated", "Annual Volume Ac-Ft", "Period of Use"]
|
545
|
+
]
|
546
|
+
|
547
|
+
rights = @rep[:waterrights]
|
548
|
+
if rights # node could be nil
|
549
|
+
rights.each do |r|
|
550
|
+
if r # array could be empty
|
551
|
+
water_rights_data.push(
|
552
|
+
["#{r[:waterrightNum]}", "#{r[:waterRight]}", "#{r[:waterSrc]}", datemaker(r[:priorityDate]), "#{r[:purpose]}", "#{r[:numIrrAcres]}", "#{r[:annVolume]}"]
|
553
|
+
)
|
506
554
|
end
|
507
555
|
end
|
556
|
+
end
|
508
557
|
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
end
|
517
|
-
|
518
|
-
stroke_bounds
|
558
|
+
table(water_rights_data) do
|
559
|
+
columns(0..7).width = 67.5
|
560
|
+
columns(0..7).style(font_style: :bold)
|
561
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
562
|
+
cells.padding = [1, 2.5]
|
563
|
+
cells.style(border_width: 0)
|
564
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
519
565
|
end
|
520
566
|
end
|
521
567
|
|
522
568
|
def water_distribution
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
["#{d[:waterdistrEq]}", "#{d[:manufacturer]}", "#{d[:brand]}", "#{d[:eqType]}", "#{d[:descr]}", "#{d[:yearManuf]}", "#{d[:remainingEcLife]}", "#{d[:irrAcres]}"]
|
537
|
-
)
|
538
|
-
end
|
569
|
+
distribution_data = [
|
570
|
+
[{content: "Water Distribution System", colspan: 8}],
|
571
|
+
["Water Distrib. Equip.", "Manuf.", "Make/Brand", "Type", "Description", "Yr. Manufactured", "Remaining Ec. Life", "No. Acres Irrigated"]
|
572
|
+
]
|
573
|
+
|
574
|
+
distributions = @rep[:waterdistributions]
|
575
|
+
|
576
|
+
if distributions # node could be nil
|
577
|
+
distributions.each do |d|
|
578
|
+
if d # array could be empty
|
579
|
+
distribution_data.push(
|
580
|
+
["#{d[:waterdistrEq]}", "#{d[:manufacturer]}", "#{d[:brand]}", "#{d[:eqType]}", "#{d[:descr]}", "#{d[:yearManuf]}", "#{d[:remainingEcLife]}", "#{d[:irrAcres]}"]
|
581
|
+
)
|
539
582
|
end
|
540
583
|
end
|
584
|
+
end
|
541
585
|
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
end
|
550
|
-
|
551
|
-
stroke_bounds
|
586
|
+
table(distribution_data) do
|
587
|
+
columns(0..7).width = 67.5
|
588
|
+
columns(0..7).style(font_style: :bold)
|
589
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
590
|
+
cells.padding = [1, 2.5]
|
591
|
+
cells.style(border_width: 0)
|
592
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
552
593
|
end
|
553
594
|
end
|
554
595
|
|
555
596
|
def crop_yield
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
["#{c[:year]}", "#{c[:commodity]}", "#{c[:unit]}", "#{c[:avgyield]}"]
|
570
|
-
)
|
571
|
-
end
|
597
|
+
crops = @rep[:crops]
|
598
|
+
|
599
|
+
crop_data = [
|
600
|
+
[{content: "Crop Yield Summary", colspan: 7}],
|
601
|
+
["Crop Year", "Commodity Identified", "Unit of Measure", "Average Yield", " ", " ", ", "]
|
602
|
+
]
|
603
|
+
|
604
|
+
if crops # node could be nil
|
605
|
+
crops.each do |c|
|
606
|
+
if c # array could be empty
|
607
|
+
crop_data.push(
|
608
|
+
["#{c[:year]}", "#{c[:commodity]}", "#{c[:unit]}", "#{c[:avgyield]}"]
|
609
|
+
)
|
572
610
|
end
|
573
611
|
end
|
612
|
+
end
|
574
613
|
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
end
|
584
|
-
stroke_bounds
|
614
|
+
table(crop_data) do
|
615
|
+
column(0).width = 135
|
616
|
+
columns(1..6).width = 67.5
|
617
|
+
columns(0..6).style(font_style: :bold)
|
618
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
619
|
+
cells.padding = [1, 2.5]
|
620
|
+
cells.style(border_width: 0)
|
621
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
585
622
|
end
|
586
623
|
end
|
587
624
|
|
588
625
|
def estimated_productivity
|
589
|
-
|
590
|
-
estimatedproductivity = @rep[:estimatedproductivity]
|
591
|
-
|
592
|
-
production_data = [
|
593
|
-
[{content: "Estimated Productivity", colspan: 4}],
|
594
|
-
["Commodity Identification", "Unit Measure", "Estimated Yield", " "]
|
595
|
-
]
|
626
|
+
estimatedproductivity = @rep[:estimatedproductivity]
|
596
627
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
)
|
602
|
-
end
|
603
|
-
end
|
628
|
+
production_data = [
|
629
|
+
[{content: "Estimated Productivity", colspan: 4}],
|
630
|
+
["Commodity Identification", "Unit Measure", "Estimated Yield", " "]
|
631
|
+
]
|
604
632
|
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
611
|
-
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
633
|
+
if estimatedproductivity && estimatedproductivity.any?
|
634
|
+
estimatedproductivity.each do |p|
|
635
|
+
production_data.push(
|
636
|
+
["#{p[:commodity]}", "#{p[:unit]}", "#{p[:estmtdyield]}"]
|
637
|
+
)
|
612
638
|
end
|
639
|
+
end
|
613
640
|
|
614
|
-
|
641
|
+
table(production_data) do
|
642
|
+
columns(0..3).width = 135
|
643
|
+
columns(0..3).style(font_style: :bold)
|
644
|
+
cells.padding = [1, 2.5]
|
645
|
+
cells.style(border_width: 0)
|
646
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
647
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
615
648
|
end
|
616
649
|
end
|
617
650
|
|
618
651
|
def perm_plantings
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
)
|
633
|
-
end
|
652
|
+
planting_data = [
|
653
|
+
[{content: "Permanent Plantings", colspan: 8}],
|
654
|
+
["Planting", "Variety", "Ac. Type", "No. of Acres", "Average Age", "Plants/Acre", "Unit Description", "Average Yield"]
|
655
|
+
]
|
656
|
+
|
657
|
+
plantings = @rep[:plantings]
|
658
|
+
|
659
|
+
if plantings # node could be nil
|
660
|
+
plantings.each do |p|
|
661
|
+
if p # array could be empty
|
662
|
+
planting_data.push(
|
663
|
+
["#{p[:planting]}", "#{p[:variety]}", "#{p[:acres]}", "#{p[:numacres]}", "#{p[:avgage]}", "#{p[:plantsacre]}", "#{p[:unitdescr1]}", "#{p[:avgproduction]}"]
|
664
|
+
)
|
634
665
|
end
|
635
666
|
end
|
667
|
+
end
|
636
668
|
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
end
|
645
|
-
|
646
|
-
stroke_bounds
|
669
|
+
table(planting_data) do
|
670
|
+
columns(0..7).width = 67.5
|
671
|
+
columns(0..7).style(font_style: :bold)
|
672
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
673
|
+
cells.padding = [1, 2.5]
|
674
|
+
cells.style(border_width: 0)
|
675
|
+
row(1).style(border_bottom_width: 0.5, font_style: nil)
|
647
676
|
end
|
648
677
|
end
|
649
678
|
|
650
679
|
def externalities
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
cells.padding = [1, 2.5]
|
659
|
-
cells.style(border_width: 0)
|
660
|
-
end
|
661
|
-
|
662
|
-
stroke_bounds
|
680
|
+
extern_data = ReportUtils.conditional_externs_array(@rep) # instance method to populate dynamic array
|
681
|
+
table(extern_data) do
|
682
|
+
columns(0..3).width = 135
|
683
|
+
columns([1, 3]).style(font_style: :bold)
|
684
|
+
row(0).style(align: :center, background_color: 'd7d7d7', font_size: 8, font_style: :bold)
|
685
|
+
cells.padding = [1, 2.5]
|
686
|
+
cells.style(border_width: 0)
|
663
687
|
end
|
664
688
|
end
|
665
689
|
|
@@ -469,7 +469,7 @@ describe 'closed_sale class' do
|
|
469
469
|
water_distribution
|
470
470
|
end
|
471
471
|
page1 = PDF::Reader.new(StringIO.new(@pdf.render)).page(1).to_s
|
472
|
-
page2 = PDF::Reader.new(StringIO.new(@pdf.render)).page(
|
472
|
+
page2 = PDF::Reader.new(StringIO.new(@pdf.render)).page(1).to_s
|
473
473
|
@water_distribution_content = page1 + page2
|
474
474
|
end
|
475
475
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appraisermetrics_report_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StackPoint
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ttfunk
|