effective_qb_online 0.6.4 → 0.7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842a17b9ed39140d60b1e8d579a6a8ac73e7ccb44fc9c977afe71fd7ba6f7566
|
4
|
+
data.tar.gz: 5d9aa52fcd52d31d1b13c4fae7b48fefdca77da9a737bf2881c8bc0c19c4332e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f24c8045da3be2527514640de6d2f62985a0f5d16299eeed5775cb3c96ed5a745ce53808df6027b044e33947db41d296e077f9d1cb846cac6636446781da82a
|
7
|
+
data.tar.gz: 1d84f06fccbc0570ffce4470c046ce12c4b3d58a345e9d37a625b1a6721536b1126504287b928303e26bd8278a10bcdd13aa9bb9dbc89c069ceb351c261930c7
|
@@ -14,8 +14,9 @@ module Effective
|
|
14
14
|
refresh_token_expires_at :datetime
|
15
15
|
|
16
16
|
# Set on /admin/quickbooks
|
17
|
-
deposit_to_account_id
|
18
|
-
payment_method_id
|
17
|
+
deposit_to_account_id :string
|
18
|
+
payment_method_id :string
|
19
|
+
order_number_as_transaction_number :boolean, default: false
|
19
20
|
|
20
21
|
timestamps
|
21
22
|
end
|
@@ -70,12 +70,14 @@ module Effective
|
|
70
70
|
receipt.update!(customer_id: customer.id)
|
71
71
|
end
|
72
72
|
|
73
|
+
doc_number = (order.to_param if api.realm.order_number_as_transaction_number?)
|
74
|
+
|
73
75
|
# Receipt
|
74
76
|
sales_receipt = Quickbooks::Model::SalesReceipt.new(
|
75
77
|
customer_id: receipt.customer_id,
|
76
78
|
deposit_to_account_id: api.realm.deposit_to_account_id, # The ID of the Account Entity you want the SalesReceipt to be deposited to
|
77
79
|
payment_method_id: api.realm.payment_method_id, # The ID of the PaymentMethod Entity
|
78
|
-
doc_number:
|
80
|
+
doc_number: doc_number, # This is the transaction # field
|
79
81
|
payment_ref_number: order.to_param, # Optional payment reference number/string
|
80
82
|
txn_date: order.purchased_at.to_date,
|
81
83
|
customer_memo: order.note_to_buyer,
|
@@ -84,6 +86,9 @@ module Effective
|
|
84
86
|
email_status: 'EmailSent'
|
85
87
|
)
|
86
88
|
|
89
|
+
# Allows QuickBooks to auto-generate the transaction number
|
90
|
+
sales_receipt.auto_doc_number! if doc_number.blank?
|
91
|
+
|
87
92
|
# Addresses
|
88
93
|
sales_receipt.bill_address = api.build_address(order.billing_address) if order.billing_address.present?
|
89
94
|
sales_receipt.ship_address = api.build_address(order.shipping_address) if order.shipping_address.present?
|
@@ -32,6 +32,15 @@
|
|
32
32
|
.col= f.select :payment_method_id, api.payment_methods_collection, label: false
|
33
33
|
.col= f.save
|
34
34
|
|
35
|
+
%tr
|
36
|
+
%td Transaction Number
|
37
|
+
%td
|
38
|
+
= effective_form_with(model: [:admin, api.realm], engine: true) do |f|
|
39
|
+
.row
|
40
|
+
- collection = [["Use our order receipt number", true], ["Use QuickBooks auto-generated number", false]]
|
41
|
+
.col= f.select :order_number_as_transaction_number, collection, label: false
|
42
|
+
.col= f.save
|
43
|
+
|
35
44
|
%tr
|
36
45
|
%td Items
|
37
46
|
%td= link_to 'Quickbooks Items', effective_qb_online.admin_quickbooks_items_path
|
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.
|
4
|
+
version: 0.7.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: 2025-04-
|
11
|
+
date: 2025-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|