foodsoft/app/views/finance/invoices/_form.html.haml
2016-02-24 00:39:07 +01:00

25 lines
968 B
Text

= simple_form_for([:finance, @invoice]) do |f|
= f.hidden_field :delivery_id
= f.hidden_field :order_id
- if @invoice.delivery
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_delivery'), [@invoice.supplier,@invoice.delivery])).html_safe
- if @invoice.order
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), new_finance_order_path(order_id: @invoice.order.id))).html_safe
- if @invoice.created_at
= f.input :created_at do
= format_time(@invoice.created_at)
= f.input :created_by do
= show_user(@invoice.created_by)
= f.association :supplier, hint: false
= f.input :number
= f.input :date, as: :date_picker
= f.input :paid_on, as: :date_picker
= f.input :amount, as: :string
= f.input :deposit, as: :string
= f.input :deposit_credit, as: :string
= f.input :note
.form-actions
= f.submit class: 'btn'
= link_to t('ui.or_cancel'), :back