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.8 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.7 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb
br_invoices_pdf-0.2.6.alpha.19 lib/br_invoices_pdf/cfe/renderer/fisco_info.rb