Add possibility to add an attachment to an invoice #345

This commit is contained in:
Patrick Gansterer 2016-05-06 15:04:58 +02:00
parent 8d5467ab7c
commit 749791bb7a
14 changed files with 75 additions and 1 deletions

View file

@ -22,6 +22,8 @@
= f.input :amount, as: :string
= f.input :deposit, as: :string
= f.input :deposit_credit, as: :string
= f.input :attachment, as: :file, hint: t('.attachment_hint')
= f.input :delete_attachment, as: :boolean
= f.input :note
.form-actions
= f.submit class: 'btn'

View file

@ -58,6 +58,10 @@
%p
%b= heading_helper(Invoice, :total) + ':'
= number_to_currency total
%p
%b= heading_helper(Invoice, :attachment) + ':'
- if @invoice.attachment_data
= link_to t('ui.download'), finance_invoice_attachment_path(@invoice)
%p
%b= heading_helper(Invoice, :note) + ':'
=h @invoice.note