mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Update qbo_invoice.rb
This commit is contained in:
1 parent
382e6675f1
commit
7aba8cdce3
1 file changed
+7
-5
@@ -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|
|
||||
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!
|
||||
}
|
||||
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