Class: DtefacilXmlBuilder::Detalle

Inherits:
Object
  • Object
show all
Defined in:
lib/dtefacil_xml_builder/detalle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cantidadObject

Returns the value of attribute cantidad.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def cantidad
  @cantidad
end

#descripcionObject

Returns the value of attribute descripcion.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def descripcion
  @descripcion
end

#descuentoObject

Returns the value of attribute descuento.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def descuento
  @descuento
end

#exentoObject

Returns the value of attribute exento.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def exento
  @exento
end

#monto_totalObject

Returns the value of attribute monto_total.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def monto_total
  @monto_total
end

#nombreObject

Returns the value of attribute nombre.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def nombre
  @nombre
end

#numero_lineaObject

Returns the value of attribute numero_linea.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def numero_linea
  @numero_linea
end

#precio_unitarioObject

Returns the value of attribute precio_unitario.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def precio_unitario
  @precio_unitario
end

#unidadObject

Returns the value of attribute unidad.



3
4
5
# File 'lib/dtefacil_xml_builder/detalle.rb', line 3

def unidad
  @unidad
end

Instance Method Details

#set_detalle(detalle) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/dtefacil_xml_builder/detalle.rb', line 5

def set_detalle detalle
  @nombre     = detalle[:nombre]
  @cantidad     = detalle[:cantidad]
  @precio_unitario = detalle[:precio_unitario]

  if detalle[:descripcion]
    @descripcion=detalle[:descripcion]
  end

  if detalle[:descuento]
    @descuento = detalle[:descuento]  
  end

  if detalle[:unidad]
    @unidad = detalle[:unidad]
  end

  if detalle[:exento]
    @exento = detalle[:exento]  
  end

  if detalle[:numero_linea]
    @numero_linea= detalle[:numero_linea]
  end

  if detalle[:monto_total]
    @monto_total= detalle[:monto_total]
  end
end