mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 07:01:59 -04:00
Updated t work with redmine_qbo 2026.3.9
This commit is contained in:
@@ -18,29 +18,25 @@ class Item < QboBaseModel
|
||||
|
||||
# Updates Both local & remote DB description
|
||||
def description=(s)
|
||||
details
|
||||
@details.description = s
|
||||
details.description = s
|
||||
super
|
||||
end
|
||||
|
||||
# Updates Both local & remote DB name
|
||||
def name=(s)
|
||||
details
|
||||
@details.name = s
|
||||
details.name = s
|
||||
super
|
||||
end
|
||||
|
||||
# Updates Both local & remote DB sku
|
||||
def sku=(s)
|
||||
details
|
||||
@details.sku = s
|
||||
details.sku = s
|
||||
super
|
||||
end
|
||||
|
||||
# Updates Both local & remote DB price
|
||||
def unit_price=(s)
|
||||
details
|
||||
@details.unit_price = s
|
||||
details.unit_price = s
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
@@ -28,12 +28,7 @@ class ItemService < ServiceBase
|
||||
|
||||
def default_income_account
|
||||
log "Looking up sales income account"
|
||||
qbo = QboConnectionService.current!
|
||||
qbo.perform_authenticated_request do |token|
|
||||
service = Quickbooks::Service::Account.new(
|
||||
company_id: qbo.realm_id,
|
||||
access_token: token
|
||||
)
|
||||
QboConnectionService.with_qbo_service(entity: Invoice) do |service|
|
||||
service.query("SELECT * FROM Account WHERE AccountType='Income' AND Name LIKE '%Sales%'").first
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user