Method: Facturapi::Helpers::Detalle#initialize
- Defined in:
- lib/facturapi/helpers/detalle.rb
#initialize(params = {}) ⇒ Detalle
Returns a new instance of Detalle.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/facturapi/helpers/detalle.rb', line 99 def initialize(params = {}) @nro_lin_det = params[:nro_lin_det] @tpo_codigo = params[:tpo_codigo] || 'INT1' @vlr_codigo = params[:vlr_codigo] @ind_exe = /^[0126]$/ =~ params[:ind_exe].to_s ? params[:ind_exe].to_s : '0' @nmb_item = params[:nmb_item] @qty_item = params[:qty_item].to_f.round(6) @prc_item = params[:prc_item].to_f.round(2) @monto_item = params[:monto_item] @rut_mandante = params[:rut_mandante] @dsc_item = params[:dsc_item] @unmd_item = params[:unmd_item] || 'UN' @descuento_pct = params[:descuento_pct] @descuento_monto = params[:descuento_monto] @recargo_pct = params[:recargo_pct] @recargo_monto = params[:recargo_monto] end |