caboose-store 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTlhYWY2MDc3YjY0YmYyZGE3YTBjODRjNDUxNzI2OTY1OGJmZmRjNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWQ2Y2I1NmJkZTU4YzJmYjM2MzAwOTllMzQ4MDcwZTA4Yzg4Yzg1Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjVkYWY1MDM0YjI4MDEzZWU1NTBiZjEzNGMwMGI3YjhlOGUxYTM3YzZhOGUw
|
10
|
+
ZWM5MzU3YTVjNDA1NDM3OTVjOWM1OWMzZTYyYmQ0YTFhNzI4MjJiZTZmNGM0
|
11
|
+
OGNmMWExNWMzYmVmM2NlYjQ1MzFlMjZmODc4NWJkMzJmMzJjNGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzQ3MWQ5ODczNTYwYmIwM2U4OTAwYzAzMjc4ODM2MDlmZTMzMjg2YjM1Yjk3
|
14
|
+
YjQzN2IwMzRlZjY3NmM3NDU5OTAzMTc2MzI2ZGIzMzEzNTI4ZWY4ZTJiZjhj
|
15
|
+
MDc2MWYzOGFlNzQ5YWE0ZjVkYTA2ODlkMjY2NTJhNWVlZjExYWE=
|
@@ -182,6 +182,10 @@ module CabooseStore
|
|
182
182
|
def calculate_total
|
183
183
|
[self.subtotal, self.tax, self.shipping, self.handling].compact.inject { |sum, price| sum + price }
|
184
184
|
end
|
185
|
+
|
186
|
+
def shipping_and_handling
|
187
|
+
(self.shipping ? self.shipping : 0.0) + (self.handling ? self.handling : 0.0)
|
188
|
+
end
|
185
189
|
end
|
186
190
|
end
|
187
191
|
|
@@ -53,8 +53,7 @@ module CabooseStore
|
|
53
53
|
{ :content => "Item" , :align => :center, :valign => :bottom },
|
54
54
|
{ :content => "Tracking Number" , :align => :center, :valign => :bottom },
|
55
55
|
{ :content => "Unit Price" , :align => :center, :valign => :bottom },
|
56
|
-
{ :content => "
|
57
|
-
{ :content => "Qty Shipped" , :align => :center, :valign => :bottom },
|
56
|
+
{ :content => "Quantity" , :align => :center, :valign => :bottom },
|
58
57
|
{ :content => "Subtotal" , :align => :center, :valign => :bottom, :width => 60 }
|
59
58
|
]
|
60
59
|
|
@@ -63,16 +62,15 @@ module CabooseStore
|
|
63
62
|
"#{li.variant.product.title}\n#{li.variant.sku}\n#{li.variant.title}",
|
64
63
|
{ :content => li.tracking_number },
|
65
64
|
{ :content => sprintf("%.2f", li.variant.price) , :align => :right },
|
66
|
-
{ :content => "#{li.quantity}" , :align => :right },
|
67
|
-
{ :content => "#{li.quantity_shipped}" , :align => :right },
|
65
|
+
{ :content => "#{li.quantity}" , :align => :right },
|
68
66
|
{ :content => sprintf("%.2f", li.subtotal) , :align => :right }
|
69
67
|
]
|
70
68
|
end
|
71
|
-
tbl << [{ :content => "Subtotal" , :colspan =>
|
72
|
-
tbl << [{ :content => "Tax" , :colspan =>
|
73
|
-
tbl << [{ :content => "#{order.shipping_method} Shipping & Handling" , :colspan =>
|
74
|
-
tbl << [{ :content => "Discount" , :colspan =>
|
75
|
-
tbl << [{ :content => "Total" , :colspan =>
|
69
|
+
tbl << [{ :content => "Subtotal" , :colspan => 4, :align => :right }, { :content => sprintf("%.2f", order.subtotal ) , :align => :right }]
|
70
|
+
tbl << [{ :content => "Tax" , :colspan => 4, :align => :right }, { :content => sprintf("%.2f", order.tax ? order.tax : 0.0 ) , :align => :right }]
|
71
|
+
tbl << [{ :content => "#{order.shipping_method} Shipping & Handling" , :colspan => 4, :align => :right }, { :content => sprintf("%.2f", order.shipping_and_handling ) , :align => :right }]
|
72
|
+
tbl << [{ :content => "Discount" , :colspan => 4, :align => :right }, { :content => sprintf("%.2f", order.discount ? order.discount : 0.0 ) , :align => :right }]
|
73
|
+
tbl << [{ :content => "Total" , :colspan => 4, :align => :right }, { :content => sprintf("%.2f", order.total ) , :align => :right }]
|
76
74
|
|
77
75
|
table tbl
|
78
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caboose-cms
|