Module: BrInvoicesPdf::Nfce::Parser::Products
- Extended by:
- Util::XmlLocate
- Defined in:
- lib/br_invoices_pdf/nfce/parser/products.rb
Constant Summary collapse
- FIELDS =
{ code: 'cProd', description: 'xProd', quantity: 'qCom', unit_label: 'uCom', unit_value: 'vUnCom', total_value: 'vProd' }.freeze
Class Method Summary collapse
Methods included from Util::XmlLocate
locate_element, node_locate, root_path
Class Method Details
.execute(xml) ⇒ Object
18 19 20 21 |
# File 'lib/br_invoices_pdf/nfce/parser/products.rb', line 18 def execute(xml) node_products = xml.locate("#{root_path(xml)}/det") products_params(node_products) if node_products end |