Sha256: b264a13a7c8d61a8852635cac66c3c7df9318bddc0e7126fbd813f818c35774f

Contents?: true

Size: 1.39 KB

Versions: 36

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

36 entries across 36 versions & 1 rubygems

Version Path
dorsale-4.0.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.20.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.19.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.19.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.18.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.17.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.16.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.15.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.11 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.10 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.9 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.8 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.7 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.6 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.5 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.4 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.3 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.2 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.1 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby
dorsale-3.14.0 app/views/dorsale/billing_machine/invoices/index.xlsx.ruby