caboose-cms 0.5.137 → 0.5.138

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
- YmUwYjU0OGY4YjY2MTQzNDQwMGFkNjE3ZjIzMDk0NDIxN2E2M2IyMg==
4
+ MmE0ZDk4ZDA0N2U5Y2IzM2U2Yjc2ZGFhZDJhN2E1YmU3NmUyODY4MA==
5
5
  data.tar.gz: !binary |-
6
- YWQwNDA0OGYxY2YxYWNhZTU5MmEyMjljMGJhNDM5MDk0YjI4NjllZA==
6
+ YTBhZTlkYzBlOWEwOGI5ZmY3Y2ZmODllOWEzY2UyNDBmZjg0MDljNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDE2MzRlZGQwMzEzZDNlZTBhN2NlZTY4MjlhMWQ4OTUzOWQ0NzI0OTkzYzQx
10
- YWNlOTlhN2E5ZWU5ZTI4NDQ2MjMwMzMyYWFiNDJjYmI4ZjQwMDJmOTZjZDFi
11
- NTE2YmJjMGNjZDBjOTFkNzIzYjhlYjM0MGQzMjY2Yzg3NGU0MDA=
9
+ MjQ4MTY2YmRjNGMyMjhkZTBhZDc4YzgwMWIwOGZjODkxZThlMDI3NTJmYWE1
10
+ MmIwY2JkNTczMTcxYWE5YmZmODM2MzM5MTQzY2U0ZmI2MTk3NTBhZDJlNTA0
11
+ YjdiZGM3MDBkMzliMDNhZTBjZWY2NWMxOGJlOWJkOWZhNmE5YTM=
12
12
  data.tar.gz: !binary |-
13
- YmRmZTVkNzVmZDMzZGIzZmRkYTAzYmU0YmQ5OTVhMGVkZGY2ZmY2ZmE2NTEz
14
- YTU0YTA1YWQ0NDA3NTlkNGQ4NmY4OWE1ODU1OWIxY2ZlNWQ0YjY0ZmFmNzFj
15
- MDEwYzc2YjkzNjE4ZmJkYTZlYzAyOWI1OTAxOTRiYWQ1N2U4YTA=
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" , :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, :font_style => :bold, :align => :right }, { :content => "$" + sprintf("%.2f", order.total ) , :align => :right, :font_style => :bold }]
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) , :align => :right },
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
  ]
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.137'
2
+ VERSION = '0.5.138'
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.5.137
4
+ version: 0.5.138
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry