effective_qb_online 0.8.1 → 0.8.2
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: 0d74eeb04010b63b0d3b0976c78db7c0b13ba3ffc969fdfdf705cf3f9fed4933
|
|
4
|
+
data.tar.gz: 1ba505826f03c8bbb869f052a47e0949b272d88db2062db6fe696917529b06ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66e0323b49c7fb87b570486573b36f1201410e40f55f9958f74a7b87ff9126500c2afa5467383add5a227cb5d7a8040c5f2f03e348ab43fb34031e904190853d
|
|
7
|
+
data.tar.gz: 2488ffb00abdbddf95e94cc80dad7bb302ba0e1eef98cc581790abe87fc40b380681b90c65707c4491312571a7cf501084146ba3c09e3e3b1eab4ad181cfd0ee
|
|
@@ -10,6 +10,7 @@ module Admin
|
|
|
10
10
|
col :updated_at
|
|
11
11
|
|
|
12
12
|
col :order, search: :string
|
|
13
|
+
col 'order.purchased_at'
|
|
13
14
|
|
|
14
15
|
col :sales_receipt_id, label: 'QB Sales Receipt' do |receipt|
|
|
15
16
|
if receipt.sales_receipt_id.present?
|
|
@@ -37,7 +38,7 @@ module Admin
|
|
|
37
38
|
end
|
|
38
39
|
|
|
39
40
|
collection do
|
|
40
|
-
Effective::QbReceipt.deep.all
|
|
41
|
+
Effective::QbReceipt.deep.all.joins(:order)
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
def api
|
|
@@ -24,6 +24,7 @@ module Effective
|
|
|
24
24
|
items = api.items()
|
|
25
25
|
|
|
26
26
|
# Credit card surcharge item
|
|
27
|
+
# Add Credit Card Surcharge if we collect it ourselves. This does not add a Helcim Convenience Fee
|
|
27
28
|
surcharge_item = if EffectiveOrders.try(:credit_card_surcharge_qb_item_name).present?
|
|
28
29
|
name = EffectiveOrders.credit_card_surcharge_qb_item_name
|
|
29
30
|
|
|
@@ -112,8 +113,8 @@ module Effective
|
|
|
112
113
|
sales_receipt.line_items << line_item
|
|
113
114
|
end
|
|
114
115
|
|
|
115
|
-
# Add Credit Card Surcharge
|
|
116
|
-
if order.try(:surcharge).to_i != 0
|
|
116
|
+
# Add Credit Card Surcharge if we collect it ourselves. This does not add a Helcim Convenience Fee
|
|
117
|
+
if EffectiveOrders.try(:credit_card_surcharge_qb_item_name).present? && order.try(:surcharge).to_i != 0
|
|
117
118
|
raise("Expected a Credit Card Surcharge QuickBooks item to exist for Effective::Order #{order.id} with non-zero surcharge amount. Please check your configuration.") unless surcharge_item.present?
|
|
118
119
|
|
|
119
120
|
line_item = Quickbooks::Model::Line.new(amount: api.price_to_amount(order.surcharge), description: 'Credit Card Surcharge')
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_qb_online
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.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: 2025-
|
|
11
|
+
date: 2025-12-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|