foodsoft/app/views/finance/invoices/show.html.haml

53 lines
1.5 KiB
Plaintext
Raw Normal View History

- title t('.title', number: @invoice.number)
2009-01-18 17:42:51 +01:00
2016-02-17 16:11:01 +01:00
%p
%b= heading_helper(Invoice, :created_at) + ':'
= format_time(@invoice.created_at)
%p
%b= heading_helper(Invoice, :created_by) + ':'
= show_user(@invoice.created_by)
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :supplier) + ':'
2012-04-20 18:33:47 +02:00
= @invoice.supplier.name
2013-06-21 14:24:05 +02:00
- if @invoice.deliveries.count > 0
2009-01-18 17:42:51 +01:00
%p
%b= heading_helper(Invoice, :deliveries) + ':'
%span><
- @invoice.deliveries.order(:delivered_on).each_with_index do |delivery, index|
= ', ' if index > 0
= link_to format_date(delivery.delivered_on), [delivery.supplier,delivery]
- if @invoice.orders.count > 0
2013-06-21 14:24:05 +02:00
%p
%b= heading_helper(Invoice, :orders) + ':'
%span><
- @invoice.orders.order(:ends).each_with_index do |order, index|
= ', ' if index > 0
= link_to format_date(order.ends), new_finance_order_path(order_id: order)
2013-06-21 14:24:05 +02:00
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :number) + ':'
2012-04-20 18:33:47 +02:00
= @invoice.number
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :date) + ':'
2012-04-20 18:33:47 +02:00
= @invoice.date
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :paid_on) + ':'
2012-04-20 18:33:47 +02:00
= @invoice.paid_on
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :amount) + ':'
2012-04-20 18:33:47 +02:00
= number_to_currency @invoice.amount
2009-01-18 17:42:51 +01:00
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :deposit) + ':'
2012-04-20 18:33:47 +02:00
= number_to_currency @invoice.deposit
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :deposit_credit) + ':'
2012-04-20 18:33:47 +02:00
= number_to_currency @invoice.deposit_credit
%p
2013-10-09 23:37:08 +02:00
%b= heading_helper(Invoice, :note) + ':'
2009-01-18 17:42:51 +01:00
=h @invoice.note
- if @invoice.user_can_edit?(current_user)
= link_to t('ui.edit'), edit_finance_invoice_path(@invoice)
2015-06-06 20:20:07 +02:00
= link_to t('ui.or_cancel'), finance_invoices_path