Class: NfeReader::Icms
- Inherits:
-
Object
- Object
- NfeReader::Icms
- Includes:
- AttributeHelper
- Defined in:
- lib/nfe_reader/taxation/icms.rb
Constant Summary
Constants included from AttributeHelper
Instance Attribute Summary collapse
-
#credit_percentage ⇒ Object
readonly
Returns the value of attribute credit_percentage.
-
#cst ⇒ Object
readonly
Returns the value of attribute cst.
-
#icms ⇒ Object
readonly
Returns the value of attribute icms.
-
#icms_base ⇒ Object
readonly
Returns the value of attribute icms_base.
-
#icms_base_kind ⇒ Object
readonly
Returns the value of attribute icms_base_kind.
-
#icms_base_reduction ⇒ Object
readonly
Returns the value of attribute icms_base_reduction.
-
#icms_credit ⇒ Object
readonly
Returns the value of attribute icms_credit.
-
#icms_percentage ⇒ Object
readonly
Returns the value of attribute icms_percentage.
-
#icms_st ⇒ Object
readonly
Returns the value of attribute icms_st.
-
#icms_st_base ⇒ Object
readonly
Returns the value of attribute icms_st_base.
-
#icms_st_base_kind ⇒ Object
readonly
Returns the value of attribute icms_st_base_kind.
-
#icms_st_base_reduction ⇒ Object
readonly
Returns the value of attribute icms_st_base_reduction.
-
#icms_st_base_retained ⇒ Object
readonly
Returns the value of attribute icms_st_base_retained.
-
#icms_st_base_retained_sender ⇒ Object
readonly
Returns the value of attribute icms_st_base_retained_sender.
-
#icms_st_percentage ⇒ Object
readonly
Returns the value of attribute icms_st_percentage.
-
#icms_st_retained ⇒ Object
readonly
Returns the value of attribute icms_st_retained.
-
#icms_st_retained_sender ⇒ Object
readonly
Returns the value of attribute icms_st_retained_sender.
-
#mva ⇒ Object
readonly
Returns the value of attribute mva.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#retained_reason ⇒ Object
readonly
Returns the value of attribute retained_reason.
-
#sn_operation_code ⇒ Object
readonly
Returns the value of attribute sn_operation_code.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Icms
constructor
Field Values.
Methods included from AttributeHelper
#attributes, #attributes_to_hash
Constructor Details
#initialize(attrs = {}) ⇒ Icms
Field Values
ori: 0 - Nacional
1 - Estrangeira - Importação direta
2 - Estrangeira – Adquirida no mercado interno.
modBC: 0 - Margem Valor Agregado (%);
1 - Pauta (Valor);
2 - Preço Tabelado Máx. (valor);
3 - valor da operação.
modBCST: 0 – Preço tabelado ou máximosugerido;
1 - Lista Negativa (valor);
2 - Lista Positiva (valor);
3 - Lista Neutra (valor);
4 - Margem Valor Agregado (%);
5 - Pauta (valor);
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 79 80 81 82 83 84 85 86 87 |
# File 'lib/nfe_reader/taxation/icms.rb', line 30 def initialize(attrs = {}) attrs = attrs.values[0] # Origem da mercadoria @origin = attrs[:orig] || attrs[:Orig] # Tributação do ICMS @cst = attrs[:CST] # == ICMS # # % ICMS @icms_percentage = attrs[:pICMS] # Valor ICMS @icms = attrs[:vICMS] # Modalidade de determinação da BC do ICMS @icms_base_kind = attrs[:modBC] # Base ICMS @icms_base = attrs[:vBC] # % Redução Base ICMS @icms_base_reduction = attrs[:pRedBC] # == ICMS ST # # Modalidade de determinação da BC do ICMS ST @icms_st_base_kind = attrs[:modBCST] # % redução Base ICMS ST @icms_st_base_reduction = attrs[:pRedBCST] # MVA ST @mva = attrs[:pMVAST] # Base ICMS ST @icms_st_base = attrs[:vBCST] # % ICMS ST @icms_st_percentage = attrs[:pICMSST] # Valor ICMS ST @icms_st = attrs[:vICMSST] # Valor do BC do ICMS ST Retido UF Remetente @icms_st_base_retained_sender = attrs[:vBCSTRet] # Valor ICMS ST Retido UF Remetente @icms_st_retained_sender = attrs[:vICMSSTRet] # Valor do BC do ICMS ST Retido UF Destiantaria @icms_st_base_retained = attrs[:vBCSTDest] # Valor ICMS ST Retido UF Destinataria @icms_st_retained = attrs[:vICMSSTDes] # UF para qual é devido o ICMS ST @state = attrs[:UFST] # == Simples Nacional # # Motivo da desoneração do ICMS @retained_reason = attrs[:motDesICMS] # Alíquota aplicável de cálculo do crédito @credit_percentage = attrs[:pCredSN] # Valor crédito do ICMS que pode ser aproveitado nos termos do art. 23 da LC 123 @icms_credit = attrs[:vCredICMSSN] # Código de Situação da Operação @sn_operation_code = attrs[:CSOSN] end |
Instance Attribute Details
#credit_percentage ⇒ Object (readonly)
Returns the value of attribute credit_percentage.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def credit_percentage @credit_percentage end |
#cst ⇒ Object (readonly)
Returns the value of attribute cst.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def cst @cst end |
#icms ⇒ Object (readonly)
Returns the value of attribute icms.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.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/taxation/icms.rb', line 6 def icms_base @icms_base end |
#icms_base_kind ⇒ Object (readonly)
Returns the value of attribute icms_base_kind.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_base_kind @icms_base_kind end |
#icms_base_reduction ⇒ Object (readonly)
Returns the value of attribute icms_base_reduction.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_base_reduction @icms_base_reduction end |
#icms_credit ⇒ Object (readonly)
Returns the value of attribute icms_credit.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_credit @icms_credit end |
#icms_percentage ⇒ Object (readonly)
Returns the value of attribute icms_percentage.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_percentage @icms_percentage end |
#icms_st ⇒ Object (readonly)
Returns the value of attribute icms_st.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st @icms_st end |
#icms_st_base ⇒ Object (readonly)
Returns the value of attribute icms_st_base.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_base @icms_st_base end |
#icms_st_base_kind ⇒ Object (readonly)
Returns the value of attribute icms_st_base_kind.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_base_kind @icms_st_base_kind end |
#icms_st_base_reduction ⇒ Object (readonly)
Returns the value of attribute icms_st_base_reduction.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_base_reduction @icms_st_base_reduction end |
#icms_st_base_retained ⇒ Object (readonly)
Returns the value of attribute icms_st_base_retained.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_base_retained @icms_st_base_retained end |
#icms_st_base_retained_sender ⇒ Object (readonly)
Returns the value of attribute icms_st_base_retained_sender.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_base_retained_sender @icms_st_base_retained_sender end |
#icms_st_percentage ⇒ Object (readonly)
Returns the value of attribute icms_st_percentage.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_percentage @icms_st_percentage end |
#icms_st_retained ⇒ Object (readonly)
Returns the value of attribute icms_st_retained.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_retained @icms_st_retained end |
#icms_st_retained_sender ⇒ Object (readonly)
Returns the value of attribute icms_st_retained_sender.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def icms_st_retained_sender @icms_st_retained_sender end |
#mva ⇒ Object (readonly)
Returns the value of attribute mva.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def mva @mva end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def origin @origin end |
#retained_reason ⇒ Object (readonly)
Returns the value of attribute retained_reason.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def retained_reason @retained_reason end |
#sn_operation_code ⇒ Object (readonly)
Returns the value of attribute sn_operation_code.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def sn_operation_code @sn_operation_code end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/nfe_reader/taxation/icms.rb', line 6 def state @state end |