mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-09 01:14:23 -05:00
Update issues_save_hook_listener.rb
Removed un-needed code, and added parenthesis on line 33
This commit is contained in:
@@ -13,7 +13,6 @@ class IssuesSaveHookListener < Redmine::Hook::ViewListener
|
||||
#Before Issue Saved
|
||||
def controller_issues_edit_before_save(context={})
|
||||
issue = context[:issue]
|
||||
cf_estimate = CustomField.find_by_name("Estimate")
|
||||
|
||||
# Check to see if we have registered with QBO
|
||||
if Qbo.first && issue.qbo_customer && issue.qbo_item
|
||||
@@ -31,7 +30,7 @@ class IssuesSaveHookListener < Redmine::Hook::ViewListener
|
||||
estimate.txn_date = Date.today
|
||||
|
||||
# Create the line item for labor
|
||||
item = item_service.fetch_by_id issue.qbo_item_id
|
||||
item = item_service.fetch_by_id(issue.qbo_item_id)
|
||||
|
||||
line_item = Quickbooks::Model::InvoiceLineItem.new
|
||||
line_item.amount = item.unit_price * issue.estimated_hours
|
||||
|
||||
Reference in New Issue
Block a user