appraisermetrics_report_service 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9385e6a2d1ca85fcc7fa5e78ee053a2cac6e50d
4
- data.tar.gz: 9eee868cddc4cd210c87ae7cdbc5e2393c2d9184
3
+ metadata.gz: 09dd29578dabefda5b55fa77f554dd878f237f73
4
+ data.tar.gz: 2869474ea422a2a71f2f3f654e4552f0c50c2e1e
5
5
  SHA512:
6
- metadata.gz: 3f5ab83e829fa41988cda92e0e3d68c69f532f36b858140a16a7e3e9b7425c66313d7956f7cf16a68315be82b1db6842f1cce02e2407ac0a26c80e3ed0071bab
7
- data.tar.gz: 8b94ddabc8645c7780126766d767963ef13b5d56afc8761b1104e725df43c46e7f14f01fc0328cda8fef0b69923fb811971071873d8ee948947d16a93f42f343
6
+ metadata.gz: 3f6a1bef787ac0fda2136fe2a63532bc4e1c2d53166ea230ac8dba0de79424f63616812339812d58c57529f6aa4e0ec8a4e2f084d4bcf4a6b7c217fdb4592faf
7
+ data.tar.gz: 48bb9b5fa69b9e7d16f425ddea718b0e1bb7015a209c446aa78087f1b26f96eb57fba86edb6a3606593bdd6e1afb039dfa7c54f56f585315f6bde1b841743577
@@ -1,3 +1,3 @@
1
1
  module AppraisermetricsReportService
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/eval_report.rb CHANGED
@@ -127,9 +127,10 @@ class EvalReport < Prawn::Document
127
127
  if taxes && taxes.any?
128
128
  t_s = taxes.inject("") {|memo_s, t| memo_s << "#{t[:tax_parcel_no]}, "; memo_s }
129
129
  else
130
- t_s = ""
130
+ t_s = " "
131
131
  end
132
132
 
133
+
133
134
  parallel_text("Evaluation of Real Property", " ", 150)
134
135
  parallel_text("Property Type:", "#{@sub[:primary_ag_use]}", 150)
135
136
  parallel_text("Property Name:", "#{@sub[:property_name]}", 150)
@@ -401,7 +402,7 @@ class EvalReport < Prawn::Document
401
402
  # construction of combo strings
402
403
  street_address = "#{@sub[:property_address_number]} " << "#{@sub[:street_or_road_name]}"
403
404
  lat_long_string = ""
404
- lat_long_string << "#{@sub[:position][0]}/#{@sub[:position][1]}" unless @sub[:positioin] == nil
405
+ lat_long_string << "#{@sub[:position][0]}/#{@sub[:position][1]}" unless @sub[:position] == nil
405
406
  meridian_town_range = "#{@sub[:meridian]}, " << "#{@sub[:township]} " << "#{@sub[:range]}"
406
407
 
407
408
  taxes = @sub[:taxes]
@@ -544,7 +545,7 @@ class EvalReport < Prawn::Document
544
545
 
545
546
  # conditional strings
546
547
  is_encumbered = @sub[:occupancy] == "leased" || @sub[:occupancy] == "partially leased" ? "Yes" : "No"
547
- end_of_lease = @sub[:lease_data] && @sub[:lease_data].any? ? @sub[:lease_data][0][:endLeaseDate] : "NA"
548
+ end_of_lease = @sub[:lease_data] && @sub[:lease_data].any? ? datemaker(@sub[:lease_data][0][:endLeaseDate]) : "NA"
548
549
 
549
550
  if @sub[:inclusions]
550
551
  has_improvs = (@sub[:inclusions] & ["Improved with non-Ag Use Improvements",
@@ -995,6 +996,7 @@ class EvalReport < Prawn::Document
995
996
  pdf_doc_proc.call(:buildingschematics, "BUILDING SCHEMATICS")
996
997
  pdf_doc_proc.call(:irrigationschematics, "IRRIGATION SCHEMATICS")
997
998
  pdf_doc_proc.call(:irrigationequipment, "IRRIGATION/PUMPING EQUIPMENT INVENTORY")
999
+ pdf_doc_proc.call(:waterrights, "WATER RIGHTS")
998
1000
  pdf_doc_proc.call(:cropcontracts, "CROP CONTRACTS")
999
1001
  pdf_doc_proc.call(:cropinsurancehistory, "CROP INSURANCE HISTORY")
1000
1002
  pdf_doc_proc.call(:timbercruise, "TIMBER CRUISE")
@@ -1057,28 +1059,29 @@ class EvalReport < Prawn::Document
1057
1059
 
1058
1060
  final_a[3].push(t_s) # tax parcels
1059
1061
  final_a[4].push("#{p[:property_address_number]} " << "#{p[:street_or_road_name]}") # address
1060
- final_a[5].push(p[:city]) # city
1062
+ final_a[5].push("#{p[:city]}") # city
1061
1063
  final_a[6].push("#{p[:county_state]}".slice(-2..-1)) # state
1062
- final_a[7].push(p[:zip_code]) # zip
1064
+ final_a[7].push("#{p[:zip_code]}") # zip
1063
1065
  final_a[8].push(datemaker(p[:sale_date])) # sale date
1064
1066
  final_a[9].push(moneymaker(p[:sale_price],false)) # sale price
1065
1067
  final_a[10].push(moneymaker(p[:sale_adjustment],false)) # conditions of sale
1066
1068
  final_a[11].push(moneymaker(p[:cesaleprice],false)) # adjusted sale price
1067
- final_a[12].push(p[:property_rights]) # property rights conveyed
1068
- final_a[13].push(p[:unit]) # unit of comparison
1069
+ final_a[12].push("#{p[:property_rights]}") # property rights conveyed
1070
+ final_a[13].push("#{p[:unit]}") # unit of comparison
1069
1071
  final_a[14].push(moneymaker(p[:cesaleunitprice],false)) # price/unit
1070
- final_a[15].push(p[:num_of_units]) # total acres
1071
- final_a[16].push(p[:primary_ag_use]) # primary land use
1072
+ final_a[15].push("#{p[:num_of_units]}") # total acres
1073
+ final_a[16].push("#{p[:primary_ag_use]}") # primary land use
1072
1074
 
1073
1075
  if p[:landclassifications] && p[:landclassifications].any?
1074
1076
  units_primary = p[:landclassifications][0][:numacres]
1075
- units_secondary = p[:landclassifications][1][:numacres]
1076
1077
 
1077
1078
  per_acre_string = moneymaker(p[:landclassifications][0][:priceperacre], false)
1078
1079
 
1079
1080
  if p[:landclassifications][1]
1080
1081
  secondary_per_acre = moneymaker(p[:landclassifications][1][:priceperacre], false)
1082
+ units_secondary = p[:landclassifications][1][:numacres]
1081
1083
  else
1084
+ units_secondary = 0
1082
1085
  secondary_per_acre = 0
1083
1086
  end
1084
1087
  else
data/lib/report_utils.rb CHANGED
@@ -52,7 +52,11 @@ module ReportUtils
52
52
  end
53
53
 
54
54
  indent(indent_distance) do
55
- text dyn
55
+ if !dyn || dyn.empty?
56
+ text " "
57
+ else
58
+ text dyn
59
+ end
56
60
  end
57
61
  end
58
62
  module_function :parallel_text
@@ -68,6 +68,7 @@ class Sampler
68
68
  buildingschematics: ['./spec/test_data/pdfs/optional_doc.pdf'],
69
69
  irrigationschematics: ['./spec/test_data/pdfs/optional_doc.pdf'],
70
70
  irrigationequipment: ['./spec/test_data/pdfs/optional_doc.pdf'],
71
+ waterrights: ['./spec/test_data/pdfs/optional_doc.pdf'],
71
72
  cropcontracts: ['./spec/test_data/pdfs/optional_doc.pdf'],
72
73
  cropinsurancehistory: ['./spec/test_data/pdfs/optional_doc.pdf'],
73
74
  timbercruise: ['./spec/test_data/pdfs/optional_doc.pdf'],
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.9
4
+ version: 0.1.0
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-12 00:00:00.000000000 Z
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ttfunk