mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
- `runner 'Invoice.cancel_overdue_invoices'` in `schedule.rb` is changed to `rake 'invoices:cancel_overdue'`. - `invoices.payment_term` database column is removed and its value is hardcoded in UI. - `invoices.paid_at` is removed as unused - `invoices.due_date` column's type is now `date`. - `Invoice#invoice_items` renamed to `Invoice#items` and `Invoice` interface to get a list of items is unified. - Default date format in UI. - Default translations are used. - Tests improved. - Specs converted to tests and removed along with factories. - Database structure improved.
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
- content_for :actions do
|
|
= link_to(t(:add), new_admin_invoice_path, class: 'btn btn-primary')
|
|
= render 'shared/title', name: t(:invoices)
|
|
.row
|
|
.col-md-12
|
|
.table-responsive
|
|
%table.table.table-hover.table-bordered.table-condensed
|
|
%thead
|
|
%tr
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :number)
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :buyer_name, "Buyer")
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :sort_due_date, "Due date")
|
|
%th{class: 'col-xs-3'}
|
|
= sort_link(@q, :sort_receipt_date, "Receipt date")
|
|
%tbody
|
|
- @invoices.each do |invoice|
|
|
%tr
|
|
%td= link_to(invoice, [:admin, invoice])
|
|
%td= link_to(invoice.buyer_name, admin_registrar_path(invoice.buyer_id))
|
|
- if invoice.cancelled?
|
|
%td.text-grey= t(:cancelled)
|
|
- else
|
|
%td= l invoice.due_date
|
|
|
|
- if invoice.paid?
|
|
%td= l invoice.receipt_date
|
|
- elsif invoice.cancelled?
|
|
%td.text-grey= t(:cancelled)
|
|
- else
|
|
%td.text-danger= t(:unpaid)
|
|
.row
|
|
.col-md-12
|
|
= paginate @invoices
|