effective_qb_sync 1.3.8 → 1.4.0
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_request.rb +17 -4
- data/lib/effective_qb_sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 349c5cbc263f6553be07c308064427d01c9fd44f45e9e89b626852ff1daad271
|
|
4
|
+
data.tar.gz: 3d961d678553a5cea81250014b18256a10fee4334bd720a98b2ad3c2bcc85d1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ddc265acf4e19b8aeedc7fb6fe4a2d764e54c883818e5fc3e07ad08264bf874b387cd231a2e26c44533b38d3a1635a792964e6c90a6f33ec6c4c8d784772d0ed
|
|
7
|
+
data.tar.gz: 73a4419a4eea4ac12900d40e15869cad50ef8d5279d81a79dac1ffcb0958733804f02fec5773bc9a0889d60afe836deade1630e78ce8ef4dd9a0f7b7e9a00a82
|
|
@@ -234,11 +234,24 @@ module Effective
|
|
|
234
234
|
}
|
|
235
235
|
end
|
|
236
236
|
|
|
237
|
-
|
|
237
|
+
surcharge_name = EffectiveOrders.try(:credit_card_surcharge_qb_item_name)
|
|
238
|
+
tax_name = EffectiveQbSync.quickbooks_tax_name
|
|
239
|
+
|
|
240
|
+
if surcharge_name.present? && order.surcharge != 0
|
|
241
|
+
xml.SalesReceiptLineAdd {
|
|
242
|
+
xml.ItemRef { xml.FullName(surcharge_name) }
|
|
243
|
+
xml.Desc(surcharge_name)
|
|
244
|
+
xml.Amount(qb_amount(order.surcharge))
|
|
245
|
+
}
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# This is manual tax mode. Add the Tax and Surcharge Tax as an item.
|
|
249
|
+
# When tax name is blank, this is handled automatically by QuickBooks
|
|
250
|
+
if tax_name.present? && (order.tax != 0 || order.try(:surcharge_tax).to_i != 0)
|
|
238
251
|
xml.SalesReceiptLineAdd {
|
|
239
|
-
xml.ItemRef { xml.FullName(
|
|
240
|
-
xml.Desc(
|
|
241
|
-
xml.Amount(qb_amount(order.tax))
|
|
252
|
+
xml.ItemRef { xml.FullName(tax_name) }
|
|
253
|
+
xml.Desc(tax_name)
|
|
254
|
+
xml.Amount(qb_amount(order.tax + order.try(:surcharge_tax).to_i))
|
|
242
255
|
}
|
|
243
256
|
end
|
|
244
257
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_qb_sync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
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: 2022-
|
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|