Sha256: 9be525d25fee59bc3e91e6dcb4d9060c970f1dbec0f5236bbed62a30d0af9ae5

Contents?: true

Size: 718 Bytes

Versions: 23

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

module BrInvoicesPdf
  module Cfe
    module Renderer
      module FiscoInfo
        extend Util::BaseRenderer
        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

23 entries across 23 versions & 1 rubygems

Version Path
br_invoices_pdf-0.2.24 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.23 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.22 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.21 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.20 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.19 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.18 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.17 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.16 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.15 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.14 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.14.alpha.23 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.13 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.13.alpha.22 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.12.alpha.21 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.12.alpha.20 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.12 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.11 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.10 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.9 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb