Update qbo_invoice.rb

This commit is contained in:
2016-08-03 16:20:26 -04:00
committed by GitHub
parent 23698986b1
commit 6d7530922d

View File

@@ -55,9 +55,9 @@ class QboInvoice < ActiveRecord::Base
# Scan the line items for hashtags and attach to the applicable issues
if invoice.line_items
invoice.line_items.each |line_item| do
invoice.line_items |line_item| do
if line_item.description
line_item.description.scan(/#(\w+)/).flatten.each |issue| do
line_item.description.scan(/#(\w+)/).flatten |issue| do
i = issue.find_by_id(issue.to_i)
if i
i.qbo_invoice = issue.to_i