Skip to content

Commit

Permalink
Refatora IdentificacaoDaNotaFiscalEletronica: parâmetro mais específico
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfoghi committed Aug 21, 2024
1 parent f99c336 commit 1d6efb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DanfeFluentBlazor/DanfeFluentBlazor/Components/DadosNFe.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<FluentGrid>
<FluentGridItem xs="12">
<FluentCard>
<IdentificacaoDaNotaFiscalEletronica nfeProc="@nfeProc" />
<IdentificacaoDaNotaFiscalEletronica IdentificacaoDaNFe="@nfeProc.NFe.infNFe.ide" />
</FluentCard>
</FluentGridItem>
<FluentGridItem xs="12">
Expand All @@ -17,5 +17,5 @@

@code {
[Parameter]
public nfeProc? nfeProc { get; set; }
public nfeProc nfeProc { get; set; } = new();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@using DanfeFluentBlazor.Extensions
@using NFe.Classes
@using NFe.Classes.Informacoes.Identificacao
<FluentGrid>
<FluentGridItem xs="12">
<FluentLabel Typo="Typography.H3"> Identificação da nota fiscal eletrônica </FluentLabel>
Expand All @@ -8,24 +9,21 @@
<FluentTextField Label="Número/série" Value="@NumeroSerie" ReadOnly Size="100" />
</FluentGridItem>
<FluentGridItem xs="2">
<FluentDatePicker Label="Emissão" Value="@nfeProc?.NFe.infNFe.ide.dhEmi.DateTime" ReadOnly />
<FluentDatePicker Label="Emissão" Value="@IdentificacaoDaNFe.dhEmi.DateTime" ReadOnly />
</FluentGridItem>
<FluentGridItem xs="3">
<FluentTextField Label="Natureza da operação" Value="@nfeProc?.NFe.infNFe.ide.natOp" ReadOnly Size="100" />
</FluentGridItem>
<FluentGridItem xs="3">
<FluentTextField Label="Forma de pagamento " Value="@nfeProc?.NFe.infNFe.pag.FirstOrDefault()?.detPag.FirstOrDefault()?.indPag?.GetDescription()" ReadOnly Size="100" />
<FluentTextField Label="Natureza da operação" Value="@IdentificacaoDaNFe.natOp" ReadOnly Size="100" />
</FluentGridItem>

<FluentGridItem xs="2">
<FluentTextField Label="Operação com consumidor final" Value="@nfeProc?.NFe.infNFe.ide.indFinal?.GetDescription()" ReadOnly Size="100" />
<FluentTextField Label="Operação com consumidor final" Value="@IdentificacaoDaNFe.indFinal?.GetDescription()" ReadOnly Size="100" />
</FluentGridItem>
</FluentGrid>


@code {
[Parameter]
public nfeProc? nfeProc { get; set; }
public ide IdentificacaoDaNFe { get; set; } = new();

private string NumeroSerie => $"{nfeProc?.NFe.infNFe.ide.nNF.ToString()}/{nfeProc?.NFe.infNFe.ide.serie}";
private string NumeroSerie => $"{IdentificacaoDaNFe.nNF.ToString()}/{IdentificacaoDaNFe.serie}";
}

0 comments on commit 1d6efb2

Please sign in to comment.