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
a8e1e8429c
commit
1310d1e63e
1 file changed
+4
-2
@@ -54,8 +54,10 @@ class QboInvoice < ActiveRecord::Base
|
|||||||
qbo_invoice.save!
|
qbo_invoice.save!
|
||||||
|
|
||||||
# Scan the line items for hashtags and attach to the applicable issues
|
# Scan the line items for hashtags and attach to the applicable issues
|
||||||
invoice.line_items.each |line_item|
|
lines = invoice.line_items
|
||||||
line_item.description.scan(/#(\w+)/).flatten.each |issue|
|
lines.each |line|
|
||||||
|
issues = line.description.scan(/#(\w+)/).flatten
|
||||||
|
issues.each |issue|
|
||||||
i = issue.find_by_id(issue.to_i)
|
i = issue.find_by_id(issue.to_i)
|
||||||
i.qbo_invoice = issue.to_i
|
i.qbo_invoice = issue.to_i
|
||||||
i.save!
|
i.save!
|
||||||
|
|||||||
Reference in new issue
Block a user