Add small improvements for BankTransactions
This commit is contained in:
parent
6d71bd2c2f
commit
093313f0f3
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ class BankTransaction < ApplicationRecord
|
|||
def assign_to_invoice
|
||||
return false unless supplier
|
||||
|
||||
content = text
|
||||
content = text || ""
|
||||
content += "\n" + reference if reference.present?
|
||||
invoices = supplier.invoices.unpaid.select { |i| content.include? i.number }
|
||||
invoices_sum = invoices.map(&:amount).sum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue