Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feito as modificacoes já com o zeus #3

Merged
merged 1 commit into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ACBr.Net.Sat" Version="1.2.7.1" />
<PackageReference Include="DFeBR.EmissorNFe" Version="0.0.1" />
<PackageReference Include="Vip.Printer" Version="1.0.13" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Gerene.DFe.EscPos\Gerene.DFe.EscPos.csproj" />
</ItemGroup>
Expand Down
15 changes: 0 additions & 15 deletions Gerene.DFe.EscPos.Demo/Gerene.DFe.EscPos.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ACBr.Net.Core, Version=1.2.4.1, Culture=neutral, PublicKeyToken=d3bb9130f8b775a6, processorArchitecture=MSIL">
<HintPath>..\packages\ACBr.Net.Core.1.2.4.1\lib\net452\ACBr.Net.Core.dll</HintPath>
</Reference>
<Reference Include="ACBr.Net.DFe.Core, Version=1.2.7.1, Culture=neutral, PublicKeyToken=d3bb9130f8b775a6, processorArchitecture=MSIL">
<HintPath>..\packages\ACBr.Net.DFe.Core.1.2.7.1\lib\net452\ACBr.Net.DFe.Core.dll</HintPath>
</Reference>
<Reference Include="ACBr.Net.Integrador, Version=1.2.0.6, Culture=neutral, PublicKeyToken=d3bb9130f8b775a6, processorArchitecture=MSIL">
<HintPath>..\packages\ACBr.Net.Integrador.1.2.0.6\lib\net452\ACBr.Net.Integrador.dll</HintPath>
</Reference>
<Reference Include="ACBr.Net.Sat, Version=1.2.7.1, Culture=neutral, PublicKeyToken=d3bb9130f8b775a6, processorArchitecture=MSIL">
<HintPath>..\packages\ACBr.Net.Sat.1.2.7.1\lib\net452\ACBr.Net.Sat.dll</HintPath>
</Reference>
<Reference Include="DFeBR.EmissorNFe, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DFeBR.EmissorNFe.0.0.1\lib\netstandard2.0\DFeBR.EmissorNFe.dll</HintPath>
</Reference>
<Reference Include="NetBarcode, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\NetBarcode.1.0.7\lib\netstandard2.0\NetBarcode.dll</HintPath>
</Reference>
Expand Down
1 change: 0 additions & 1 deletion Gerene.DFe.EscPos.Demo/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<package id="ACBr.Net.DFe.Core" version="1.2.7.1" targetFramework="net462" />
<package id="ACBr.Net.Integrador" version="1.2.0.6" targetFramework="net462" />
<package id="ACBr.Net.Sat" version="1.2.7.1" targetFramework="net462" />
<package id="DFeBR.EmissorNFe" version="0.0.1" targetFramework="net462" />
<package id="NetBarcode" version="1.0.7" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net462" />
<package id="QRCoder" version="1.3.5" targetFramework="net462" />
Expand Down
4 changes: 2 additions & 2 deletions Gerene.DFe.EscPos/Gerene.DFe.EscPos.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>
<Company>Gerene Sistemas de Informação</Company>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/marcosgerene/Gerene.DFe.EscPos</PackageProjectUrl>
Expand All @@ -11,8 +11,8 @@

<ItemGroup>
<PackageReference Include="ACBr.Net.Sat" Version="1.2.7.1" />
<PackageReference Include="DFeBR.EmissorNFe" Version="0.0.1" />
<PackageReference Include="Vip.Printer" Version="1.0.13" />
<PackageReference Include="Zeus.Net.NFe.NFCe" Version="1.0.1.1007" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 7 additions & 5 deletions Gerene.DFe.EscPos/NFCePrinter.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using DFeBR.EmissorNFe.Utilidade;
using DFe.Classes.Flags;
using DFe.Utils;
using Shared.DFe.Utils;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using Vip.Printer;
using Vip.Printer.Enums;

using NotaFiscal = DFeBR.EmissorNFe.Dominio.NotaFiscalEletronica.nfeProc;
using NotaFiscal = NFe.Classes.nfeProc;


namespace Gerene.DFe.EscPos
Expand Down Expand Up @@ -34,7 +36,7 @@ public NFCePrinter()

public void Imprimir(string xmlcontent)
{
_NFCe = Utils.ConverterXMLParaClasse<NotaFiscal>(xmlcontent);
_NFCe = new NotaFiscal().CarregarDeXmlString(xmlcontent);

_Printer = new Printer(NomeImpressora, TipoImpressora);

Expand Down Expand Up @@ -78,7 +80,7 @@ public void Imprimir(string xmlcontent)
#endregion

#region Homologação
if (_NFCe.NFe.infNFe.ide.tpAmb == DFeBR.EmissorNFe.Utilidade.Tipos.TipoAmbiente.Homologacao)
if (_NFCe.NFe.infNFe.ide.tpAmb == TipoAmbiente.Homologacao)
{
_Printer.Separator();
_Printer.AlignCenter();
Expand Down Expand Up @@ -339,7 +341,7 @@ public void Imprimir(string xmlcontent)
_Printer.CondensedMode(PrinterModeState.On);

_Printer.Append("Protocolo de autorizacao");
_Printer.Append($"{_NFCe.protNFe.infProt.First().nProt} {_NFCe.protNFe.infProt.First().dhRecbto:@dd/MM/yyyy HH:mm:ss}");
_Printer.Append($"{_NFCe.protNFe.infProt.nProt} {_NFCe.protNFe.infProt.dhRecbto:@dd/MM/yyyy HH:mm:ss}");

_Printer.CondensedMode(PrinterModeState.Off);
#endregion
Expand Down