caboose-cms 0.5.137 → 0.5.138
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmE0ZDk4ZDA0N2U5Y2IzM2U2Yjc2ZGFhZDJhN2E1YmU3NmUyODY4MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTBhZTlkYzBlOWEwOGI5ZmY3Y2ZmODllOWEzY2UyNDBmZjg0MDljNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjQ4MTY2YmRjNGMyMjhkZTBhZDc4YzgwMWIwOGZjODkxZThlMDI3NTJmYWE1
|
10
|
+
MmIwY2JkNTczMTcxYWE5YmZmODM2MzM5MTQzY2U0ZmI2MTk3NTBhZDJlNTA0
|
11
|
+
YjdiZGM3MDBkMzliMDNhZTBjZWY2NWMxOGJlOWJkOWZhNmE5YTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjBlZGVkZTM3OTE1NWZjOTc1YTZjMTY1MzEzZmQ3N2M3NThkNjM2NjcxNTVk
|
14
|
+
N2M1MTkzMGVmYjhjZTQ3MTg0YmFkMDUyMDg5MDMzMDk3YmQ0OWFhMjZiZTEw
|
15
|
+
NjhiMzRkZjE4YTAwMDNjM2ZiNDgzOGQyYzg4MzI0NmI2M2RlNjg=
|
@@ -215,7 +215,7 @@ module Caboose
|
|
215
215
|
return if !user_is_allowed('orders', 'edit')
|
216
216
|
|
217
217
|
pdf = PendingOrdersPdf.new
|
218
|
-
pdf.orders = Order.where(:status => Order::STATUS_PENDING).all
|
218
|
+
pdf.orders = Order.where(:site_id => @site.id, :status => Order::STATUS_PENDING).all
|
219
219
|
send_data pdf.to_pdf, :filename => "pending_orders.pdf", :type => "application/pdf", :disposition => "inline"
|
220
220
|
end
|
221
221
|
|
@@ -196,11 +196,11 @@ module Caboose
|
|
196
196
|
tbl << arr
|
197
197
|
end
|
198
198
|
|
199
|
-
tbl << [{ :content => "Subtotal"
|
200
|
-
tbl << [{ :content => "Discount"
|
201
|
-
tbl << [{ :content => "Shipping and Handling Charges" , :colspan => 6, :align => :right
|
202
|
-
tbl << [{ :content => "Sales Tax"
|
203
|
-
tbl << [{ :content => "Grand Total"
|
199
|
+
tbl << [{ :content => "Subtotal" , :colspan => 6, :align => :right }, { :content => "$" + sprintf("%.2f", order.subtotal ) , :align => :right }]
|
200
|
+
tbl << [{ :content => "Discount" , :colspan => 6, :align => :right }, { :content => "(-) $" + sprintf("%.2f", order.discount ? order.discount : 0.0 ) , :align => :right }]
|
201
|
+
tbl << [{ :content => "Shipping and Handling Charges" , :colspan => 6, :align => :right }, { :content => "(+) $" + sprintf("%.2f", order.shipping_and_handling ) , :align => :right }]
|
202
|
+
tbl << [{ :content => "Sales Tax" , :colspan => 6, :align => :right }, { :content => "(+) $" + sprintf("%.2f", order.tax ? order.tax : 0.0 ) , :align => :right }]
|
203
|
+
tbl << [{ :content => "Grand Total" , :colspan => 6, :align => :right, :font_style => :bold }, { :content => "$" + sprintf("%.2f", order.total ) , :align => :right, :font_style => :bold }]
|
204
204
|
|
205
205
|
table tbl , :position => 7, :width => 530
|
206
206
|
end
|
@@ -9,7 +9,7 @@ module Caboose
|
|
9
9
|
def to_pdf
|
10
10
|
#image open("https://dmwwflw4i3miv.cloudfront.net/logo.png"), :position => :center
|
11
11
|
text " "
|
12
|
-
self.orders.each_with_index do |o, i|
|
12
|
+
self.orders.each_with_index do |o, i|
|
13
13
|
start_new_page if i > 0
|
14
14
|
self.order = o
|
15
15
|
customer_info
|
@@ -66,7 +66,7 @@ module Caboose
|
|
66
66
|
tbl << [
|
67
67
|
"#{li.variant.product.title}\n#{li.variant.sku}\n#{li.variant.title}",
|
68
68
|
{ :content => li.tracking_number },
|
69
|
-
{ :content => sprintf("%.2f", li.unit_price)
|
69
|
+
{ :content => sprintf("%.2f", li.unit_price) , :align => :right },
|
70
70
|
{ :content => "#{li.quantity}" , :align => :right },
|
71
71
|
{ :content => sprintf("%.2f", li.subtotal) , :align => :right }
|
72
72
|
]
|
data/lib/caboose/version.rb
CHANGED