Class: Nfe::Cofins

Inherits:
Object
  • Object
show all
Defined in:
lib/nfe_reader/taxation/cofins.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Cofins

Fieds Values

cst:

COFINSAliq:
  01 - Operação Tributável 
       (base de cálculo = valor da operação alíquota normal (cumulativo/não cumulativo));
  02 - Operação Tributável 
       (base de cálculo = valor da operação (alíquota diferenciada));
COFINSQtde:
  03 - Operação Tributável 
       (base de cálculo = quantidade vendida x alíquota por unidadede produto);
COFINSNT:
  04 - Operação Tributável
       (tributação monofásica(alíquota zero));
  06 - Operação Tributável(alíquota zero);
  07 - Operação Isenta da Contribuição;
  08 - Operação Sem Incidência da Contribuição;
  09 - Operação com Suspensão da Contribuição;
COFINSOutr:
  99 - Outras Operações;


28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/nfe_reader/taxation/cofins.rb', line 28

def initialize(attrs = {})
  # Cst COFINS
  @cst = attrs[:CST]
  # Base COFINS
  @base = attrs[:vBC]
  # % COFINS
  @percentage = attrs[:pCOFINS]
  # Valor COFINS
  @value = attrs[:vCOFINS]
  # Quantidade Vendida
  @amount = attrs[:qBCProd]
  # Alíquota do COFINS
  @aliquot = attrs[:vAliqProd]
end

Instance Attribute Details

#aliquotObject (readonly)

Returns the value of attribute aliquot.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def aliquot
  @aliquot
end

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def amount
  @amount
end

#baseObject (readonly)

Returns the value of attribute base.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def base
  @base
end

#cstObject (readonly)

Returns the value of attribute cst.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def cst
  @cst
end

#percentageObject (readonly)

Returns the value of attribute percentage.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def percentage
  @percentage
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/nfe_reader/taxation/cofins.rb', line 4

def value
  @value
end