Bind specific invoice when paid via Banklink / EveryPay

Fix styling issues

Move redundant logic to shared base
This commit is contained in:
Karl Erik Õunapuu 2020-01-31 12:56:58 +02:00
parent cbbfbae99e
commit 0cf2ff92a3
7 changed files with 50 additions and 14 deletions

View file

@ -48,6 +48,7 @@ class BankTransaction < ApplicationRecord
end
invoice = Invoice.find_by(number: invoice_no)
@registrar = invoice.buyer
unless invoice
errors.add(:base, I18n.t('invoice_was_not_found'))