Skip to content

Commit f6e935a

Browse files
authored
Merge pull request #104 from adrbarros/master
Ajustes no APP Teste para Separar o Envio das Tag IBSCBS e IS da Reforma Tributária
2 parents 3dea69c + bd49a42 commit f6e935a

File tree

4 files changed

+35
-26
lines changed

4 files changed

+35
-26
lines changed

NFe.AppTeste/ConfiguracaoApp.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public ConfiguracaoServico CfgServico
5353
public ConfiguracaoDanfeNfce ConfiguracaoDanfeNfce { get; set; }
5454

5555
public bool EnviarTributacaoIbsCbs { get; set; }
56+
public bool EnviarTributacaoIS { get; set; }
5657

5758
/// <summary>
5859
/// Salva os dados de CfgServico em um arquivo XML

NFe.AppTeste/MainWindow.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,15 @@
309309
VerticalAlignment="Top" Width="178"
310310
/>
311311
</StackPanel>
312+
313+
<StackPanel Margin="10,10,0,0">
314+
<CheckBox Name="CbxEnviarTributacaoIS" Content="Enviar Tributação IS"
315+
HorizontalAlignment="Left"
316+
VerticalAlignment="Top" Width="178"
317+
/>
318+
</StackPanel>
319+
320+
<StackPanel/>
312321
</StackPanel>
313322
</Grid>
314323
</TabItem>

NFe.AppTeste/MainWindow.xaml.cs

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Drawing.Imaging;
4-
using System.IO;
5-
using System.Linq;
6-
using System.Reflection;
7-
using System.Windows;
8-
using System.Windows.Forms;
91
using DFe.Classes.Flags;
102
using DFe.Utils;
113
using NFe.Classes;
@@ -27,25 +19,31 @@
2719
using NFe.Classes.Informacoes.Transporte;
2820
using NFe.Classes.Servicos.ConsultaCadastro;
2921
using NFe.Classes.Servicos.Tipos;
22+
using NFe.Danfe.Nativo.NFCe;
3023
using NFe.Servicos;
3124
using NFe.Servicos.Retorno;
25+
using NFe.Utils;
3226
using NFe.Utils.Email;
27+
using NFe.Utils.Excecoes;
3328
using NFe.Utils.InformacoesSuplementares;
3429
using NFe.Utils.NFe;
3530
using NFe.Utils.Tributacao.Estadual;
31+
using NFe.Utils.Tributacao.Federal;
32+
using System;
33+
using System.Collections.Generic;
34+
using System.Drawing.Imaging;
35+
using System.IO;
36+
using System.Linq;
37+
using System.Reflection;
38+
using System.Security.Cryptography;
39+
using System.Text;
40+
using System.Windows;
41+
using System.Windows.Forms;
42+
using System.Windows.Media.Imaging;
43+
using Image = System.Drawing.Image;
3644
using RichTextBox = System.Windows.Controls.RichTextBox;
3745
using SaveFileDialog = Microsoft.Win32.SaveFileDialog;
3846
using WebBrowser = System.Windows.Controls.WebBrowser;
39-
using System.Windows.Media.Imaging;
40-
using NFe.Danfe.Nativo.NFCe;
41-
using NFe.Utils;
42-
using NFe.Utils.Excecoes;
43-
using NFe.Utils.Tributacao.Federal;
44-
using Image = System.Drawing.Image;
45-
using static System.Net.Mime.MediaTypeNames;
46-
using System.Text;
47-
using System.Security.Cryptography;
48-
using DFe.Utils.Assinatura;
4947

5048
namespace NFe.AppTeste
5149
{
@@ -132,6 +130,7 @@ private void SalvarConfiguracao()
132130
try
133131
{
134132
_configuracoes.EnviarTributacaoIbsCbs = CbxEnviarTributacaoIbsCBS.IsChecked ?? false;
133+
_configuracoes.EnviarTributacaoIS = CbxEnviarTributacaoIS.IsChecked ?? false;
135134
_configuracoes.SalvarParaAqruivo(_path + ArquivoConfiguracao);
136135
}
137136
catch (Exception ex)
@@ -162,8 +161,8 @@ private void CarregarConfiguracao()
162161
LogoEmitente.Source = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
163162
}
164163

165-
166164
CbxEnviarTributacaoIbsCBS.IsChecked = _configuracoes.EnviarTributacaoIbsCbs;
165+
CbxEnviarTributacaoIS.IsChecked = _configuracoes.EnviarTributacaoIS;
167166

168167
#endregion
169168
}
@@ -1518,7 +1517,7 @@ protected virtual det GetDetalhe(int i, CRT crt, ModeloDocumento modelo)
15181517
TipoPIS = new PISOutr { CST = CSTPIS.pis99, pPIS = 0, vBC = 0, vPIS = 0 }
15191518
},
15201519

1521-
IS = CbxEnviarTributacaoIbsCBS.IsChecked == true ? new IS
1520+
IS = CbxEnviarTributacaoIS.IsChecked == true ? new IS
15221521
{
15231522
cClassTribIS = cClassTribIS.ctis000001,
15241523
uTrib = "UN",
@@ -1550,7 +1549,7 @@ protected virtual det GetDetalhe(int i, CRT crt, ModeloDocumento modelo)
15501549
pCBS = 0.90m,
15511550
vCBS = 0,
15521551
},
1553-
// vIBS = 0 opcional
1552+
vIBS = 0// opcional
15541553
}
15551554
} : null
15561555
}
@@ -1810,8 +1809,12 @@ protected virtual total GetTotal(VersaoServico versao, List<det> produtos)
18101809
vCBS = 0,
18111810
vCredPres = 0,
18121811
vCredPresCondSus = 0
1813-
}
1812+
}
18141813
} : null,
1814+
ISTot = CbxEnviarTributacaoIS.IsChecked == true ? new ISTot()
1815+
{
1816+
vIS = 0
1817+
} : null
18151818
};
18161819
return t;
18171820
}
@@ -2306,7 +2309,5 @@ private void BtnCancelarNFeSubstituicao_OnClick(object sender, RoutedEventArgs e
23062309
Funcoes.Mensagem(ex.Message, "Erro", MessageBoxButton.OK);
23072310
}
23082311
}
2309-
2310-
23112312
}
23122313
}

NFe.Utils/InformacoesSuplementares/ExtinfNFeSupl.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
using System;
88
using System.Collections.Generic;
99
using System.Linq;
10-
using System.Security.Cryptography;
11-
using System.Security.Cryptography.X509Certificates;
1210
using System.Text;
1311

1412
namespace NFe.Utils.InformacoesSuplementares

0 commit comments

Comments
 (0)