mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update qbo_invoice.rb
This commit is contained in:
@@ -55,11 +55,13 @@ class QboInvoice < ActiveRecord::Base
|
||||
|
||||
# Scan the line items for hashtags and attach to the applicable issues
|
||||
invoice.line_items.each { |line|
|
||||
if line.description
|
||||
line.description.scan(/#(\w+)/).flatten.each { |issue|
|
||||
i = Issue.find_by_id(issue.to_i)
|
||||
i.qbo_invoice = QboInvoice.find_by_id(invoice.id.to_i)
|
||||
i.save!
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user