class BrDanfe::DanfeLib::NfceLib::Footer

Public Class Methods

new(pdf, xml) click to toggle source
# File lib/br_danfe/danfe_lib/nfce_lib/footer.rb, line 5
def initialize(pdf, xml)
  @pdf = pdf
  @xml = xml
end

Public Instance Methods

render(info = '') click to toggle source
# File lib/br_danfe/danfe_lib/nfce_lib/footer.rb, line 10
def render(info = '')
  tot_trib = @xml['ICMSTot/vTotTrib'].present? ? BrDanfe::Helper.numerify(@xml['ICMSTot/vTotTrib']) : '0,00'
  @pdf.text "Tributos Totais Incidentes (Lei Federal 12.741/2012): R$ #{tot_trib}", size: 8, align: :center

  if info.present?
    @pdf.render_blank_line
    @pdf.text info, size: 8, align: :center
  end
end