mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
No Duplicates!
This commit is contained in:
@@ -63,7 +63,7 @@ class QboInvoice < ActiveRecord::Base
|
||||
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.qbo_invoice << QboInvoice.find_by_id(invoice.id.to_i) if not i.qbo_invoice_ids.include?(invoice.id)
|
||||
i.save!
|
||||
|
||||
# update the invoive custom fields with infomation from the work ticket if available
|
||||
|
||||
Reference in New Issue
Block a user