Sha256: 82903eef8f7be510723a10701e4202ae11bfc20b242f8b9796999be7f272fcb5

Contents?: true

Size: 765 Bytes

Versions: 14

Compression:

Stored size: 765 Bytes

Contents

module BrInvoicesPdf
  module Cfe
    module Parser
      module Sat
        extend BaseParser

        module_function

        AVAILABLE_UF = { '35' => 'São Paulo' }.freeze

        def execute(xml)
          {
            pos_number: locate_element(xml, 'infCFe/ide/numeroCaixa'),
            ncfe_number: locate_element(xml, 'infCFe/ide/nCFe'),
            uf: AVAILABLE_UF[locate_element(xml, 'infCFe/ide/cUF')],
            sat_number: locate_element(xml, 'infCFe/ide/nserieSAT'),
            emission_date: locate_element(xml, 'infCFe/ide/dEmi'),
            emission_hour: locate_element(xml, 'infCFe/ide/hEmi'),
            document_qr_code_signature: locate_element(xml, 'infCFe/ide/assinaturaQRCODE')
          }
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
br_invoices_pdf-0.2.6 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.6.alpha.18 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.5.alpha.17 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.5 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.5.alpha.16 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.4 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.4.alpha.15 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.4.alpha.14 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.3 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.2 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.1 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.0 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.0.alpha.13 lib/br_invoices_pdf/cfe/parser/sat.rb
br_invoices_pdf-0.2.0.alpha.12 lib/br_invoices_pdf/cfe/parser/sat.rb