Module: BrInvoicesPdf::Cfe::Parser::ProductsData

Extended by:
Util::XmlLocate
Defined in:
lib/br_invoices_pdf/cfe/parser/products_data.rb

Constant Summary collapse

FIELDS =
{ code: 'cProd',
description: 'xProd',
cfop: 'CFOP',
quantity: 'qCom',
unit_label: 'uCom',
total_value: 'vProd',
unit_value: 'vUnCom',
item_value: 'vItem' }.freeze

Class Method Summary collapse

Methods included from Util::XmlLocate

locate_element, node_locate, root_path

Class Method Details

.execute(xml) ⇒ Object



20
21
22
23
# File 'lib/br_invoices_pdf/cfe/parser/products_data.rb', line 20

def execute(xml)
  node_products = xml.locate('infCFe/det')
  products_params(node_products) if node_products
end