Fixed finance module to work with bootstrap design.
This commit is contained in:
parent
16de9124fe
commit
0236fb5a60
55 changed files with 440 additions and 486 deletions
|
|
@ -9,10 +9,12 @@
|
|||
|
||||
= f.association :supplier, hint: false
|
||||
= f.input :number
|
||||
= f.input :date
|
||||
= f.input :paid_on
|
||||
= 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
|
||||
= f.submit
|
||||
.form-actions
|
||||
= f.submit class: 'btn'
|
||||
= link_to "oder abbrechen", :back
|
||||
|
|
|
|||
31
app/views/finance/invoices/_invoices.html.haml
Normal file
31
app/views/finance/invoices/_invoices.html.haml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
- if Invoice.count > 20
|
||||
= items_per_page
|
||||
= pagination_links_remote @invoices
|
||||
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th Nummer
|
||||
%th Lieferantin
|
||||
%th Datum
|
||||
%th Bezahlt am
|
||||
%th Betrag
|
||||
%th Lieferung
|
||||
%th Bestellung
|
||||
%th Note
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- for invoice in @invoices
|
||||
%tr
|
||||
%td= link_to h(invoice.number), finance_invoice_path(invoice)
|
||||
%td= invoice.supplier.name
|
||||
%td= format_date invoice.date
|
||||
%td= format_date invoice.paid_on
|
||||
%td= number_to_currency invoice.amount
|
||||
%td= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery
|
||||
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
|
||||
%td= truncate(invoice.note)
|
||||
%td= link_to "Bearbeiten", edit_finance_invoice_path(invoice), class: 'btn btn-mini'
|
||||
%td= link_to "Löschen", finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete,
|
||||
class: 'btn btn-danger btn-mini'
|
||||
|
|
@ -1,5 +1,2 @@
|
|||
- title "Rechnung bearbeiten"
|
||||
= render :partial => 'form'
|
||||
= link_to "Anzeigen", [:finance, @invoice]
|
||||
|
|
||||
\#{link_to 'Zurück', finance_invoices_path}
|
||||
= render :partial => 'form'
|
||||
|
|
@ -1,30 +1,5 @@
|
|||
- title "Rechnungen"
|
||||
%p= will_paginate @invoices
|
||||
%table.list{:style => "width:70em"}
|
||||
%thead
|
||||
%tr
|
||||
%th Nummer
|
||||
%th Lieferantin
|
||||
%th Datum
|
||||
%th Bezahlt am
|
||||
%th Betrag
|
||||
%th Lieferung
|
||||
%th Bestellung
|
||||
%th Note
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- for invoice in @invoices
|
||||
%tr
|
||||
%td= link_to h(invoice.number), finance_invoice_path(invoice)
|
||||
%td= invoice.supplier.name
|
||||
%td= format_date invoice.date
|
||||
%td= format_date invoice.paid_on
|
||||
%td= number_to_currency invoice.amount
|
||||
%td= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery
|
||||
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
|
||||
%td= truncate(invoice.note)
|
||||
%td= link_to icon(:edit), edit_finance_invoice_path(invoice)
|
||||
%td= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete
|
||||
%br/
|
||||
= link_to 'Neue Rechnung anlegen', new_finance_invoice_path
|
||||
|
||||
= link_to 'Neue Rechnung anlegen', new_finance_invoice_path, class: 'btn btn-primary'
|
||||
|
||||
#invoicesTable= render 'invoices'
|
||||
|
|
|
|||
1
app/views/finance/invoices/index.js.haml
Normal file
1
app/views/finance/invoices/index.js.haml
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#invoicesTable').html('#{j(render('invoices'))}');
|
||||
Loading…
Add table
Add a link
Reference in a new issue