internetee-registry/app/views/admin/invoices/show.haml
Artur Beljajev 27ea790b28 Refactor invoice PDF generation, download and delivery
- Remove `Que::Mailer` (#895)
- Extract controllers
- Extract translations
- Convert HAML to ERB
- Add mailer preview
- Improve UI
- Remove unused routes
- Add tests
2019-04-11 13:04:42 +03:00

23 lines
969 B
Text

.row
.col-sm-4
%h1.text-center-xs
= @invoice
.col-sm-8
%h1.text-right.text-center-xs
- if @invoice.unpaid?
= link_to(t(:payment_received), new_admin_bank_statement_path(invoice_id: @invoice.id), class: 'btn btn-default')
= link_to(t('.download_btn'), download_admin_invoice_path(@invoice), class: 'btn btn-default')
= link_to(t('.deliver_btn'), new_admin_invoice_delivery_path(@invoice), class: 'btn btn-default')
- if @invoice.cancellable?
= link_to(t(:cancel), cancel_admin_invoice_path(@invoice), method: :patch, class: 'btn btn-warning')
= link_to(t(:back), admin_invoices_path, class: 'btn btn-default')
%hr
= render 'shared/full_errors', object: @invoice
.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'