Sha256: 013cea33d33e270512ea3c6c4d0380fd2fc011c0ad284e53a30bb3ffc487a1d6

Contents?: true

Size: 800 Bytes

Versions: 16

Compression:

Stored size: 800 Bytes

Contents

module BrDanfe
  module DanfeLib
    module NfceLib
      class NfceIdentification
        def initialize(pdf, xml)
          @pdf = pdf
          @xml = xml
        end

        def render
          emitted_at = BrDanfe::Helper.format_datetime(@xml['ide/dhEmi'])
          identification = "NFC-e nº #{@xml['ide/nNF']} Série #{@xml['ide/serie']} #{emitted_at}"

          @pdf.render_blank_line
          @pdf.text identification, size: 9, align: :center, style: :bold
          @pdf.text "<b>Protocolo de autorização:</b> #{@xml['infProt/nProt']}", size: 9, align: :center, inline_format: true
          @pdf.text "<b>Data de autorização: </b> #{BrDanfe::Helper.format_datetime(@xml['infProt/dhRecbto'])}", size: 9, align: :center, inline_format: true
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
br_danfe-1.2.1 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-1.2.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-1.1.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-1.0.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.20.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.19.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.18.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.8 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.7 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.6 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.5 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.4 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.3 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.2 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.1 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb
br_danfe-0.17.0 lib/br_danfe/danfe_lib/nfce_lib/nfce_identification.rb