Sha256: af0b6901fd8c8797bdce5aa517aaadd7915f96d34fc1c5a903f3a525ee2eaf35

Contents?: true

Size: 1.39 KB

Versions: 15

Compression:

Stored size: 1.39 KB

Contents

data = [
  [
    Dorsale::BillingMachine::Invoice.t(:date),
    Dorsale::BillingMachine::Invoice.t(:tracking_id),
    Dorsale::BillingMachine::Invoice.t(:label),
    Dorsale::CustomerVault::Person.t(:name),
    Dorsale::CustomerVault::Person.t(:street),
    Dorsale::CustomerVault::Person.t(:street_bis),
    Dorsale::CustomerVault::Person.t(:zip),
    Dorsale::CustomerVault::Person.t(:city),
    Dorsale::CustomerVault::Person.t(:country),
    Dorsale::BillingMachine::Invoice.t(:commercial_discount),
    Dorsale::BillingMachine::Invoice.t(:total_excluding_taxes),
    Dorsale::BillingMachine::Invoice.t(:vat_amount),
    Dorsale::BillingMachine::Invoice.t(:total_including_taxes),
    Dorsale::BillingMachine::Invoice.t(:advance),
    Dorsale::BillingMachine::Invoice.t(:balance),
  ]
]

@invoices_without_pagination.each do |invoice|
  data << [
    invoice.date,
    invoice.tracking_id,
    invoice.label,
    invoice.customer.try(:name),
    invoice.customer.try(:address).try(:street),
    invoice.customer.try(:address).try(:street_bis),
    invoice.customer.try(:address).try(:zip),
    invoice.customer.try(:address).try(:city),
    invoice.customer.try(:address).try(:country),
    invoice.commercial_discount,
    invoice.total_excluding_taxes,
    invoice.vat_amount,
    invoice.total_including_taxes,
    invoice.advance,
    invoice.balance,
  ]
end

Agilibox::Serializers::XLSX.new(data).render_inline

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dorsale-3.8.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.8.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.8 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.7 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.6 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.5 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.4 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.2 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.7.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.6.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.6.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.5.2 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.5.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.5.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby