Some tests for invoice binding

This commit is contained in:
Martin Lensment 2015-04-14 19:00:38 +03:00
parent e678e655da
commit 57d23976c7
19 changed files with 206 additions and 25 deletions

View file

@ -41,10 +41,12 @@
= sort_link(@q, 'paid_at')
%th{class: 'col-xs-3'}
= sort_link(@q, 'buyer_name')
%th{class: 'col-xs-3'}
%th{class: 'col-xs-2'}
= sort_link(@q, 'sum')
%th{class: 'col-xs-3'}
%th{class: 'col-xs-2'}
= sort_link(@q, 'currency')
%th{class: 'col-xs-2'}
= sort_link(@q, 'account_activity', t('status'))
%tbody
- @bank_transactions.each do |x|
%tr
@ -52,6 +54,10 @@
%td= x.buyer_name
%td= x.sum
%td= x.currency
%td
- c = x.binded? ? 'label-success' : 'label-danger'
%span.label{class: c}= x.binded? ? t('binded') : t('not_binded')
 
.row
.col-md-12
= paginate @bank_transactions

View file

@ -28,4 +28,4 @@
- else
%td{class: 'text-danger'}= t('unpaid')
%td= l(x.due_date)
%td= x.total
%td= x.sum

View file

@ -16,17 +16,17 @@
%td= x.unit
%td= x.amount
%td= x.price
%td= x.item_total_without_vat
%td= x.item_sum_without_vat
%tfoot
%tr
%th{colspan: 3}
%th= t('total_without_vat')
%td= @invoice.total_without_vat
%td= @invoice.sum_without_vat
%tr
%th.no-border{colspan: 3}
%th= t('vat', vat_prc: (@invoice.vat_prc * 100).round)
%td= @invoice.total_vat
%td= @invoice.vat
%tr
%th.no-border{colspan: 3}
%th= t('total')
%td= @invoice.total
%td= @invoice.sum