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 +4 -4
- data/app/models/caboose/invoice_pdf.rb +10 -6
- data/app/models/caboose/pending_invoices_pdf.rb +19 -14
- data/lib/caboose/version.rb +1 -1
- 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: 39c0ca99c970cbe59fe4cb26aaad86381f7c6c0e
|
4
|
+
data.tar.gz: f08b1200bd216d91b5e1032314234835affb0706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
119
|
-
[{ :content => "
|
120
|
-
[{ :content => "
|
121
|
-
|
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
|
107
|
-
|
108
|
-
|
109
|
-
|
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 << [
|
data/lib/caboose/version.rb
CHANGED