Sha256: 40b0ec8b23aaf60a2537abfe23ce75871b410433056a723fa4b928fb81fd522b

Contents?: true

Size: 639 Bytes

Versions: 14

Compression:

Stored size: 639 Bytes

Contents

module BrInvoicesPdf
  module Cfe
    module Parser
      module Payment
        extend BaseParser

        module_function

        def execute(xml)
          {
            approximate_value_of_taxes: locate_element(xml, 'infCFe/total/vCFeLei12741'),
            total: locate_element(xml, 'infCFe/total/vCFe'),
            discount: locate_element(xml, 'infCFe/total/ICMSTot/vDesc'),
            total_price: locate_element(xml, 'infCFe/total/ICMSTot/vProd'),
            cashback: locate_element(xml, 'infCFe/pgto/vTroco'),
            paid: locate_element(xml, 'infCFe/pgto/MP/vMP')
          }
        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/payment.rb
br_invoices_pdf-0.2.6.alpha.18 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.5.alpha.17 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.5 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.5.alpha.16 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.4 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.4.alpha.15 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.4.alpha.14 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.3 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.2 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.1 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.0 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.0.alpha.13 lib/br_invoices_pdf/cfe/parser/payment.rb
br_invoices_pdf-0.2.0.alpha.12 lib/br_invoices_pdf/cfe/parser/payment.rb