Skip to content

Commit 6f2a86e

Browse files
Merge pull request mcfox#59 from taxweb/add-options-to-modalidade-frete
Add options to modalidade frete
2 parents 7884925 + 32c493b commit 6f2a86e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/ruby_danfe/danfe_generator.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def render_titulo
8585
@pdf.ibox 0.85, 12.32, 0.25, 8.58, "NOME/RAZÃO SOCIAL", @xml['dest/xNome']
8686
@pdf.ibox 0.85, 5.33, 12.57, 8.58, "CNPJ/CPF", @xml['dest/CNPJ'] if @xml['dest/CNPJ'] != ''
8787
@pdf.ibox 0.85, 5.33, 12.57, 8.58, "CNPJ/CPF", @xml['dest/CPF'] if @xml['dest/CPF'] != ''
88+
@pdf.ibox 0.85, 5.33, 12.57, 8.58, "CNPJ/CPF/Passaporte", @xml['dest/idEstrangeiro'] if @xml['dest/idEstrangeiro'] != ''
8889
@pdf.ibox 0.85, 2.92, 17.90, 8.58, "DATA DA EMISSÃO", (not @xml['ide/dEmi'].empty?) ? Helper.format_date(@xml['ide/dEmi']) : Helper.format_date(@xml['ide/dhEmi']) , {:align => :right}
8990
@pdf.ibox 0.85, 10.16, 0.25, 9.43, "ENDEREÇO", @xml['enderDest/xLgr'] + " " + @xml['enderDest/nro']
9091
@pdf.ibox 0.85, 4.83, 10.41, 9.43, "BAIRRO", @xml['enderDest/xBairro']
@@ -337,13 +338,17 @@ def render_produtos
337338
def descricao_modalidade_frete(modalidade)
338339
case modalidade
339340
when '1'
340-
"1 - Por conta do destinatário/remetente"
341+
"1 - Destinatário (FOB)"
341342
when '2'
342-
"2 - Por conta de terceiros"
343+
"2- Terceiros"
344+
when '3'
345+
"3- Remetente (Transp. Próprio)"
346+
when '4'
347+
"4- Remetente (Transp.Dest)"
343348
when '9'
344349
"9 - Sem frete"
345350
else
346-
"0 - Por conta do emitente"
351+
"0 - Remetente (CIF)"
347352
end
348353
end
349354
end

0 commit comments

Comments
 (0)