Sha256: e555aac2bc2596ee02cce977ee42a122b05a7bbffe8b5c067e161fedb1c3161b

Contents?: true

Size: 1.97 KB

Versions: 62

Compression:

Stored size: 1.97 KB

Contents

- @page_title = t('workarea.admin.reports.sales_by_discount.title')

.view
  .view__header
    .view__heading
      = link_to "↑ #{t('workarea.admin.reports.all_reports')}", reports_dashboards_path
      %h1.heading.heading--no-margin= t('workarea.admin.reports.sales_by_discount.title')
      %p= t('workarea.admin.reports.reference_link_html', path: reference_report_path)

  .view__container
    .browsing-controls.browsing-controls--with-divider.browsing-controls--center.browsing-controls--filters-displayed
      = form_tag sales_by_discount_report_path, method: 'get', class: 'browsing-controls__form' do
        = render 'workarea/admin/shared/date_selector', starts_at: @report.starts_at, ends_at: @report.ends_at

      .browsing-controls__count
        = render_reports_results_message(@report)
        = render 'workarea/admin/reports/export', report: @report

    %table
      %thead
        %tr
          %th= t('workarea.admin.fields.discount')
          %th.align-center= link_to_reports_sorting t('workarea.admin.fields.orders'), report: @report, sort_by: 'orders'
          %th.align-right= link_to_reports_sorting t('workarea.admin.fields.merchandise'), report: @report, sort_by: 'merchandise'
          %th.align-right= link_to_reports_sorting t('workarea.admin.fields.discounts'), report: @report, sort_by: 'discounts'
          %th.align-right= link_to_reports_sorting t('workarea.admin.fields.revenue'), report: @report, sort_by: 'revenue'
      %tbody
        - @report.results.each do |result|
          %tr
            %td
              - if result.discount.present?
                = link_to result.discount.name, pricing_discount_path(result.discount)
              - else
                = t('workarea.admin.reports.unknown')
            %td.align-center= number_with_delimiter result.orders
            %td.align-right= number_to_currency(result.merchandise)
            %td.align-right= number_to_currency(result.discounts)
            %td.align-right= number_to_currency(result.revenue)

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.26 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.45 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.25 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.23 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.44 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.22 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.43 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.21 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.42 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.20 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.41 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.19 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.40 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.18 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.39 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.17 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.38 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.5.16 app/views/workarea/admin/reports/sales_by_discount.html.haml
workarea-admin-3.4.37 app/views/workarea/admin/reports/sales_by_discount.html.haml