Sha256: 2dc7287adb6f60d4a81218d5db4a8080e02285a4b4664a3f5218e1276a09a34d

Contents?: true

Size: 844 Bytes

Versions: 1

Compression:

Stored size: 844 Bytes

Contents

add_worksheet DashboardOrderGroup.payments.title
bold = add_format(bold: 1)
headings = [
  I18n.t(:date, scope: [:account, :order, :table_title, :payments]),
  I18n.t(:transaction, scope: [:account, :order, :table_title, :payments]),
  I18n.t(:status, scope: [:account, :order, :table_title, :payments]),
  I18n.t(:price, scope: [:account, :order, :table_title, :payments]),
  I18n.t(:description, scope: [:account, :order, :table_title, :payments])
].freeze

write('A1', headings, bold)

@records.each_with_index do |payment, index|
  row = index + 1
  write row, 0, I18n.l(payment.parsed_created_at, format: TranslationCms.default_datetime_format)
  write row, 1, payment.id
  write row, 2, payment.transaction_type.title
  write row, 3, "$#{payment.amount}"
  write row, 4, ActionView::Base.full_sanitizer.sanitize(payment.parsed_title)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/views/account/orders/index.xlsx.xrb