mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Improve invoice view
This commit is contained in:
parent
43e111add0
commit
6a47f38e80
14 changed files with 167 additions and 44 deletions
|
@ -0,0 +1,20 @@
|
|||
%h4= t('buyer')
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
%dt= t('name')
|
||||
%dd= @invoice.buyer_name
|
||||
|
||||
%dt= t('reg_no')
|
||||
%dd= @invoice.buyer_reg_no
|
||||
|
||||
%dt= t('address')
|
||||
%dd= @invoice.buyer_address
|
||||
|
||||
%dt= t('phone')
|
||||
%dd= @invoice.buyer_phone
|
||||
|
||||
%dt= t('url')
|
||||
%dd= @invoice.buyer_url
|
||||
|
||||
%dt= t('email')
|
||||
%dd= @invoice.buyer_email
|
17
app/views/registrar/invoices/partials/_details.haml
Normal file
17
app/views/registrar/invoices/partials/_details.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
%h4= t('details')
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
/ %dt= t('document_name')
|
||||
/ %dd= t(@invoice.document_name)
|
||||
|
||||
%dt= t('issue_date')
|
||||
%dd= l(@invoice.created_at)
|
||||
|
||||
%dt= t('due_date')
|
||||
%dd= l(@invoice.due_date)
|
||||
|
||||
%dt= t('payment_term')
|
||||
%dd= t(@invoice.payment_term)
|
||||
|
||||
%dt= t('description')
|
||||
%dd= @invoice.description
|
32
app/views/registrar/invoices/partials/_items.haml
Normal file
32
app/views/registrar/invoices/partials/_items.haml
Normal file
|
@ -0,0 +1,32 @@
|
|||
%h4= t('items')
|
||||
%hr
|
||||
.table-responsive
|
||||
%table.table.table-hover.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-4'}= t('description')
|
||||
%th{class: 'col-xs-2'}= t('unit')
|
||||
%th{class: 'col-xs-2'}= t('amount')
|
||||
%th{class: 'col-xs-2'}= t('price')
|
||||
%th{class: 'col-xs-2'}= t('total')
|
||||
%tbody
|
||||
- @invoice.items.each do |x|
|
||||
%tr
|
||||
%td= t(x.description)
|
||||
%td= x.unit
|
||||
%td= x.amount
|
||||
%td= x.price
|
||||
%td= x.item_total_without_vat
|
||||
%tfoot
|
||||
%tr
|
||||
%th{colspan: 3}
|
||||
%th= t('total_without_vat')
|
||||
%td= @invoice.total_without_vat
|
||||
%tr
|
||||
%th.no-border{colspan: 3}
|
||||
%th= t('vat', vat_prc: (@invoice.vat_prc * 100).round)
|
||||
%td= @invoice.total_vat
|
||||
%tr
|
||||
%th.no-border{colspan: 3}
|
||||
%th= t('total')
|
||||
%td= @invoice.total
|
|
@ -1,37 +1,35 @@
|
|||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h3.panel-title= t('general')
|
||||
.panel-body
|
||||
%dl.dl-horizontal
|
||||
%dt= t('name')
|
||||
%dd= @invoice.seller_name
|
||||
%h4= t('seller')
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
%dt= t('name')
|
||||
%dd= @invoice.seller_name
|
||||
|
||||
%dt= t('reg_no')
|
||||
%dd= @invoice.seller_reg_no
|
||||
%dt= t('reg_no')
|
||||
%dd= @invoice.seller_reg_no
|
||||
|
||||
%dt= t('iban')
|
||||
%dd= @invoice.seller_iban
|
||||
%dt= t('iban')
|
||||
%dd= @invoice.seller_iban
|
||||
|
||||
%dt= t('bank')
|
||||
%dd= @invoice.seller_bank
|
||||
%dt= t('bank')
|
||||
%dd= @invoice.seller_bank
|
||||
|
||||
%dt= t('swift')
|
||||
%dd= @invoice.seller_swift
|
||||
%dt= t('swift')
|
||||
%dd= @invoice.seller_swift
|
||||
|
||||
%dt= t('vat_no')
|
||||
%dd= @invoice.seller_vat_no
|
||||
%dt= t('vat_no')
|
||||
%dd= @invoice.seller_vat_no
|
||||
|
||||
%dt= t('address')
|
||||
%dd= @invoice.seller_address
|
||||
%dt= t('address')
|
||||
%dd= @invoice.seller_address
|
||||
|
||||
%dt= t('phone')
|
||||
%dd= @invoice.seller_phone
|
||||
%dt= t('phone')
|
||||
%dd= @invoice.seller_phone
|
||||
|
||||
%dt= t('url')
|
||||
%dd= @invoice.seller_url
|
||||
%dt= t('url')
|
||||
%dd= @invoice.seller_url
|
||||
|
||||
%dt= t('email')
|
||||
%dd= @invoice.seller_email
|
||||
%dt= t('email')
|
||||
%dd= @invoice.seller_email
|
||||
|
||||
%dt= t('issuer')
|
||||
%dd= @invoice.seller_contact_name
|
||||
%dt= t('issuer')
|
||||
%dd= @invoice.seller_contact_name
|
||||
|
|
17
app/views/registrar/invoices/partials/_total.haml
Normal file
17
app/views/registrar/invoices/partials/_total.haml
Normal file
|
@ -0,0 +1,17 @@
|
|||
%h4= t('total')
|
||||
%hr
|
||||
%dl.dl-horizontal
|
||||
/ %dt= t('document_name')
|
||||
/ %dd= t(@invoice.document_name)
|
||||
|
||||
%dt= t('issue_date')
|
||||
%dd= l(@invoice.created_at)
|
||||
|
||||
%dt= t('due_date')
|
||||
%dd= l(@invoice.due_date)
|
||||
|
||||
%dt= t('payment_term')
|
||||
%dd= t(@invoice.payment_term)
|
||||
|
||||
%dt= t('description')
|
||||
%dd= @invoice.description
|
|
@ -2,11 +2,11 @@
|
|||
%hr
|
||||
.row
|
||||
.col-md-6= render 'registrar/invoices/partials/seller'
|
||||
.col-md-6= render 'registrar/invoices/partials/buyer'
|
||||
/ .row
|
||||
/ .col-md-12= render 'admin/domains/partials/tech_contacts'
|
||||
/ .row
|
||||
/ .col-md-12= render 'admin/domains/partials/admin_contacts'
|
||||
.col-md-6= render 'registrar/invoices/partials/details'
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/buyer'
|
||||
.row
|
||||
.col-md-12= render 'registrar/invoices/partials/items'
|
||||
/ .row
|
||||
/ .col-md-12= render 'admin/domains/partials/statuses'
|
||||
/ .row
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue