Skip to content

Commit

Permalink
Implementado opção para imprimir a descrição completa do produto na D…
Browse files Browse the repository at this point in the history
…ANFe da NFCe (#1506)

* - Adicionado impressão completa da descrição do produto na NFCe

* - Ajustado espaçamento entre linhas para usar o tamanho do elemento

* - Ajustes de condicional
  • Loading branch information
AgnaldoSilva0 authored Mar 28, 2024
1 parent 950337a commit 3381608
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 144 deletions.
8 changes: 8 additions & 0 deletions NFe.Danfe.AppTeste.Fast/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="190,5,0,0"
IsChecked="{Binding ConfiguracaoDanfeNfce.DetalheVendaNormal, ConverterParameter={x:Static base:NfceDetalheVendaNormal.DuasLinhas}, Converter={StaticResource EnumParaBool}}" />
<RadioButton x:Name="RdbCompleto" Content="Completo"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="280,5,0,0"
IsChecked="{Binding ConfiguracaoDanfeNfce.DetalheVendaNormal, ConverterParameter={x:Static base:NfceDetalheVendaNormal.Completo}, Converter={StaticResource EnumParaBool}}" />
</Grid>
</GroupBox>

Expand All @@ -51,6 +55,10 @@
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="108,5,0,0"
IsChecked="{Binding ConfiguracaoDanfeNfce.DetalheVendaContigencia, ConverterParameter={x:Static base:NfceDetalheVendaContigencia.DuasLinhas}, Converter={StaticResource EnumParaBool}}" />
<RadioButton Content="Completo"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="200,5,0,0"
IsChecked="{Binding ConfiguracaoDanfeNfce.DetalheVendaContigencia, ConverterParameter={x:Static base:NfceDetalheVendaContigencia.Completo}, Converter={StaticResource EnumParaBool}}" />
</Grid>
</GroupBox>

Expand Down
9 changes: 6 additions & 3 deletions NFe.Danfe.AppTeste.Fast/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void BtnNfeDanfeA4_Click(object sender, RoutedEventArgs e)
configuracaoDanfeNfe: new ConfiguracaoDanfeNfe()
{
Logomarca = _configuracoes.ConfiguracaoDanfeNfce.Logomarca,
DuasLinhas = RdbDuasLinhas.IsChecked ?? false,
DuasLinhas = RdbDuasLinhas.IsChecked == true || RdbCompleto.IsChecked == true,
DocumentoCancelado = ChbCancelado.IsChecked ?? false,
QuebrarLinhasObservacao = _configuracoes.ConfiguracaoDanfeNfe.QuebrarLinhasObservacao,
ExibirResumoCanhoto = _configuracoes.ConfiguracaoDanfeNfe.ExibirResumoCanhoto,
Expand Down Expand Up @@ -227,7 +227,10 @@ private void btnEventoNFe_Click(object sender, RoutedEventArgs e)
#endregion

#region Abre a visualização do relatório para impressão
var danfe = new DanfeFrEvento(proc, procEvento, new ConfiguracaoDanfeNfe(_configuracoes.ConfiguracaoDanfeNfce.Logomarca, RdbDuasLinhas.IsChecked ?? false, ChbCancelado.IsChecked ?? false), "NOME DA SOFTWARE HOUSE");
var danfe = new DanfeFrEvento(proc, procEvento, new ConfiguracaoDanfeNfe(_configuracoes.ConfiguracaoDanfeNfce.Logomarca,
RdbDuasLinhas.IsChecked == true || RdbCompleto.IsChecked == true,
ChbCancelado.IsChecked ?? false),
"NOME DA SOFTWARE HOUSE");
danfe.Visualizar();
//danfe.Imprimir();
//danfe.ExibirDesign();
Expand Down Expand Up @@ -324,7 +327,7 @@ private void BtnNFeSimplificado_Click(object sender, RoutedEventArgs e)
configuracaoDanfeNfe: new ConfiguracaoDanfeNfe()
{
Logomarca = _configuracoes.ConfiguracaoDanfeNfce.Logomarca,
DuasLinhas = RdbDuasLinhas.IsChecked ?? false,
DuasLinhas = RdbDuasLinhas.IsChecked == true || RdbCompleto.IsChecked == true,
DocumentoCancelado = ChbCancelado.IsChecked ?? false,
QuebrarLinhasObservacao = _configuracoes.ConfiguracaoDanfeNfe.QuebrarLinhasObservacao,
ExibirResumoCanhoto = _configuracoes.ConfiguracaoDanfeNfe.ExibirResumoCanhoto,
Expand Down
6 changes: 4 additions & 2 deletions NFe.Danfe.Base/Enumns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ public enum NfceDetalheVendaNormal
{
NaoImprimir = 0,
UmaLinha = 1,
DuasLinhas = 2
DuasLinhas = 2,
Completo = 3
}

public enum NfceDetalheVendaContigencia
{
UmaLinha = 1,
DuasLinhas = 2
DuasLinhas = 2,
Completo = 3
}

public enum NfceModoImpressao
Expand Down
Loading

0 comments on commit 3381608

Please sign in to comment.