caboose-cms 0.6.21 → 0.6.22

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
- YzdkNGFjZTA5YTcyYTEyZTAxNzhjNTk5OGZlNDNlMDFiMGFkODFjYQ==
4
+ NDJlNjMyNDg2NTIwNWRjMTNiZjYxMDFmNDY5NzkxMTc4MzJjOTczZQ==
5
5
  data.tar.gz: !binary |-
6
- OWQwZWYxYjQ0MDI5ZjEyY2EzZTRhNTNjOWI0OWYyNTkwYWFmMmU3Nw==
6
+ NWZlMjMzNDAyMjRlOWY2MzA3MjE0YzYyYzJkMDM1YWQ0NmE2YmU1NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDk3N2FkNWI5ZGEyYjM0ZDI1ZDczOWYzZWMzNDQyOTcyM2FiMTVlOGZmZmE4
10
- MGQxMmI1ZDliOTE3NzM2YmY4OGIxYjJhYWZmMmZkMDVhZWQ5OGZiMTA5ZmYz
11
- YzgwNGJjZjliOWEzMmUxNWVjOWJhOTVlZDVkNDEzNTY5ZjlmZmY=
9
+ NjczMDJhZTc4MGZlOGViYWFjMjg4YTMzYjdiNzcxNzVkYTUwM2FkYTRmYzI2
10
+ YzhiOGE5OGNiYWUzZTA5ZTQwMGU2ZjJhMTZjZTA5YTRhNjM2ZDM2YWEyYWRh
11
+ YTUyNmZmNjAyY2UxN2I1Y2M2Mjk2YzhiMTYyNjg1YjFkZWViMDY=
12
12
  data.tar.gz: !binary |-
13
- OGY2MjcxZDk1YjJjNDcyMWQzYzMzMzZiMzEzNjM3MDZkMzRkYWJkNjBhNzBj
14
- ODQwMjNmMzZiY2Y2NTY2MTJkOTlkYzhhNzJhMjQ1ZTg2NTY2Yzk1MDI0YTUw
15
- MGNlMTlkMTMyMzY0MDU1MjdhZGU2MWNiMzUxNTc4ZGQ3ODczNjA=
13
+ ZjEyNTU2MTE1YjFiMjE0ZmExMDBlNmJjMzIzMTA4M2JkZjc5M2YyOWNhM2Uz
14
+ OTcxNmE4NjNjMjBmNGQ1MWQzNzU3MGU4YjQ0OWFmNGI4YTE3N2E2Y2UwMWM3
15
+ OGQ4MTNiNzM0Nzg2MzA1YzFlNTliYjdlMTFiZTg2NGU1YTljZDM=
@@ -337,6 +337,7 @@ module Caboose
337
337
  order.financial_status = Order::FINANCIAL_STATUS_AUTHORIZED
338
338
  order.status = Order::STATUS_PENDING
339
339
  order.order_number = @site.store_config.next_order_number
340
+ order.date_authorized = DateTime.now.utc
340
341
 
341
342
  # Take funds from any gift cards that were used on the order
342
343
  order.take_gift_card_funds
@@ -84,7 +84,7 @@ module Caboose
84
84
  return if !user_is_allowed('orders', 'edit')
85
85
 
86
86
  order = Order.find(params[:id])
87
- resp = order.capture_funds
87
+ resp = order.capture_funds
88
88
 
89
89
  render :json => resp
90
90
  end
@@ -176,7 +176,11 @@ module Caboose
176
176
  order.custom_discount = value
177
177
  order.discount = order.calculate_discount
178
178
  order.total = order.calculate_total
179
- when 'status' then order.status = value
179
+ when 'status' then
180
+ order.status = value
181
+ if value == 'Shipped'
182
+ order.date_shipped = DateTime.now.utc
183
+ end
180
184
  when 'customer_id' then order.customer_id = value
181
185
  end
182
186
  end
@@ -260,6 +260,11 @@ module Caboose
260
260
  ot.auth_code = response.authorization_code
261
261
  ot.response_code = response.response_code
262
262
  ot.save
263
+
264
+ if ot.success
265
+ self.date_captured = DateTime.now.utc
266
+ self.save
267
+ end
263
268
 
264
269
  self.update_attribute(:financial_status, Order::FINANCIAL_STATUS_CAPTURED)
265
270
  resp.success = 'Captured funds successfully'
@@ -403,6 +403,9 @@ class Caboose::Schema < Caboose::Utilities::Schema
403
403
  [ :notes , :text ],
404
404
  [ :status , :string ],
405
405
  [ :date_created , :datetime ],
406
+ [ :date_authorized , :datetime ],
407
+ [ :date_captured , :datetime ],
408
+ [ :date_shipped , :datetime ],
406
409
  [ :referring_site , :text ],
407
410
  [ :landing_page , :string ],
408
411
  [ :landing_page_ref , :string ],
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.21'
2
+ VERSION = '0.6.22'
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.6.21
4
+ version: 0.6.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry