effective_orders 6.19.5 → 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
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
|
@@ -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
@@ -46,6 +46,9 @@ EffectiveOrders.setup do |config|
|
|
46
46
|
# An order must have a tax rate (even if the value is 0) to be purchased
|
47
47
|
config.order_tax_rate_method = Proc.new { |order| Effective::TaxRateCalculator.new(order: order).tax_rate }
|
48
48
|
|
49
|
+
# The tax label displayed on orders
|
50
|
+
config.tax_label = "Tax"
|
51
|
+
|
49
52
|
# Credit Card Surcharge
|
50
53
|
# Will be applied to all orders based off the after-tax total.
|
51
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,
|
@@ -216,6 +218,10 @@ module EffectiveOrders
|
|
216
218
|
use_item_names != false
|
217
219
|
end
|
218
220
|
|
221
|
+
def self.tax_label
|
222
|
+
config[:tax_label].presence || "Tax"
|
223
|
+
end
|
224
|
+
|
219
225
|
def self.quickbooks?
|
220
226
|
use_effective_qb_sync || use_effective_qb_online
|
221
227
|
end
|