diff --git a/app/assets/images/danske.png b/app/assets/images/danske.png new file mode 100644 index 000000000..6019e3e66 Binary files /dev/null and b/app/assets/images/danske.png differ diff --git a/app/assets/images/lhv.png b/app/assets/images/lhv.png new file mode 100644 index 000000000..d378786ea Binary files /dev/null and b/app/assets/images/lhv.png differ diff --git a/app/assets/images/nordea.png b/app/assets/images/nordea.png new file mode 100644 index 000000000..5ecad2de2 Binary files /dev/null and b/app/assets/images/nordea.png differ diff --git a/app/assets/images/seb.png b/app/assets/images/seb.png new file mode 100644 index 000000000..9f7e2c3d9 Binary files /dev/null and b/app/assets/images/seb.png differ diff --git a/app/assets/images/swed.png b/app/assets/images/swed.png new file mode 100644 index 000000000..326492937 Binary files /dev/null and b/app/assets/images/swed.png differ diff --git a/app/controllers/registrar/invoices_controller.rb b/app/controllers/registrar/invoices_controller.rb index bb6a146ad..086175982 100644 --- a/app/controllers/registrar/invoices_controller.rb +++ b/app/controllers/registrar/invoices_controller.rb @@ -4,7 +4,7 @@ class Registrar::InvoicesController < RegistrarController before_action :set_invoice, only: [:show] def index - @invoices = current_user.registrar.invoices.includes(:invoice_items) + @invoices = current_user.registrar.invoices.includes(:invoice_items).order(id: :desc) end def show diff --git a/app/views/registrar/invoices/partials/_banklinks.haml b/app/views/registrar/invoices/partials/_banklinks.haml new file mode 100644 index 000000000..883adb418 --- /dev/null +++ b/app/views/registrar/invoices/partials/_banklinks.haml @@ -0,0 +1,16 @@ +%h4= t('pay_by_bank_link') +%hr += link_to '#' do + = image_tag('swed.png') + += link_to '#' do + = image_tag('seb.png') + += link_to '#' do + = image_tag('nordea.png') + += link_to '#' do + = image_tag('lhv.png') + += link_to '#' do + = image_tag('danske.png') diff --git a/app/views/registrar/invoices/show.haml b/app/views/registrar/invoices/show.haml index 08eba28dc..84d26942e 100644 --- a/app/views/registrar/invoices/show.haml +++ b/app/views/registrar/invoices/show.haml @@ -1,9 +1,16 @@ -%h1= t('invoice_no', no: @invoice.id) +.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_to_accounting'), registrar_invoices_path, class: 'btn btn-default') %hr .row - .col-md-6= render 'registrar/invoices/partials/seller' + .col-md-6= render 'registrar/invoices/partials/banklinks' .col-md-6= render 'registrar/invoices/partials/details' .row - .col-md-12= render 'registrar/invoices/partials/buyer' + .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' diff --git a/config/locales/en.yml b/config/locales/en.yml index 79bae57b4..2dab06488 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -654,3 +654,20 @@ en: your_current_credit_account_balance_is: 'Your current credit account balance is %{balance} EUR' accounting: 'Accounting' your_account: 'Your account' + pay_by_bank_link: 'Pay by bank link' + back_to_accounting: 'Back to accounting' + issue_date: 'Issue date' + due_date: 'Due date' + payment_term: 'Payment term' + iban: 'Iban' + bank: 'Bank' + swift: 'Swift' + issuer: 'Issuer' + items: 'Items' + buyer: 'Buyer' + unit: 'Unit' + price: 'Price' + total: 'Total' + total_without_vat: 'Total without VAT' + paid_at: 'Paid at' + invoice: 'Invoice'