appraisermetrics_report_service 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0650e5cd5b05c1522335fd89957fade2e5b55dbd
4
- data.tar.gz: a7969f43be28cb1a2e2604e76475f8508faaf92a
3
+ metadata.gz: 3fd92e7b4a236becc82495be48c555dafac68eaa
4
+ data.tar.gz: 2ac74975fbae9952a9e97436f5df0d5d4e57a681
5
5
  SHA512:
6
- metadata.gz: 6b574ae536bec41e8ac581fe250cd2de19930103cf2e339c019cdc72c1e8cb16dc03acf39886a3448f5df54f900a096d0cec76d6e25cd0b3cc7c251077759e2e
7
- data.tar.gz: 1fca25e58c5c9f8ea797fa04e143bec36ca06005467b75e32873f3576dbaad3efb985b90f2302e610bab44562d19b92dab2ca01f4aa335334cce100036009da4
6
+ metadata.gz: 90e7a35b0f564082348ad340479e51b92617e57962f11380aa55da8b1f81624e52f614de75965f85bea8d4c9bce01b6f3206ae06fad64c8bd493b80915dd81cc
7
+ data.tar.gz: c2fa64a42ed4de775070624d9b28c04e04bd9f5ebef53f272f984ec5356ed825dcaeed8288c1eb6be8261ba40fb23238d6b934dece8b5451c474e521159eb834
@@ -1,3 +1,3 @@
1
1
  module AppraisermetricsReportService
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/closed_sale.rb CHANGED
@@ -34,38 +34,47 @@ class ClosedSale < Prawn::Document
34
34
  move_down 5
35
35
  stroke_horizontal_rule
36
36
  move_down 5
37
+
37
38
  float do
38
39
  profile_image
40
+ @image_cursor = cursor
39
41
  end
40
42
 
41
43
  indent(270) do
42
44
  property_type_and_address
43
45
  transaction_summary
46
+ @transaction_cursor = cursor
44
47
  end
45
48
 
46
- move_down 25
47
- stroke_horizontal_rule
48
- move_down 5
49
+ finish_tables(@image_cursor, @transaction_cursor)
50
+
49
51
  float do
50
52
  land_classification
53
+ @land_class_cursor = cursor
51
54
  end
52
55
 
53
56
  indent(270) do
54
57
  physical_overview
58
+ @physical_cursor = cursor
55
59
  end
56
60
 
57
- move_down 15
58
- stroke_horizontal_rule
59
- move_down 5
61
+ finish_tables(@land_class_cursor, @physical_cursor)
62
+
63
+ # stroke this line before potential overunning to next page
64
+ stroke_line [270, 720], [270, 0]
65
+
60
66
  float do
61
67
  cash_flow
68
+ @cash_cursor = cursor
62
69
  end
63
70
 
64
71
  indent(270) do
65
72
  income_expense
73
+ @income_cursor = cursor
66
74
  end
67
75
 
68
- stroke_line [270, 720], [270, 0]
76
+ income_move = @income_cursor - @cash_cursor
77
+ move_down income_move unless income_move < 0
69
78
 
70
79
  if page_count == 1
71
80
  start_new_page
@@ -389,7 +398,7 @@ class ClosedSale < Prawn::Document
389
398
  ["What does this property include?",
390
399
  {content: property_inclusions, colspan: 3}],
391
400
  ["Address:", {content: "#{@rep[:property_address_number]}" + " #{@rep[:street_or_road_name]}", colspan: 3}],
392
- ["City:", "#{@rep[:city]}", "County:", "#{@rep[:county_state]}".slice(0..-3)],
401
+ ["City:", "#{@rep[:city]}", "County:", "#{@rep[:county_state]}".slice(0..-4)],
393
402
  ["State:", "#{@rep[:county_state]}".strip.split('').last(2).join(""), "Zip Code:", "#{@rep[:zip_code]}"],
394
403
  ["Township/Range:", town_range, "Section(s):", "#{@rep[:legal_description]}"],
395
404
  ["Latitude:", lat, "Longitude:", long]
@@ -777,4 +786,12 @@ class ClosedSale < Prawn::Document
777
786
  end
778
787
  end
779
788
 
789
+ def finish_tables(cursor_left, cursor_right)
790
+ # use this method to move a floated cursor down to align two tables
791
+ move_cursor_amount = cursor_right - cursor_left
792
+ move_down move_cursor_amount unless move_cursor_amount < 0
793
+ stroke_horizontal_rule
794
+ move_down 5
795
+ end
796
+
780
797
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appraisermetrics_report_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - StackPoint