module BrInvoicesPdf::Cfe::Renderer::CompanyIdentification
:reek: DataClump
Public Instance Methods
company_params(pdf, data)
click to toggle source
:reek: FeatureEnvy
# File lib/br_invoices_pdf/cfe/renderer/company_identification.rb, line 21 def company_params(pdf, data) pdf.text(data[:trading_name], align: :center) pdf.text(data[:company_name], align: :center) pdf.text(format_address(data[:address]), align: :center) insert_fiscal_numbers(pdf, data) end
execute(pdf, data)
click to toggle source
# File lib/br_invoices_pdf/cfe/renderer/company_identification.rb, line 13 def execute(pdf, data) attributes = data[:company_attributes] pdf_setup(pdf) do company_params(pdf, attributes) end end
insert_fiscal_numbers(pdf, data)
click to toggle source
:reek: FeatureEnvy
# File lib/br_invoices_pdf/cfe/renderer/company_identification.rb, line 30 def insert_fiscal_numbers(pdf, data) pdf.text("CNPJ: #{format_cnpj(data[:cnpj])}", align: :center) pdf.text("Inscrição Estadual: #{data[:ie]}", align: :center) pdf.text("Inscrição Municipal: #{data[:im]}", align: :center) end