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: 75771c9516b5fe376e0cdb1f577fd1ad18d0b01713d33d4c3ee8d4f9abdaa505
4
- data.tar.gz: f5da5a644230433085f74d75570277a68e5b583f765d5874ceaebc78145c4e0a
3
+ metadata.gz: 0d74eeb04010b63b0d3b0976c78db7c0b13ba3ffc969fdfdf705cf3f9fed4933
4
+ data.tar.gz: 1ba505826f03c8bbb869f052a47e0949b272d88db2062db6fe696917529b06ae
5
5
  SHA512:
6
- metadata.gz: 1abb41cb0fdc235b2c01c510f2b2d2a18cd53016616c941eb9e82881c0e9d11e6051aa443b07d62d682028e69552d0a32fc61e30994d5cd51d709832bde28264
7
- data.tar.gz: 6154e81962928f2bde3d96fe229a2930ad063db1ddfa8cd5eb57d70a37715eff1607c2822f08afeae09aa0ea946e0b2ca1b1f1e6fb283fc66426ae891cec8479
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')
@@ -1,3 +1,3 @@
1
1
  module EffectiveQbOnline
2
- VERSION = '0.8.1'.freeze
2
+ VERSION = '0.8.2'.freeze
3
3
  end
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.1
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-05-23 00:00:00.000000000 Z
11
+ date: 2025-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails