mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54: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
|
# Scan the line items for hashtags and attach to the applicable issues
|
||||||
invoice.line_items.each { |line|
|
invoice.line_items.each { |line|
|
||||||
line.description.scan(/#(\w+)/).flatten.each { |issue|
|
if line.description
|
||||||
i = Issue.find_by_id(issue.to_i)
|
line.description.scan(/#(\w+)/).flatten.each { |issue|
|
||||||
i.qbo_invoice = QboInvoice.find_by_id(invoice.id.to_i)
|
i = Issue.find_by_id(issue.to_i)
|
||||||
i.save!
|
i.qbo_invoice = QboInvoice.find_by_id(invoice.id.to_i)
|
||||||
}
|
i.save!
|
||||||
|
}
|
||||||
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user