Merge pull request #1502 from internetee/1422-record-payment-method-and-failed-payments

Record every payment attempt
This commit is contained in:
Timo Võhmar 2020-03-06 13:52:58 +02:00 committed by GitHub
commit 444a07c62a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 798 additions and 342 deletions

View file

@ -60,7 +60,7 @@ module Admin
end
def bind_invoices
@bank_statement.bind_invoices
@bank_statement.bind_invoices(manual: true)
flash[:notice] = t('invoices_were_fully_binded') if @bank_statement.fully_binded?
flash[:warning] = t('invoices_were_partially_binded') if @bank_statement.partially_binded?

View file

@ -34,7 +34,7 @@ module Admin
end
def bind
if @bank_transaction.bind_invoice(params[:invoice_no])
if @bank_transaction.bind_invoice(params[:invoice_no], manual: true)
flash[:notice] = I18n.t('record_created')
redirect_to [:admin, @bank_transaction]
else