mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Add invoices views for admin
This commit is contained in:
parent
68c335da7d
commit
adf321bafa
10 changed files with 67 additions and 16 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
- if @bank_transaction.binded?
|
||||
%dt= t('binded_invoice')
|
||||
%dd= link_to(@bank_transaction.binded_invoice, '#')
|
||||
%dd= link_to(@bank_transaction.binded_invoice, admin_invoice_path(@bank_transaction.binded_invoice))
|
||||
|
||||
%dt= t('bank_reference')
|
||||
%dd= @bank_transaction.bank_reference
|
||||
|
|
31
app/views/admin/invoices/index.haml
Normal file
31
app/views/admin/invoices/index.haml
Normal file
|
@ -0,0 +1,31 @@
|
|||
.row
|
||||
.col-sm-12
|
||||
%h2.text-center-xs= t('invoices')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'invoice')
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'buyer')
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'due_date')
|
||||
%th{class: 'col-xs-3'}
|
||||
= sort_link(@q, 'receipt_date')
|
||||
%tbody
|
||||
- @invoices.each do |x|
|
||||
%tr
|
||||
%td= link_to(t('invoice_no', no: x.id), [:admin, x])
|
||||
%td= link_to(x.buyer_name, admin_registrar_path(x.buyer_id))
|
||||
%td= l(x.due_date)
|
||||
- if x.binded?
|
||||
%td= l(x.receipt_date)
|
||||
- else
|
||||
%td.text-danger= t('unpaid')
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @invoices
|
15
app/views/admin/invoices/show.haml
Normal file
15
app/views/admin/invoices/show.haml
Normal file
|
@ -0,0 +1,15 @@
|
|||
.row
|
||||
.col-sm-6
|
||||
%h1.text-center-xs
|
||||
= t('invoice_no', no: @invoice.id)
|
||||
.col-sm-6
|
||||
%h1.text-right.text-center-xs
|
||||
= link_to(t('back'), :back, class: 'btn btn-default')
|
||||
%hr
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/details'
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/seller'
|
||||
.col-md-6= render 'registrar/invoices/partials/buyer'
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/items'
|
Loading…
Add table
Add a link
Reference in a new issue