effective_orders 5.8.0 → 5.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ef5017c01d659fbcc95d0f7b69568175c7bbe76540b2d57ec6f0ea6ac87d44d
4
- data.tar.gz: 570d1894364ff47516f213d9fa29b139597c8f702de4da8277857eac9fe8140a
3
+ metadata.gz: 88341609720b1eea6a41fbe9aef2556b14791e12072e195f966d17460355d26d
4
+ data.tar.gz: dcb1636b46c9b788a925e36708f6d1aebb433424eaac25657773bc4e04aba6e4
5
5
  SHA512:
6
- metadata.gz: 66297faebffcc406116d3bb394a5572e5127796bd34bbaabb7832785061280bd0e6fd4e06b3509013ab98f6c3a88a47c36eec27e12f20b6859970d5f7dc18a55
7
- data.tar.gz: 92dc17259f946aa1ff2d49521e40ab2db17f0d6888f52ff6d7567ded95f6d022532f13959b408bbe9ccfb905066fe05adcee2919e2063684da43ce3fe2965233
6
+ metadata.gz: b23cfd1c483fae1ed2387ce838b8cace69bbde2c925bb97057c4e1b58836f0f50b65b2e523de335ff856295b49125c5e68ddf93f9a0eb159a2728e4dd48d8550
7
+ data.tar.gz: 8db2613a663b3ed0fb929f717ba95a04470fdbbe1d836823650c6294e4d7f0021922b62a8ed0afa3a2da9dc8f35517ec4708041d40d567c16a44ac3f261b75f4
@@ -65,6 +65,8 @@ module ActsAsPurchasable
65
65
  super
66
66
  elsif value.kind_of?(String) && !value.include?('.') # Looks like an integer
67
67
  super
68
+ elsif value.blank?
69
+ super
68
70
  else
69
71
  raise 'expected price to be an Integer representing the number of cents.'
70
72
  end
@@ -524,7 +524,7 @@ module Effective
524
524
 
525
525
  payment_provider: provider,
526
526
  payment_card: (card.presence || 'none'),
527
- purchased_at: Time.zone.now,
527
+ purchased_at: (purchased_at.presence || Time.zone.now),
528
528
  payment: payment_to_h(payment)
529
529
  )
530
530
 
@@ -5,17 +5,19 @@
5
5
  = order.refund? ? 'Complete Refund' : 'Mark as Paid'
6
6
 
7
7
  = effective_form_with(model: order, url: effective_orders.mark_as_paid_order_path(order), method: :post) do |f|
8
- = f.hidden_field :purchased_at, value: Time.zone.now
8
+ .row
9
+ .col-6
10
+ = f.select :payment_provider, EffectiveOrders.admin_payment_providers, required: true
9
11
 
10
- = f.select :payment_provider, EffectiveOrders.admin_payment_providers, required: true
12
+ = f.text_field :payment_card,
13
+ label: 'Payment card type, cheque, e-transfer or transaction number',
14
+ hint: 'Do not enter credit card numbers here, or anywhere.'
11
15
 
12
- = f.text_field :payment_card,
13
- label: 'Payment card type, cheque, e-transfer or transaction number',
14
- hint: 'Do not enter credit card numbers here, or anywhere.'
16
+ = f.datetime_field :purchased_at
15
17
 
16
- = f.check_box :send_mark_as_paid_email_to_buyer,
17
- label: 'Yes, send a receipt email to the buyer.',
18
- input_html: { checked: (f.object.send_mark_as_paid_email_to_buyer.nil? ? EffectiveOrders.send_order_receipts_when_mark_as_paid : f.object.send_mark_as_paid_email_to_buyer?) }
18
+ = f.check_box :send_mark_as_paid_email_to_buyer,
19
+ label: 'Yes, send a receipt email to the buyer.',
20
+ input_html: { checked: (f.object.send_mark_as_paid_email_to_buyer.nil? ? EffectiveOrders.send_order_receipts_when_mark_as_paid : f.object.send_mark_as_paid_email_to_buyer?) }
19
21
 
20
22
  .row
21
23
  .col
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '5.8.0'.freeze
2
+ VERSION = '5.8.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.0
4
+ version: 5.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2022-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails