Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Added invoices summary
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericoregateiro committed Oct 14, 2017
1 parent 9749bfe commit a124507
Show file tree
Hide file tree
Showing 10 changed files with 605 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/SolRIA.SaftAnalyser/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
TextOptions.TextRenderingMode="Auto"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="SolRIA | Analisador SAFT" Loaded="Window_Loaded">
Title="SolRIA | Analisador SAFT" Loaded="Window_Loaded" WindowState="Maximized">

<materialDesign:DialogHost x:Name="RootDialog" Identifier="RootDialog" >

Expand Down
14 changes: 9 additions & 5 deletions src/SolRIA.SaftAnalyser/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,27 @@ public void Init()

NavigateCommand = new DelegateCommand<SaftPage>(OnNavigate);

SaftPages = new ObservableCollection<SaftPage>();
SaftPages.AddRange(new SaftPage[]
allPages = new SaftPage[]
{
new SaftPage{ Name = "Cabeçalho", View = PagesIds.SAFT_HEADER },
new SaftPage{ Name = "Clientes", View = PagesIds.SAFT_CUSTOMERS },
new SaftPage{ Name = "Produtos", View = PagesIds.SAFT_PRODUCTS },
new SaftPage{ Name = "Impostos", View = PagesIds.SAFT_TAXES },
new SaftPage{ Name = "Doc. Faturação", View = PagesIds.SAFT_INVOICES },
new SaftPage{ Name = "Resumo Faturação", View = PagesIds.SAFT_INVOICES_SUMMARY },
new SaftPage{ Name = "Erros", View = PagesIds.SAFT_ERRORS },
});
};

SaftPages = new ObservableCollection<SaftPage>();
SaftPages.AddRange(allPages);
}
SaftPage[] allPages;

private ObservableCollection<SaftPage> saftPages;
public ObservableCollection<SaftPage> SaftPages
{
get { return saftPages; }
set { SetProperty(ref saftPages, value); }
get => saftPages;
set => SetProperty(ref saftPages, value);
}

public DelegateCommand<SaftPage> NavigateCommand { get; private set; }
Expand Down
30 changes: 30 additions & 0 deletions src/SolRIA.SaftAnalyser/Models/DTOs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;

namespace SolRIA.SaftAnalyser.Models
{
public class LinhasAgrupadas
{
public string Tipo { get; set; }
public string ProdutoCodigo { get; set; }
public string ProdutoNome { get; set; }
public decimal Incidencia { get; set; }
public decimal TaxaImposto { get; set; }
}

public class DocumentosAgrupados
{
public string Tipo { get; set; }
public DateTime Data { get; set; }
public decimal Total { get; set; }
public decimal Incidencia { get; set; }
public decimal Imposto { get; set; }
}

public class ResumoIva
{
public decimal Incidencia { get; set; }
public string Taxa { get; set; }
public string Codigo { get; set; }
public decimal Valor { get; set; }
}
}
1 change: 1 addition & 0 deletions src/SolRIA.SaftAnalyser/PagesIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class PagesIds
public const string SAFT_PRODUCTS = "SaftProducts";
public const string SAFT_TAXES = "SaftTaxes";
public const string SAFT_INVOICES = "SaftInvoices";
public const string SAFT_INVOICES_SUMMARY = "SaftInvoicesSummary";
public const string SAFT_ERRORS = "SaftErrors";
}
}
9 changes: 9 additions & 0 deletions src/SolRIA.SaftAnalyser/SolRIA.SaftAnalyser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Models\DTOs.cs" />
<Compile Include="PageBase.cs" />
<Compile Include="PagesIds.cs" />
<Compile Include="ViewModels\SaftInvoicesSummaryViewModel.cs" />
<Compile Include="ViewModels\SaftTaxesViewModel.cs" />
<Compile Include="ViewModels\SaftProductsViewModel.cs" />
<Compile Include="ViewModels\SaftCustomersViewModel.cs" />
Expand All @@ -136,6 +138,9 @@
<Compile Include="Views\Home.xaml.cs">
<DependentUpon>Home.xaml</DependentUpon>
</Compile>
<Compile Include="Views\SaftInvoicesSummary.xaml.cs">
<DependentUpon>SaftInvoicesSummary.xaml</DependentUpon>
</Compile>
<Compile Include="Views\SaftTaxes.xaml.cs">
<DependentUpon>SaftTaxes.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -177,6 +182,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\SaftInvoicesSummary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\SaftTaxes.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
2 changes: 1 addition & 1 deletion src/SolRIA.SaftAnalyser/ViewModels/HomeViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async virtual void OnOpenSaftFile()
}
else
{
messageService.ShowSnackBarMessage("Não foi possível abrir o ficheiro selecionado.");
messageService.ShowSnackBarMessage("Não foi possível abrir o ficheiro seleccionado.");
}
}

Expand Down
Loading

0 comments on commit a124507

Please sign in to comment.