Sha256: 798eb44e0fc593434d26ed06adce232c74b28017f821cd45a98dfe6732df3e4f

Contents?: true

Size: 653 Bytes

Versions: 14

Compression:

Stored size: 653 Bytes

Contents

module BrInvoicesPdf
  module Cfe
    module Renderer
      module FiscoInfo
        extend BaseRenderer

        module_function

        # :reek:FeatureEnvy
        def execute(pdf, data)
          box(pdf, [0, pdf.cursor], page_content_width(pdf)) do
            pdf.text("Observações do fisco\n\n", style: :italic)
            add_fisco_obs(pdf, data[:fisco_obs])
          end
        end

        def add_fisco_obs(pdf, fisco_obs)
          fisco_obs.each do |element|
            pdf.text(element[:field] + ': ' + element[:text], align: :center)
          end
        end
        private_class_method :add_fisco_obs
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
br_invoices_pdf-0.2.6 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.6.alpha.18 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.5.alpha.17 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.5 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.5.alpha.16 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.4 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.4.alpha.15 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.4.alpha.14 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.3 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.2 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.1 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.0 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.0.alpha.13 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.0.alpha.12 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb