Class: Cfdi40::TrasladosP
Instance Attribute Summary
Attributes inherited from Node
#children_nodes, #element_name, #parent_node, #readonly, #xml_document, #xml_parent
Instance Method Summary collapse
Methods inherited from Node
#add_attributes_to, #add_child_node, #add_children_to, #add_namespaces_to, #attibute_is_null?, attributes, #clean_cached_xml, #create_xml_node, #current_namespace, default_values, define_attribute, define_element_name, define_namespace, define_reader, define_writer, #delete_child, element_name, #expanded_element_name, formats, #formatted_value, #initialize, #load_from_ng_node, #lock, namespaces, #set_defaults, verify_class_variables
Constructor Details
This class inherits a constructor from Cfdi40::Node
Instance Method Details
#add_traslado_p_nodes ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cfdi40/traslados_p.rb', line 5 def add_traslado_p_nodes pago = parent_node.parent_node pago.traslados_summary.each do |key, data| traslado_p = TrasladoP.new traslado_p.impuesto_p = key[0] traslado_p.tipo_factor_p = key[1] traslado_p.tasa_o_cuota_p = key[2] traslado_p.base_p = data[:base] traslado_p.importe_p = data[:importe] add_child_node traslado_p end end |