Match bank transaction against invoice reference number instead of

registrar's
This commit is contained in:
Artur Beljajev 2018-10-04 12:48:13 +03:00
parent 5738c17731
commit a43a1ac3e3
2 changed files with 22 additions and 1 deletions

View file

@ -31,7 +31,7 @@ class BankTransaction < ActiveRecord::Base
end
def registrar
@registrar ||= Registrar.find_by(reference_no: reference_no)
@registrar ||= Invoice.find_by(reference_no: reference_no)&.buyer
end