effective_orders 5.1.10 → 5.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/datatables/admin/effective_orders_datatable.rb +4 -2
- data/app/datatables/effective_orders_datatable.rb +5 -2
- data/app/mailers/effective/orders_mailer.rb +1 -1
- data/app/models/effective/order.rb +22 -6
- data/app/views/admin/orders/_datatable_actions.html.haml +1 -1
- data/app/views/effective/orders/_order_items.html.haml +1 -6
- data/app/views/effective/orders/mark_as_paid/_form.html.haml +1 -4
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ea7a1a4554f56dd9230c6d1f4c4c00ae6884fb3d61508c1c437464a9106065b
|
4
|
+
data.tar.gz: 846428fc00eae462dbf46f128b777ec32d22ed8f47415d0b411de9922a39dee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6bcd2880d585a48f68785e62f0b44e52627b68d42e1764ec642bccef8de36810314876bd26b9a24ca0216c2609fb8b8c11649d8c0b63f605f341dcf90c04444
|
7
|
+
data.tar.gz: cf6eced1338c660b98d2e75eca61b645899fcc6888772cef8c4184d07296ef7e3a684a8ed22c2a19231eb42d737305e0da1fcb74357a13138a8eb52f68d1813a
|
@@ -17,8 +17,10 @@ class Admin::EffectiveOrdersDatatable < Effective::Datatable
|
|
17
17
|
unless attributes[:skip_filters]
|
18
18
|
scope :all
|
19
19
|
scope :purchased
|
20
|
-
|
21
|
-
scope :
|
20
|
+
|
21
|
+
scope :deferred if EffectiveOrders.deferred_providers.present?
|
22
|
+
scope :refunds if EffectiveOrders.refund
|
23
|
+
|
22
24
|
scope :not_purchased
|
23
25
|
end
|
24
26
|
end
|
@@ -4,8 +4,11 @@ class EffectiveOrdersDatatable < Effective::Datatable
|
|
4
4
|
filters do
|
5
5
|
unless attributes[:not_purchased]
|
6
6
|
scope :purchased, default: true
|
7
|
-
|
8
|
-
scope :
|
7
|
+
|
8
|
+
scope :deferred if EffectiveOrders.deferred_providers.present?
|
9
|
+
scope :refunds if EffectiveOrders.refund
|
10
|
+
|
11
|
+
scope :all
|
9
12
|
end
|
10
13
|
end
|
11
14
|
|
@@ -43,7 +43,7 @@ module Effective
|
|
43
43
|
@order = (order_param.kind_of?(Effective::Order) ? order_param : Effective::Order.find(order_param))
|
44
44
|
@user = @order.user
|
45
45
|
|
46
|
-
@subject = subject_for(@order, :payment_request_to_buyer, "
|
46
|
+
@subject = subject_for(@order, :payment_request_to_buyer, "Payment request - Order ##{@order.to_param}")
|
47
47
|
|
48
48
|
mail({to: @order.email, cc: @order.cc, subject: @subject}.compact)
|
49
49
|
end
|
@@ -265,14 +265,30 @@ module Effective
|
|
265
265
|
end
|
266
266
|
|
267
267
|
def label
|
268
|
-
if refund?
|
269
|
-
|
268
|
+
if refund? && purchased?
|
269
|
+
'Refund'
|
270
270
|
elsif purchased?
|
271
|
-
|
272
|
-
elsif pending?
|
273
|
-
|
271
|
+
'Receipt'
|
272
|
+
elsif refund? && (pending? || confirmed?)
|
273
|
+
'Pending Refund'
|
274
|
+
elsif (pending? || confirmed?)
|
275
|
+
'Pending Order'
|
274
276
|
else
|
275
|
-
|
277
|
+
'Order'
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
def total_label
|
282
|
+
if refund? && purchased?
|
283
|
+
'Total Paid'
|
284
|
+
elsif purchased?
|
285
|
+
'Total Paid'
|
286
|
+
elsif refund? && (pending? || confirmed?)
|
287
|
+
'Total Due'
|
288
|
+
elsif (pending? || confirmed?)
|
289
|
+
'Total Due'
|
290
|
+
else
|
291
|
+
'Total'
|
276
292
|
end
|
277
293
|
end
|
278
294
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
- if order.purchased?
|
8
8
|
= dropdown_link_to 'Email receipt to buyer', effective_orders.send_buyer_receipt_order_path(order),
|
9
|
-
data: { confirm: "Send receipt to #{order.emails_send_to}?" }
|
9
|
+
data: { method: :post, confirm: "Send receipt to #{order.emails_send_to}?" }
|
10
10
|
|
11
11
|
- if order.pending? || order.confirmed? || order.deferred?
|
12
12
|
= dropdown_link_to 'Email request for payment to buyer', effective_orders.send_payment_request_admin_order_path(order),
|
@@ -5,10 +5,7 @@
|
|
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
|
-
|
9
|
-
= f.hidden_field :purchased_at, value: Time.zone.now
|
10
|
-
- else
|
11
|
-
= f.date_field :purchased_at, required: true
|
8
|
+
= f.hidden_field :purchased_at, value: Time.zone.now
|
12
9
|
|
13
10
|
= f.select :payment_provider, EffectiveOrders.payment_providers, required: true
|
14
11
|
|
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.1.
|
4
|
+
version: 5.1.14
|
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: 2021-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|