effective_orders 5.1.11 → 5.1.12

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: d4ceb232058ad48722e375f9ada63ee99219ca2c6e4171ebc4be851dc5218518
4
- data.tar.gz: a7ec1aabca5e20e22d834a6d9bca6a3efc277f2b2aabc03f888d274145fbaa80
3
+ metadata.gz: 436e77b078b12d2931ad0bf50e1f8572bfb6dca3cc7b021e0a867660ddd327c2
4
+ data.tar.gz: 128a0aece9b52ec31d4e5ff31ddd6a66f5179aeb7078542a5a5561d662745ebd
5
5
  SHA512:
6
- metadata.gz: d04a7b6902627945ecfae1c56b2133a3dba96b586a6f8eea8b61327de03c84c6e6cddbd374eff1b21d0030625014c5ab0471fb96ea7a37058373853d5be189c4
7
- data.tar.gz: 95d763d0f61864d12fc6fde4a27f884af573ac218ea0f4947f7c00e8410308c6fd42d996519eb4b5872d19d79c67ca6ce68c5be1316468be451cf96a5f721213
6
+ metadata.gz: 9b567e4f3078270590a92a12c4f27326a9c525b30e3ec8b2ed9ab31bc7d34f48b0fbab6a9ba0be8d00da8fd132b5d8032072b58e8c20da74f1e9b4017601b848
7
+ data.tar.gz: 0127161fde74a4fb97aec8c54ade566fed751e5bfd49f9d694b6a18d64d27bdd020a4106399c11121f1a661e9f127c56368a3771c977586cdf55b542147ffa5e
@@ -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, "Request for Payment: Invoice ##{@order.to_param}")
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
- "Refund"
268
+ if refund? && purchased?
269
+ 'Refund'
270
270
  elsif purchased?
271
- "Receipt"
272
- elsif pending?
273
- "Pending Order"
271
+ 'Receipt'
272
+ elsif refund? && (pending? || confirmed?)
273
+ 'Pending Refund'
274
+ elsif (pending? || confirmed?)
275
+ 'Pending Order'
274
276
  else
275
- "Order"
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
 
@@ -62,11 +62,6 @@
62
62
  %th.download
63
63
 
64
64
  %th.total
65
- - if order.pending?
66
- Amount Due
67
- - elsif order.purchased?
68
- Amount Paid
69
- - else
70
- Total
65
+ = order.total_label
71
66
 
72
67
  %td.price.total-price= price_to_currency(order.total)
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '5.1.11'.freeze
2
+ VERSION = '5.1.12'.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.1.11
4
+ version: 5.1.12
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-09-27 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails