caboose-cms 0.9.4 → 0.9.5

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: c32bec44530cdc5f76808682909fd88aaa01f77b
4
- data.tar.gz: 0865c9c5f04a41f8e45dc6a2ace2e0bb3e3f99dc
3
+ metadata.gz: 39c0ca99c970cbe59fe4cb26aaad86381f7c6c0e
4
+ data.tar.gz: f08b1200bd216d91b5e1032314234835affb0706
5
5
  SHA512:
6
- metadata.gz: fda2258243f5930f898dac1e72fb26e2be80805912396d555ca198197f615b53a9f456671f1c657c0ab1862b929a0370c896fef4042afe2d3a84a2ca496d2697
7
- data.tar.gz: fef9a611187d7874093887dc89779f0b7806bd96c7c92e6217d23db93b645144fdb6ee2c7f1ecb4576dccc91a42bbb5b028d4c79de80c0648cc8d88bdce02c09
6
+ metadata.gz: 90d568530d028ed9532ecaa444f22d1b2afc10a04d7901a407cb9923e058286c4231a5dd37174b5a5d370a4688066a50c5a86d93b423b4ba23bb7f8121cff21a
7
+ data.tar.gz: 9d568a38eb7828286baaa896ee3dad1f624d0d1115dc076c2b39286a2738859a0682c889fa2def5ed80ed2f54c6f8286da862d7fd7e6cb226d1d0d0f79d85b16
@@ -114,12 +114,16 @@ module Caboose
114
114
  (sa.state && sa.state.length > 0 ? "#{sa.state} " : '') +
115
115
  (sa.zip && sa.zip.length > 0 ? sa.zip : '') : ''
116
116
 
117
- shipped_to = [
118
- [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => sa_name , :border_width => 0, :width => 200 }],
119
- [{ :content => "Address" , :border_width => 0, :width => 55 },{ :content => sa_address , :border_width => 0, :width => 200 }],
120
- [{ :content => "Email" , :border_width => 0, :width => 55 },{ :content => "#{c.email}" , :border_width => 0, :width => 200 }],
121
- [{ :content => "Phone" , :border_width => 0, :width => 55 },{ :content => "#{self.formatted_phone(c.phone)}" , :border_width => 0, :width => 200 }]
122
- ]
117
+ shipped_to = []
118
+ if invoice.instore_pickup
119
+ shipped_to << [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => "#{c.first_name} #{c.last_name}" , :border_width => 0, :width => 200 }],
120
+ shipped_to << [{ :content => "IN-STORE PICKUP" , :border_width => 0, :width => 255 }],
121
+ else
122
+ shipped_to << [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => sa_name , :border_width => 0, :width => 200 }],
123
+ shipped_to << [{ :content => "Address" , :border_width => 0, :width => 55 },{ :content => sa_address , :border_width => 0, :width => 200 }],
124
+ shipped_to << [{ :content => "Email" , :border_width => 0, :width => 55 },{ :content => "#{c.email}" , :border_width => 0, :width => 200 }],
125
+ shipped_to << [{ :content => "Phone" , :border_width => 0, :width => 55 },{ :content => "#{self.formatted_phone(c.phone)}" , :border_width => 0, :width => 200 }]
126
+ end
123
127
 
124
128
  tbl = []
125
129
  tbl << [
@@ -92,21 +92,26 @@ module Caboose
92
92
  billed_to << [{ :content => "Email" , :border_width => 0 }]
93
93
  billed_to << [{ :content => "Phone" , :border_width => 0 }]
94
94
  end
95
-
96
- sa = invoice.shipping_address
97
- shipped_to = []
98
- shipped_to_name = sa && sa.first_name && sa.first_name.length > 0 ? "#{sa.first_name} #{sa.last_name}" : "#{c.first_name} #{c.last_name}"
99
- shipped_to_address = sa ?
100
- (sa.address1 && sa.address1.length > 0 ? "#{sa.address1}\n" : '') +
101
- (sa.address2 && sa.address2.length > 0 ? "#{sa.address2}\n" : '') +
102
- (sa.city && sa.city.length > 0 ? "#{sa.city}, " : '') +
103
- (sa.state && sa.state.length > 0 ? "#{sa.state} " : '') +
104
- (sa.zip && sa.zip.length > 0 ? sa.zip : '') : ''
105
95
 
106
- shipped_to << [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => shipped_to_name , :border_width => 0, :width => 200 }]
107
- shipped_to << [{ :content => "Address" , :border_width => 0, :width => 55 },{ :content => shipped_to_address , :border_width => 0, :width => 200 }]
108
- shipped_to << [{ :content => "Email" , :border_width => 0, :width => 55 },{ :content => "#{c.email}" , :border_width => 0, :width => 200 }]
109
- shipped_to << [{ :content => "Phone" , :border_width => 0, :width => 55 },{ :content => "#{self.formatted_phone(c.phone)}" , :border_width => 0, :width => 200 }]
96
+ shipped_to = []
97
+ if invoice.instore_pickup
98
+ shipped_to << [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => "#{c.first_name} #{c.last_name}" , :border_width => 0, :width => 200 }]
99
+ shipped_to << [{ :content => "IN-STORE PICKUP" , :border_width => 0, :width => 255 , :colspan => 2 }]
100
+ else
101
+ sa = invoice.shipping_address
102
+ shipped_to_name = sa && sa.first_name && sa.first_name.length > 0 ? "#{sa.first_name} #{sa.last_name}" : "#{c.first_name} #{c.last_name}"
103
+ shipped_to_address = sa ?
104
+ (sa.address1 && sa.address1.length > 0 ? "#{sa.address1}\n" : '') +
105
+ (sa.address2 && sa.address2.length > 0 ? "#{sa.address2}\n" : '') +
106
+ (sa.city && sa.city.length > 0 ? "#{sa.city}, " : '') +
107
+ (sa.state && sa.state.length > 0 ? "#{sa.state} " : '') +
108
+ (sa.zip && sa.zip.length > 0 ? sa.zip : '') : ''
109
+
110
+ shipped_to << [{ :content => "Name" , :border_width => 0, :width => 55 },{ :content => shipped_to_name , :border_width => 0, :width => 200 }]
111
+ shipped_to << [{ :content => "Address" , :border_width => 0, :width => 55 },{ :content => shipped_to_address , :border_width => 0, :width => 200 }]
112
+ shipped_to << [{ :content => "Email" , :border_width => 0, :width => 55 },{ :content => "#{c.email}" , :border_width => 0, :width => 200 }]
113
+ shipped_to << [{ :content => "Phone" , :border_width => 0, :width => 55 },{ :content => "#{self.formatted_phone(c.phone)}" , :border_width => 0, :width => 200 }]
114
+ end
110
115
 
111
116
  tbl = []
112
117
  tbl << [
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.4'
2
+ VERSION = '0.9.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry