module BrInvoicesPdf::Nfce::Renderer::TaxesInfo

Public Instance Methods

execute(pdf, data) click to toggle source
# File lib/br_invoices_pdf/nfce/renderer/taxes_info.rb, line 12
def execute(pdf, data)
  box(pdf, [0, pdf.cursor], page_content_width(pdf)) do
    tribute_values(pdf, data[:additional_info])
  end
end
tribute_values(pdf, taxes) click to toggle source

:reek: FeatureEnvy

# File lib/br_invoices_pdf/nfce/renderer/taxes_info.rb, line 19
def tribute_values(pdf, taxes)
  pdf.text("Tributos\n\n", style: :italic)
  value = format_currency(taxes)
  text = "Informação dos tributos totais incidentes (Lei Federal 12.741/2012):\n R$ #{value}\n\n"
  pdf.text(text, align: :center)
end