8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/danfe/descricao.rb', line 8
def self.generate(det)
descricao = "#{det.css('prod/xProd').text}"
if need_infAdProd(det)
descricao += LINEBREAK
descricao += det.css('infAdProd').text
end
if need_fci(det)
descricao += LINEBREAK
descricao += "FCI: #{det.css('prod/nFCI').text}"
end
if need_st(det)
descricao += LINEBREAK
descricao += "ST: MVA: #{det.css('ICMS/*/pMVAST').text}% "
descricao += "* Alíq: #{det.css('ICMS/*/pICMSST').text}% "
descricao += "* BC: #{det.css('ICMS/*/vBCST').text} "
descricao += "* Vlr: #{det.css('ICMS/*/vICMSST').text}"
end
descricao
end
|