effective_qb_online 0.8.2 → 0.8.3

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: 0d74eeb04010b63b0d3b0976c78db7c0b13ba3ffc969fdfdf705cf3f9fed4933
4
- data.tar.gz: 1ba505826f03c8bbb869f052a47e0949b272d88db2062db6fe696917529b06ae
3
+ metadata.gz: adc0a0db4e6705bc04ff27340d8ba7b74ee9c0734472268af41120a5d30b124b
4
+ data.tar.gz: 0af6528d535d6cc97c46758a9f553814214bcf2c83c9820cdc5afffbbec9c985
5
5
  SHA512:
6
- metadata.gz: 66e0323b49c7fb87b570486573b36f1201410e40f55f9958f74a7b87ff9126500c2afa5467383add5a227cb5d7a8040c5f2f03e348ab43fb34031e904190853d
7
- data.tar.gz: 2488ffb00abdbddf95e94cc80dad7bb302ba0e1eef98cc581790abe87fc40b380681b90c65707c4491312571a7cf501084146ba3c09e3e3b1eab4ad181cfd0ee
6
+ metadata.gz: 7ddd6803d1cf235625bd8b77cecd3ce90ddf4e7166e79dabe1f3e1aba7de25b3d85a21411247b692c956046123f59dbe6fe773580f4bcfc64f308c34d4552d0f
7
+ data.tar.gz: 342abd4b14a36c93f66fce106a5d55cc50b7c1dc9bc6e1b979f8d1bb2a0e14fa4f65bcaac6dba3d2cc17462d7e86f9ead435496d46708065a6949c37c215b9d8
@@ -67,8 +67,16 @@ module Effective
67
67
  sales_receipt = api.create_sales_receipt(sales_receipt: sales_receipt)
68
68
 
69
69
  # Sanity check
70
- if (expected = api.price_to_amount(order.total)) != sales_receipt.total
71
- raise("A QuickBooks Online Sales Receipt has been created with an unexpected total. QuickBooks total is #{sales_receipt.total} but we expected #{expected}. Please adjust the Sales Receipt on QuickBooks")
70
+ if EffectiveOrders.try(:credit_card_surcharge_qb_item_name).present?
71
+ if (expected = api.price_to_amount(order.total)) != sales_receipt.total
72
+ raise("A QuickBooks Online Sales Receipt has been created with an unexpected total. QuickBooks total is #{sales_receipt.total} but we expected #{expected}. Please adjust the Sales Receipt on QuickBooks")
73
+ end
74
+ end
75
+
76
+ if EffectiveOrders.try(:credit_card_surcharge_qb_item_name).blank?
77
+ if (expected = api.price_to_amount(order.amount_owing)) != sales_receipt.total
78
+ raise("A QuickBooks Online Sales Receipt has been created with an unexpected total. QuickBooks total is #{sales_receipt.total} but we expected #{expected}. Please adjust the Sales Receipt on QuickBooks")
79
+ end
72
80
  end
73
81
 
74
82
  assign_attributes(result: 'completed successfully', sales_receipt_id: sales_receipt.id)
@@ -1,3 +1,3 @@
1
1
  module EffectiveQbOnline
2
- VERSION = '0.8.2'.freeze
2
+ VERSION = '0.8.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_qb_online
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect