Class: BrDanfe::DanfeLib::NfceLib::Footer
- Inherits:
-
Object
- Object
- BrDanfe::DanfeLib::NfceLib::Footer
- Defined in:
- lib/br_danfe/danfe_lib/nfce_lib/footer.rb
Instance Method Summary collapse
-
#initialize(pdf, xml) ⇒ Footer
constructor
A new instance of Footer.
- #render(info = '') ⇒ Object
Constructor Details
#initialize(pdf, xml) ⇒ Footer
Returns a new instance of Footer.
5 6 7 8 |
# File 'lib/br_danfe/danfe_lib/nfce_lib/footer.rb', line 5 def initialize(pdf, xml) @pdf = pdf @xml = xml end |
Instance Method Details
#render(info = '') ⇒ Object
10 11 12 13 14 15 16 17 18 |
# 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 |