effective_orders 6.19.4 → 6.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/admin/orders/_order_item_fields.html.haml +3 -2
- data/app/views/effective/acts_as_purchasable/_fields.html.haml +4 -1
- data/app/views/effective/orders/_order_items.html.haml +3 -3
- data/config/effective_orders.rb +6 -0
- data/lib/effective_orders/version.rb +1 -1
- data/lib/effective_orders.rb +11 -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: 513c8a72e878c9dc57f3feb8193de60341a3d6ff69a9e46edf235de143e91e0d
|
|
4
|
+
data.tar.gz: 880e590304b082be4cb04f4318770cb631a9ef382b9827fff41905a2b91bfa28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d51b4ea5de0a9916f9bda4dfb0b183da10b288fea73aef2cb80d4d8c494019c048be543d8b2f24babef91e239d1ed4ba237a3dfdf14038b2e11e9af4ec80b1b3
|
|
7
|
+
data.tar.gz: 17fcaea9ffc48cff3988450b9d74eff84641bf63dfb1395a4ba090affc56c69f41dafacae411e53950f954cca293e6b83f65cfc2987c66aa40fc92cd8deacef3
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
.col= pf.price_field :price
|
|
15
15
|
|
|
16
|
-
.
|
|
17
|
-
.
|
|
16
|
+
- if EffectiveOrders.use_item_names?
|
|
17
|
+
.col
|
|
18
|
+
.mt-4= qb_item_name_field(pf)
|
|
18
19
|
|
|
19
20
|
.col= pf.check_box :tax_exempt, label: "Tax Exempt", title: 'When checked, tax will not be applied to this item'
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
- elsif order.tax_rate.present? && order.surcharge_percent.to_f > 0.0
|
|
33
33
|
%tr
|
|
34
34
|
%th
|
|
35
|
-
%td.tax
|
|
35
|
+
%td.tax #{EffectiveOrders.tax_label} (#{rate_to_percentage(order.tax_rate)})
|
|
36
36
|
%td.price.tax-price= price_to_currency(order.tax)
|
|
37
37
|
|
|
38
38
|
%tr.single-line
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
%tr
|
|
54
54
|
%th
|
|
55
|
-
%td.surcharge-tax
|
|
55
|
+
%td.surcharge-tax #{EffectiveOrders.tax_label} (#{rate_to_percentage(order.tax_rate)}) on Credit Card Processing Fee
|
|
56
56
|
%td.price.surcharge-tax-price= price_to_currency(order.surcharge_tax)
|
|
57
57
|
|
|
58
58
|
%tr.double-line
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
- elsif order.tax_rate.present? && !(order.surcharge_percent.to_f > 0.0)
|
|
64
64
|
%tr
|
|
65
65
|
%th
|
|
66
|
-
%td.tax
|
|
66
|
+
%td.tax #{EffectiveOrders.tax_label} (#{rate_to_percentage(order.tax_rate)})
|
|
67
67
|
%td.price.tax-price= price_to_currency(order.tax)
|
|
68
68
|
|
|
69
69
|
%tr.single-line
|
data/config/effective_orders.rb
CHANGED
|
@@ -23,6 +23,9 @@ EffectiveOrders.setup do |config|
|
|
|
23
23
|
config.use_effective_qb_sync = false
|
|
24
24
|
config.use_effective_qb_online = false
|
|
25
25
|
|
|
26
|
+
# Display the item name field on the orders#new screen
|
|
27
|
+
config.use_item_names = true
|
|
28
|
+
|
|
26
29
|
# If set, the orders#new screen will render effective/orders/_order_note_fields to capture any Note info
|
|
27
30
|
config.collect_note = false
|
|
28
31
|
config.collect_note_required = false
|
|
@@ -43,6 +46,9 @@ EffectiveOrders.setup do |config|
|
|
|
43
46
|
# An order must have a tax rate (even if the value is 0) to be purchased
|
|
44
47
|
config.order_tax_rate_method = Proc.new { |order| Effective::TaxRateCalculator.new(order: order).tax_rate }
|
|
45
48
|
|
|
49
|
+
# The tax label displayed on orders
|
|
50
|
+
config.tax_label = "Tax"
|
|
51
|
+
|
|
46
52
|
# Credit Card Surcharge
|
|
47
53
|
# Will be applied to all orders based off the after-tax total.
|
|
48
54
|
# Use 2.4 for 2.4% or nil for none
|
data/lib/effective_orders.rb
CHANGED
|
@@ -19,7 +19,9 @@ module EffectiveOrders
|
|
|
19
19
|
:customers_table_name, :subscriptions_table_name, :products_table_name, :item_names_table_name,
|
|
20
20
|
:layout,
|
|
21
21
|
:orders_collection_scope, :order_tax_rate_method,
|
|
22
|
-
:obfuscate_order_ids, :
|
|
22
|
+
:obfuscate_order_ids, :use_item_names,
|
|
23
|
+
:use_effective_qb_sync, :use_effective_qb_online,
|
|
24
|
+
:tax_label,
|
|
23
25
|
:billing_address, :shipping_address,
|
|
24
26
|
:collect_note, :collect_note_required, :collect_note_message,
|
|
25
27
|
:terms_and_conditions, :terms_and_conditions_label, :minimum_charge,
|
|
@@ -212,6 +214,14 @@ module EffectiveOrders
|
|
|
212
214
|
use_effective_qb_online && defined?(EffectiveQbOnline)
|
|
213
215
|
end
|
|
214
216
|
|
|
217
|
+
def self.use_item_names?
|
|
218
|
+
use_item_names != false
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
def self.tax_label
|
|
222
|
+
config[:tax_label].presence || "Tax"
|
|
223
|
+
end
|
|
224
|
+
|
|
215
225
|
def self.quickbooks?
|
|
216
226
|
use_effective_qb_sync || use_effective_qb_online
|
|
217
227
|
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: 6.19.
|
|
4
|
+
version: 6.19.6
|
|
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: 2025-02-
|
|
11
|
+
date: 2025-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|