Class: NfeReader::Total
- Inherits:
-
Object
- Object
- NfeReader::Total
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/total.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#another ⇒ Object
readonly
Returns the value of attribute another.
-
#cofins ⇒ Object
readonly
Returns the value of attribute cofins.
-
#descount ⇒ Object
readonly
Returns the value of attribute descount.
-
#freight ⇒ Object
readonly
Returns the value of attribute freight.
-
#icms ⇒ Object
readonly
Returns the value of attribute icms.
-
#icms_base ⇒ Object
readonly
Returns the value of attribute icms_base.
-
#ii ⇒ Object
readonly
Returns the value of attribute ii.
-
#insurance ⇒ Object
readonly
Returns the value of attribute insurance.
-
#ipi ⇒ Object
readonly
Returns the value of attribute ipi.
-
#pis ⇒ Object
readonly
Returns the value of attribute pis.
-
#product ⇒ Object
readonly
Returns the value of attribute product.
-
#retention_cofins ⇒ Object
readonly
Returns the value of attribute retention_cofins.
-
#retention_csll ⇒ Object
readonly
Returns the value of attribute retention_csll.
-
#retention_foresight ⇒ Object
readonly
Returns the value of attribute retention_foresight.
-
#retention_foresight_base ⇒ Object
readonly
Returns the value of attribute retention_foresight_base.
-
#retention_irrf ⇒ Object
readonly
Returns the value of attribute retention_irrf.
-
#retention_irrf_base ⇒ Object
readonly
Returns the value of attribute retention_irrf_base.
-
#retention_pis ⇒ Object
readonly
Returns the value of attribute retention_pis.
-
#service_base ⇒ Object
readonly
Returns the value of attribute service_base.
-
#service_cofins ⇒ Object
readonly
Returns the value of attribute service_cofins.
-
#service_iss ⇒ Object
readonly
Returns the value of attribute service_iss.
-
#service_pis ⇒ Object
readonly
Returns the value of attribute service_pis.
-
#service_value ⇒ Object
readonly
Returns the value of attribute service_value.
-
#st ⇒ Object
readonly
Returns the value of attribute st.
-
#st_base ⇒ Object
readonly
Returns the value of attribute st_base.
-
#tax ⇒ Object
readonly
Returns the value of attribute tax.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Total
constructor
A new instance of Total.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Total
Returns a new instance of Total.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/nfe_reader/total.rb', line 12 def initialize(attrs = {}) # Impostos if attrs[:ICMSTot] # Base ICMS @icms_base = attrs[:ICMSTot][:vBC] # Valor ICMS @icms = attrs[:ICMSTot][:vICMS] # Base ICMS ST @st_base = attrs[:ICMSTot][:vBCST] # Valor ICMS ST @st = attrs[:ICMSTot][:vST] # Total de Produtos @product = attrs[:ICMSTot][:vProd] # Total de Frete @freight = attrs[:ICMSTot][:vFrete] # Total de Seguro @insurance = attrs[:ICMSTot][:vSeg] # Total de Desconto @descount = attrs[:ICMSTot][:vDesc] # Total de Imposto de Importacao @ii = attrs[:ICMSTot][:vII] # Total de IPI @ipi = attrs[:ICMSTot][:vIPI] # Total de PIS @pis = attrs[:ICMSTot][:vPIS] # Total de COFINS @cofins = attrs[:ICMSTot][:vCOFINS] # Total de Outros @another = attrs[:ICMSTot][:vOutro] # Total NFe @total = attrs[:ICMSTot][:vNF] # Total NFe @tax = attrs[:ICMSTot][:vTotTrib] end # Servicos if attrs[:ISSQNtot] # Valor do Servico @service_value = attrs[:ISSQNtot][:vServ] # Base de calculo do Servico @service_base = attrs[:ISSQNtot][:vBC] # ISS do Servico @service_iss = attrs[:ISSQNtot][:vISS] # Pis do Servico @service_pis = attrs[:ISSQNtot][:vPIS] # Cofins do Servico @service_cofins = attrs[:ISSQNtot][:vCOFINS] end # Retencoes if attrs[:retTrib] # Retencao de PIS @retention_pis = attrs[:retTrib][:vRetPIS] # Retencao de COFINS @retention_cofins = attrs[:retTrib][:vRetCOFINS] # Retencao de CSLL @retention_csll = attrs[:retTrib][:vRetCSLL] # Base de Retencao do IRRF @retention_irrf_base = attrs[:retTrib][:vBCIRRF] # Valor de Retencao do IRRF @retention_irrf = attrs[:retTrib][:vIRRF] # Base de Retencao da Previdencia @retention_foresight_base = attrs[:retTrib][:vBCRetPrev] # Valor de Retencao da Previdencia @retention_foresight = attrs[:retTrib][:vRetPrev] end end |
Instance Attribute Details
#another ⇒ Object (readonly)
Returns the value of attribute another.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def another @another end |
#cofins ⇒ Object (readonly)
Returns the value of attribute cofins.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def cofins @cofins end |
#descount ⇒ Object (readonly)
Returns the value of attribute descount.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def descount @descount end |
#freight ⇒ Object (readonly)
Returns the value of attribute freight.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def freight @freight end |
#icms ⇒ Object (readonly)
Returns the value of attribute icms.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def icms @icms end |
#icms_base ⇒ Object (readonly)
Returns the value of attribute icms_base.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def icms_base @icms_base end |
#ii ⇒ Object (readonly)
Returns the value of attribute ii.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def ii @ii end |
#insurance ⇒ Object (readonly)
Returns the value of attribute insurance.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def insurance @insurance end |
#ipi ⇒ Object (readonly)
Returns the value of attribute ipi.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def ipi @ipi end |
#pis ⇒ Object (readonly)
Returns the value of attribute pis.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def pis @pis end |
#product ⇒ Object (readonly)
Returns the value of attribute product.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def product @product end |
#retention_cofins ⇒ Object (readonly)
Returns the value of attribute retention_cofins.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_cofins @retention_cofins end |
#retention_csll ⇒ Object (readonly)
Returns the value of attribute retention_csll.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_csll @retention_csll end |
#retention_foresight ⇒ Object (readonly)
Returns the value of attribute retention_foresight.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_foresight @retention_foresight end |
#retention_foresight_base ⇒ Object (readonly)
Returns the value of attribute retention_foresight_base.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_foresight_base @retention_foresight_base end |
#retention_irrf ⇒ Object (readonly)
Returns the value of attribute retention_irrf.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_irrf @retention_irrf end |
#retention_irrf_base ⇒ Object (readonly)
Returns the value of attribute retention_irrf_base.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_irrf_base @retention_irrf_base end |
#retention_pis ⇒ Object (readonly)
Returns the value of attribute retention_pis.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def retention_pis @retention_pis end |
#service_base ⇒ Object (readonly)
Returns the value of attribute service_base.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def service_base @service_base end |
#service_cofins ⇒ Object (readonly)
Returns the value of attribute service_cofins.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def service_cofins @service_cofins end |
#service_iss ⇒ Object (readonly)
Returns the value of attribute service_iss.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def service_iss @service_iss end |
#service_pis ⇒ Object (readonly)
Returns the value of attribute service_pis.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def service_pis @service_pis end |
#service_value ⇒ Object (readonly)
Returns the value of attribute service_value.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def service_value @service_value end |
#st ⇒ Object (readonly)
Returns the value of attribute st.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def st @st end |
#st_base ⇒ Object (readonly)
Returns the value of attribute st_base.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def st_base @st_base end |
#tax ⇒ Object (readonly)
Returns the value of attribute tax.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def tax @tax end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
6 7 8 |
# File 'lib/nfe_reader/total.rb', line 6 def total @total end |