mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update issues_save_hook_listener.rb
This commit is contained in:
@@ -15,7 +15,7 @@ class IssuesSaveHookListener < Redmine::Hook::ViewListener
|
|||||||
issue = context[:issue]
|
issue = context[:issue]
|
||||||
|
|
||||||
# Check to see if we have registered with QBO
|
# Check to see if we have registered with QBO
|
||||||
if Qbo.first && issue.qbo_customer && issue.qbo_item
|
if Qbo.first && issue.customer && issue.qbo_item
|
||||||
|
|
||||||
# if this is a quote, lets create a new estimate based off estimated hours
|
# if this is a quote, lets create a new estimate based off estimated hours
|
||||||
if issue.tracker.name = "Quote" && issue.status.name = "New" && issue.qbo_estimate
|
if issue.tracker.name = "Quote" && issue.status.name = "New" && issue.qbo_estimate
|
||||||
@@ -59,7 +59,7 @@ class IssuesSaveHookListener < Redmine::Hook::ViewListener
|
|||||||
|
|
||||||
# Check to see if we have registered with QBO and if the issue is closed.
|
# Check to see if we have registered with QBO and if the issue is closed.
|
||||||
# If so then we need to create a new billable time activity for the customer
|
# If so then we need to create a new billable time activity for the customer
|
||||||
bill_time(issue, employee_id) if Qbo.first && issue.qbo_customer && issue.qbo_item && employee_id && issue.status.is_closed?
|
bill_time(issue, employee_id) if Qbo.first && issue.customer && issue.qbo_item && employee_id && issue.status.is_closed?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Create billable time entries
|
# Create billable time entries
|
||||||
|
|||||||
Reference in New Issue
Block a user