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 +4 -4
- data/app/models/effective/qb_receipt.rb +10 -2
- data/lib/effective_qb_online/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: adc0a0db4e6705bc04ff27340d8ba7b74ee9c0734472268af41120a5d30b124b
|
|
4
|
+
data.tar.gz: 0af6528d535d6cc97c46758a9f553814214bcf2c83c9820cdc5afffbbec9c985
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
71
|
-
|
|
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)
|