Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e5f87f93d4 | |||
| fca0b794cd | |||
| 0a26e2a1d0 | |||
| ae6d68d854 |
@@ -1,22 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>12</LangVersion>
|
||||
<LangVersion>14</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Program.cs" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.8"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.8" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
116
Blink.Backoffice.Services.PcmDb/Constants.cs
Normal file
116
Blink.Backoffice.Services.PcmDb/Constants.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
namespace Blink.Backoffice.Services.PcmDb;
|
||||
|
||||
public static class Constants
|
||||
{
|
||||
public static class Tax
|
||||
{
|
||||
public const short Vat23 = 2300;
|
||||
public const short Vat22 = 2200;
|
||||
public const short Vat8 = 800;
|
||||
public const short Vat7 = 700;
|
||||
public const short Vat5 = 500;
|
||||
public const short Vat3 = 300;
|
||||
public const short Vat0 = 0;
|
||||
public const short VatZw = -1;
|
||||
}
|
||||
|
||||
public static class ZnaczenieTekstDok
|
||||
{
|
||||
public const int Komentarz = 17;
|
||||
public const int Tekst1 = 71;
|
||||
|
||||
public const int KontrahentNazwa = 88;
|
||||
public const int KontrahentUlica = 89;
|
||||
public const int KontrahentKodPocztowy = 90;
|
||||
public const int KontrahentMiejscowosc = 91;
|
||||
public const int KontrahentNip = 93;
|
||||
public const int KontrahentSkrot = 94;
|
||||
|
||||
public const int PowodKorekty = 144;
|
||||
public const int NumerKsef = 311;
|
||||
}
|
||||
|
||||
public static class ZnaczenieTypDok
|
||||
{
|
||||
public const int ObrotOpakowaniami = 1;
|
||||
public const int Pz = 2;
|
||||
public const int Mp = 3;
|
||||
public const int ZwrotDoDostawcy = 4;
|
||||
public const int Wz = 5;
|
||||
public const int Mw = 6;
|
||||
public const int ZwrotOdOdbiorcy = 7;
|
||||
public const int ZwrotDoParagonu = 8;
|
||||
public const int Pw = 9;
|
||||
public const int Rw = 10;
|
||||
public const int MmRozchodowa = 11;
|
||||
public const int MmPrzychodowa = 12;
|
||||
public const int TymczasowaBlokadaStanow = 13;
|
||||
public const int BilansOtwarcia = 14;
|
||||
public const int NaleznoscZobowiazanieOtwarciaMagazynu = 15;
|
||||
public const int Remanent = 16;
|
||||
public const int ZamrozenieRemanentu = 17;
|
||||
public const int Przecena = 18;
|
||||
public const int ZamrozeniePrzeceny = 19;
|
||||
public const int ParagonImportZKas = 20;
|
||||
public const int ParagonDrukfisk = 21;
|
||||
public const int ImportJednegoParagonu = 22;
|
||||
public const int DokumentStraty = 23;
|
||||
public const int DokumentReklamacji = 24;
|
||||
public const int DokumentReceptury = 25;
|
||||
public const int RozbieznoscDostawy = 26;
|
||||
public const int WymianaTowaru = 27;
|
||||
public const int WzParagonowa = 28;
|
||||
public const int OryginalneKwotyPzWalutaObca = 29;
|
||||
public const int BilansWymianyOpakowan = 30;
|
||||
public const int FakturaDostawcy = 31;
|
||||
public const int FakturaKorygujacaDostawcy = 32;
|
||||
public const int SprzedazFakturowana = 33;
|
||||
public const int FakturaKorygujacaOdbiorcy = 34;
|
||||
public const int KopiaFakturyKorygujacejOdbiorcy = 35;
|
||||
public const int FakturaDoParagonu = 36;
|
||||
public const int FakturaKorygujacaDoParagonu = 37;
|
||||
public const int KopiaFakturyKorygujacejDoParagonu = 38;
|
||||
public const int FakturaWewnatrzwspolnotowa = 39;
|
||||
public const int FakturaProForma = 40;
|
||||
public const int RozbicieZaliczki = 41;
|
||||
public const int RozbicieWplat = 42;
|
||||
public const int TrasaPrzewoznika = 44;
|
||||
public const int OdbiorCzesciowy = 45;
|
||||
public const int ZasilenieKasy = 46;
|
||||
public const int PropozycjaZamowieniaDoDostawcy = 47;
|
||||
public const int PotwierdzenieZamowieniaDlaOdbiorcy = 48;
|
||||
public const int RejestracjaZamowieniaOdOdbiorcy = 49;
|
||||
public const int ZamowienieDoDostawcy = 50;
|
||||
public const int Platnosc = 51;
|
||||
public const int UtargZKas = 52;
|
||||
public const int UtargZDrukarek = 53;
|
||||
public const int WplataWyplataDrukfisk = 54;
|
||||
public const int WydaniePrezentuLojalnosciowego = 55;
|
||||
public const int ZmianaKasjeraPoczatek = 56;
|
||||
public const int ZmianaKasjeraKoniec = 57;
|
||||
public const int ZmianaKasjeraObrot = 58;
|
||||
public const int UsunietyParagon = 59;
|
||||
public const int StornoPozycjiParagonu = 60;
|
||||
public const int CentralneZamowienie = 61;
|
||||
public const int CentralneZamowieniePomocnicze = 62;
|
||||
public const int CentralneMw = 63;
|
||||
public const int CentralneMwPomocnicze = 64;
|
||||
public const int WskaznikDokumentuSklepowego = 65;
|
||||
public const int ZbitaSprzedazDetaliczna = 66;
|
||||
public const int KolejkaFifo = 68;
|
||||
public const int KorektaFifo = 69;
|
||||
public const int TymczasowyDokumentStanuKasyPcPos7 = 70;
|
||||
public const int SprzedazWiniet = 75;
|
||||
public const int ZwrotWiniet = 76;
|
||||
public const int PrzyjecieZuzytychOpakowan = 77;
|
||||
public const int PrzesuniecieZTowaruNaTowar = 78;
|
||||
public const int StanLicznikaKlientow = 79;
|
||||
public const int RozbieznoscZWydania = 80;
|
||||
public const int DostawaPrasy = 81;
|
||||
public const int RozliczeniePrasy = 82;
|
||||
public const int KontraktZDostawca = 87;
|
||||
public const int DostawaPaliwa = 91;
|
||||
public const int StanStacji = 92;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using FKGees.Services;
|
||||
|
||||
namespace FKGees;
|
||||
|
||||
internal class App
|
||||
public class App
|
||||
{
|
||||
private readonly DecretsService _decretsService;
|
||||
private readonly PcmService _pcmService;
|
||||
@@ -35,14 +35,14 @@ internal class App
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!DateTime.TryParseExact(args[0], Constants.DefaultDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var startDate))
|
||||
if (!DateTime.TryParseExact(args[0], Consts.DefaultDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var startDate))
|
||||
{
|
||||
Console.WriteLine("Niewłaściwy format DataOd");
|
||||
await Task.Delay(4000);
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
if (!DateTime.TryParseExact(args[1], Constants.DefaultDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var endDate))
|
||||
if (!DateTime.TryParseExact(args[1], Consts.DefaultDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out var endDate))
|
||||
{
|
||||
Console.WriteLine("Niewłaściwy format DataOd");
|
||||
await Task.Delay(4000);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace FKGees
|
||||
{
|
||||
internal static class Constants
|
||||
public static class Consts
|
||||
{
|
||||
public const string DefaultDateFormat = "yyyy-MM-dd";
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
public class Context
|
||||
{
|
||||
public string SymbolMag { get; set; }
|
||||
public DateTime StatDate { get; set; } = DateTime.Today - TimeSpan.FromDays(1000);
|
||||
public DateTime EndDate { get; set; } = DateTime.Today.Add(TimeSpan.FromDays(1));
|
||||
public DateTime StatDate { get; set; } = DateTime.Today - TimeSpan.FromDays(1);
|
||||
public DateTime EndDate { get; set; } = DateTime.Today - TimeSpan.FromSeconds(1);
|
||||
public List<FormaPlatnosci> PaymentForms { get; set; } = new();
|
||||
public string RegistersFileName { get; set; }
|
||||
public string DecretsFileName { get; set; }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class DostawaPrasy : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 81;
|
||||
public int DocType => Constants.ZnaczenieTypDok.DostawaPrasy;
|
||||
public string Type => "Dprs";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace FKGees.DocsDefinitions.Decrets;
|
||||
|
||||
public class FaktSprz : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 33;
|
||||
public int DocType => Constants.ZnaczenieTypDok.SprzedazFakturowana;
|
||||
public string Type => "FaktSprz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace FKGees.DocsDefinitions.Decrets;
|
||||
|
||||
public class KorCenZak : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 26;
|
||||
public int DocType => Constants.ZnaczenieTypDok.RozbieznoscDostawy;
|
||||
public string Type => "KorCenZak";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -30,7 +30,7 @@ public class KorCenZak : IDecretsDefinition
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.PowodKorekty().Contains(Constants.TekstPowodKorekty[nameof(KorCenZak)]));
|
||||
&& x.PowodKorekty().Contains(Consts.TekstPowodKorekty[nameof(KorCenZak)]));
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KorDetal : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 8;
|
||||
public int DocType => Constants.ZnaczenieTypDok.ZwrotDoParagonu;
|
||||
public string Type => "KorDetal";
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("300", "MA", "[snr]"),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpInne : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KpInne);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -17,7 +17,7 @@ public class KpInne : IDecretsDefinition
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpInne)]);
|
||||
&& x.Tekst1() == Consts.KpTekstyDod[nameof(KpInne)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpKaucjaDrsZDokUtargu : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KpKaucjaDrsZDokUtargu);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpKaucjaZDokUtargu : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KpKaucjaZDokUtargu);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpKaucjaZaOpakowania : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KpKaucjaZaOpakowania);
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
@@ -16,7 +16,7 @@ public class KpKaucjaZaOpakowania : IDecretsDefinition
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpKaucjaZaOpakowania)]);
|
||||
&& x.Tekst1() == Consts.KpTekstyDod[nameof(KpKaucjaZaOpakowania)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpLotto : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KpLotto);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -17,7 +17,7 @@ public class KpLotto : IDecretsDefinition
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpLotto)]);
|
||||
&& x.Tekst1() == Consts.KpTekstyDod[nameof(KpLotto)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpPaysafe : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KpPaysafe);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -17,7 +17,7 @@ public class KpPaysafe : IDecretsDefinition
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpPaysafe)]);
|
||||
&& x.Tekst1() == Consts.KpTekstyDod[nameof(KpPaysafe)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KpRachunki : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KpRachunki);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -17,7 +17,7 @@ public class KpRachunki : IDecretsDefinition
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpRachunki)]);
|
||||
&& x.Tekst1() == Consts.KpTekstyDod[nameof(KpRachunki)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwBony : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwBony);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -16,7 +16,7 @@ public class KwBony : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwBony)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwBony)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwCashback : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KwCashback);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwInne : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwInne);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -16,7 +16,7 @@ public class KwInne : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwInne)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwInne)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwKaucjaDrsZDokUtargu : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KwKaucjaDrsZDokUtargu);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwKaucjaZDokUtargu : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KwKaucjaZDokUtargu);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwLotto : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwLotto);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -16,7 +16,7 @@ public class KwLotto : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwLotto)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwLotto)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwOpakowania : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwOpakowania);
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("139-1-24", "WN", "[sbr]"),
|
||||
@@ -15,7 +15,7 @@ public class KwOpakowania : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwOpakowania)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwOpakowania)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwPolcard : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(KwPolcard);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwPomylkaKasjera : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwPomylkaKasjera);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -16,7 +16,7 @@ public class KwPomylkaKasjera : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwPomylkaKasjera)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwPomylkaKasjera)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class KwUtarg : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Platnosc;
|
||||
public string Type => nameof(KwUtarg);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -16,7 +16,7 @@ public class KwUtarg : IDecretsDefinition
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwUtarg)]);
|
||||
&& x.Tekst1() == Consts.KwTekstyDod[nameof(KwUtarg)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class MmMinus : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 6;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Mw;
|
||||
public string Type => "Mm-";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class MmPlus : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 3;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Mp;
|
||||
public string Type => "Mm+";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class ObrotOpakowaniami : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 1;
|
||||
public int DocType => Constants.ZnaczenieTypDok.ObrotOpakowaniami;
|
||||
public string Type => "Opak";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class Przecena : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 18;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Przecena;
|
||||
public string Type => "Pc";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class Pz : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 2;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Pz;
|
||||
public string Type => "Pz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class PzFaktura : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 2;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Pz;
|
||||
public string Type => "PzFaktura";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class RapFisk : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => "Rapfisk";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -52,7 +52,7 @@ public class RapFisk : IDecretsDefinition
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[sbr]" => doc.Razem - doc.Kwota1 + doc.Kwota2,
|
||||
"[sbr]" => doc.Razem - doc.Kwota1 + doc.Kwota2 - (doc.Kwota13 ?? 0),
|
||||
"[svr]" => doc.Podatek,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace FKGees.DocsDefinitions.Decrets;
|
||||
|
||||
public class Rozb : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 26;
|
||||
public int DocType => Constants.ZnaczenieTypDok.RozbieznoscDostawy;
|
||||
public string Type => "Rozb";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -30,7 +30,7 @@ public class Rozb : IDecretsDefinition
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.PowodKorekty().Contains(Constants.TekstPowodKorekty[nameof(Rozb)]));
|
||||
&& x.PowodKorekty().Contains(Consts.TekstPowodKorekty[nameof(Rozb)]));
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class Utarg : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public int DocType => Constants.ZnaczenieTypDok.UtargZDrukarek;
|
||||
public string Type => nameof(Utarg);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
@@ -30,7 +30,7 @@ public class Utarg : IDecretsDefinition
|
||||
Opis = "UTARG Z KAS",
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = dok.Sum(x => x.Razem - x.Kwota1 + x.Kwota2).AsString()
|
||||
Kwota = dok.Sum(x => x.Razem - x.Kwota1 + x.Kwota2 - (x.Kwota13 ?? 0)).AsString()
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class Wz : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 5;
|
||||
public int DocType => Constants.ZnaczenieTypDok.Wz;
|
||||
public string Type => "Wz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace FKGees.DocsDefinitions.Decrets;
|
||||
|
||||
public class Zwroty : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 4;
|
||||
public int DocType => Constants.ZnaczenieTypDok.ZwrotDoDostawcy;
|
||||
public string Type => "Zwroty";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
|
||||
@@ -1,92 +1,21 @@
|
||||
namespace FKGees.DocsDefinitions.Registers;
|
||||
|
||||
public class Fa : IRegistersDefinition
|
||||
public class Fa : RegistersDefinitionBase
|
||||
{
|
||||
public string Type => nameof(Fa).ToUpper();
|
||||
public int[] DocTypes => [33];
|
||||
public override string Type => nameof(Fa).ToUpper();
|
||||
public override int[] DocTypes => [Constants.ZnaczenieTypDok.SprzedazFakturowana];
|
||||
|
||||
private readonly Context _context;
|
||||
|
||||
public Fa(Context context)
|
||||
public Fa(Context context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public Task<List<RegistersResult>> Process(IReadOnlyList<Dok> documents)
|
||||
protected override void FillAmounts(RegistersResult item, Dok dok)
|
||||
{
|
||||
var result = new List<RegistersResult>();
|
||||
|
||||
var docs = documents.Where(x => DocTypes.Contains(x.TypDok));
|
||||
|
||||
foreach (var dok in docs)
|
||||
{
|
||||
var item = dok.RegisterKontr();
|
||||
item.symbolmag = _context.SymbolMag;
|
||||
item.rodzaj = Type;
|
||||
item.nr = dok.NrDok;
|
||||
item.dwystawienia = dok.DataDod;
|
||||
item.dsprzedazy = dok.DataPom;
|
||||
item.dwplywu = dok.Data;
|
||||
item.OpisDok = dok.NrDok;
|
||||
item.platnosc = _context.PaymentForms.FirstOrDefault(x => x.FormaPlat == dok.FormaPlat)?.Tekst ?? string.Empty;
|
||||
item.kredyt = (-(dok.DoZaplaty - dok.Zaplacono)).AsString();
|
||||
item.termin = dok.DataDod.AddDays(dok.TerminPlat);
|
||||
|
||||
item.sn23 = (dok.Rozbicie(2300)?.Netto ?? 0).AsString();
|
||||
item.sn22 = (dok.Rozbicie(2200)?.Netto ?? 0).AsString();
|
||||
item.sn8 = (dok.Rozbicie(800)?.Netto ?? 0).AsString();
|
||||
item.sn7 = (dok.Rozbicie(700)?.Netto ?? 0).AsString();
|
||||
item.sn5 = (dok.Rozbicie(500)?.Netto ?? 0).AsString();
|
||||
item.sn3 = (dok.Rozbicie(300)?.Netto ?? 0).AsString();
|
||||
item.sn0 = (dok.Rozbicie(0)?.Netto ?? 0).AsString();
|
||||
item.snzw = (dok.Rozbicie(-1)?.Netto ?? 0).AsString();
|
||||
item.snr = dok.RozbicieDok.Sum(x => x.Netto).AsString();
|
||||
|
||||
item.sv23 = (dok.Rozbicie(2300)?.Podatek ?? 0).AsString();
|
||||
item.sv22 = (dok.Rozbicie(2200)?.Podatek ?? 0).AsString();
|
||||
item.sv8 = (dok.Rozbicie(800)?.Podatek ?? 0).AsString();
|
||||
item.sv7 = (dok.Rozbicie(700)?.Podatek ?? 0).AsString();
|
||||
item.sv5 = (dok.Rozbicie(500)?.Podatek ?? 0).AsString();
|
||||
item.sv3 = (dok.Rozbicie(300)?.Podatek ?? 0).AsString();
|
||||
item.svr = dok.RozbicieDok.Sum(x => x.Podatek).AsString();
|
||||
|
||||
item.sb23 = ((dok.Rozbicie(2300)?.Netto ?? 0) + (dok.Rozbicie(2300)?.Podatek ?? 0)).AsString();
|
||||
item.sb22 = ((dok.Rozbicie(2200)?.Netto ?? 0) + (dok.Rozbicie(2200)?.Podatek ?? 0)).AsString();
|
||||
item.sb8 = ((dok.Rozbicie(800)?.Netto ?? 0) + (dok.Rozbicie(800)?.Podatek ?? 0)).AsString();
|
||||
item.sb7 = ((dok.Rozbicie(700)?.Netto ?? 0) + (dok.Rozbicie(700)?.Podatek ?? 0)).AsString();
|
||||
item.sb5 = ((dok.Rozbicie(500)?.Netto ?? 0) + (dok.Rozbicie(500)?.Podatek ?? 0)).AsString();
|
||||
item.sb3 = ((dok.Rozbicie(300)?.Netto ?? 0) + (dok.Rozbicie(300)?.Podatek ?? 0)).AsString();
|
||||
item.sbr = dok.RozbicieDok.Sum(x => x.Podatek + x.Netto).AsString();
|
||||
|
||||
item.zn23 = (dok.Rozbicie(2300)?.NettoMag ?? 0).AsString();
|
||||
item.zn22 = (dok.Rozbicie(2200)?.NettoMag ?? 0).AsString();
|
||||
item.zn8 = (dok.Rozbicie(800)?.NettoMag ?? 0).AsString();
|
||||
item.zn7 = (dok.Rozbicie(700)?.NettoMag ?? 0).AsString();
|
||||
item.zn5 = (dok.Rozbicie(500)?.NettoMag ?? 0).AsString();
|
||||
item.zn3 = (dok.Rozbicie(300)?.NettoMag ?? 0).AsString();
|
||||
item.zn0 = (dok.Rozbicie(0)?.NettoMag ?? 0).AsString();
|
||||
item.znzw = (dok.Rozbicie(-1)?.NettoMag ?? 0).AsString();
|
||||
item.znr = dok.RozbicieDok.Sum(x => x.NettoMag ?? 0).AsString();
|
||||
|
||||
item.zv23 = (dok.Rozbicie(2300)?.PodatekMag ?? 0).AsString();
|
||||
item.zv22 = (dok.Rozbicie(2200)?.PodatekMag ?? 0).AsString();
|
||||
item.zv8 = (dok.Rozbicie(800)?.PodatekMag ?? 0).AsString();
|
||||
item.zv7 = (dok.Rozbicie(700)?.PodatekMag ?? 0).AsString();
|
||||
item.zv5 = (dok.Rozbicie(500)?.PodatekMag ?? 0).AsString();
|
||||
item.zv3 = (dok.Rozbicie(300)?.PodatekMag ?? 0).AsString();
|
||||
item.znr = dok.RozbicieDok.Sum(x => x.PodatekMag ?? 0).AsString();
|
||||
|
||||
item.zb23 = ((dok.Rozbicie(2300)?.NettoMag ?? 0) + (dok.Rozbicie(2300)?.PodatekMag ?? 0)).AsString();
|
||||
item.zb22 = ((dok.Rozbicie(2200)?.NettoMag ?? 0) + (dok.Rozbicie(2200)?.PodatekMag ?? 0)).AsString();
|
||||
item.zb8 = ((dok.Rozbicie(800)?.NettoMag ?? 0) + (dok.Rozbicie(800)?.PodatekMag ?? 0)).AsString();
|
||||
item.zb7 = ((dok.Rozbicie(700)?.NettoMag ?? 0) + (dok.Rozbicie(700)?.PodatekMag ?? 0)).AsString();
|
||||
item.zb5 = ((dok.Rozbicie(500)?.NettoMag ?? 0) + (dok.Rozbicie(500)?.PodatekMag ?? 0)).AsString();
|
||||
item.zb3 = ((dok.Rozbicie(300)?.NettoMag ?? 0) + (dok.Rozbicie(300)?.PodatekMag ?? 0)).AsString();
|
||||
item.zbr = dok.RozbicieDok.Sum(x => x.PodatekMag ?? 0 + x.NettoMag ?? 0).AsString();
|
||||
|
||||
result.Add(item);
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
item.FillRegisterAmounts(
|
||||
dok,
|
||||
x => x.Netto,
|
||||
x => x.Podatek,
|
||||
x => x.NettoMag ?? 0,
|
||||
x => x.PodatekMag ?? 0);
|
||||
}
|
||||
}
|
||||
@@ -1,90 +1,25 @@
|
||||
namespace FKGees.DocsDefinitions.Registers;
|
||||
|
||||
public class Fz : IRegistersDefinition
|
||||
public class Fz : RegistersDefinitionBase
|
||||
{
|
||||
private readonly Context _context;
|
||||
public string Type => nameof(Fz).ToUpper();
|
||||
public int[] DocTypes => [31, 32];
|
||||
public override string Type => nameof(Fz).ToUpper();
|
||||
public override int[] DocTypes =>
|
||||
[
|
||||
Constants.ZnaczenieTypDok.FakturaDostawcy,
|
||||
Constants.ZnaczenieTypDok.FakturaKorygujacaDostawcy
|
||||
];
|
||||
|
||||
public Fz(Context context)
|
||||
public Fz(Context context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public Task<List<RegistersResult>> Process(IReadOnlyList<Dok> documents)
|
||||
protected override void FillAmounts(RegistersResult item, Dok dok)
|
||||
{
|
||||
var result = new List<RegistersResult>();
|
||||
|
||||
var docs = documents.Where(x => DocTypes.Contains(x.TypDok));
|
||||
|
||||
foreach (var dok in docs)
|
||||
{
|
||||
var item = dok.RegisterKontr();
|
||||
item.symbolmag = _context.SymbolMag;
|
||||
item.rodzaj = Type;
|
||||
item.nr = dok.NrDok;
|
||||
item.dwystawienia = dok.DataDod;
|
||||
item.dsprzedazy = dok.DataPom;
|
||||
item.dwplywu = dok.Data;
|
||||
item.OpisDok = dok.NrDok;
|
||||
item.platnosc = _context.PaymentForms.FirstOrDefault(x => x.FormaPlat == dok.FormaPlat)?.Tekst ?? string.Empty;
|
||||
item.kredyt = (-(dok.DoZaplaty - dok.Zaplacono)).AsString();
|
||||
item.termin = dok.DataDod.AddDays(dok.TerminPlat);
|
||||
item.sn23 = (dok.Rozbicie(2300)?.NettoDet ?? 0).AsString();
|
||||
item.sn22 = (dok.Rozbicie(2200)?.NettoDet ?? 0).AsString();
|
||||
item.sn8 = (dok.Rozbicie(800)?.NettoDet ?? 0).AsString();
|
||||
item.sn7 = (dok.Rozbicie(700)?.NettoDet ?? 0).AsString();
|
||||
item.sn5 = (dok.Rozbicie(500)?.NettoDet ?? 0).AsString();
|
||||
item.sn3 = (dok.Rozbicie(300)?.NettoDet ?? 0).AsString();
|
||||
item.sn0 = (dok.Rozbicie(0)?.NettoDet ?? 0).AsString();
|
||||
item.snzw = (dok.Rozbicie(-1)?.NettoDet ?? 0).AsString();
|
||||
item.snr = dok.RozbicieDok.Sum(x => x.NettoDet).AsString();
|
||||
|
||||
item.sv23 = (dok.Rozbicie(2300)?.PodatekDet ?? 0).AsString();
|
||||
item.sv22 = (dok.Rozbicie(2200)?.PodatekDet ?? 0).AsString();
|
||||
item.sv8 = (dok.Rozbicie(800)?.PodatekDet ?? 0).AsString();
|
||||
item.sv7 = (dok.Rozbicie(700)?.PodatekDet ?? 0).AsString();
|
||||
item.sv5 = (dok.Rozbicie(500)?.PodatekDet ?? 0).AsString();
|
||||
item.sv3 = (dok.Rozbicie(300)?.PodatekDet ?? 0).AsString();
|
||||
item.svr = dok.RozbicieDok.Sum(x => x.PodatekDet).AsString();
|
||||
|
||||
item.sb23 = ((dok.Rozbicie(2300)?.NettoDet ?? 0) + (dok.Rozbicie(2300)?.PodatekDet ?? 0)).AsString();
|
||||
item.sb22 = ((dok.Rozbicie(2200)?.NettoDet ?? 0) + (dok.Rozbicie(2200)?.PodatekDet ?? 0)).AsString();
|
||||
item.sb8 = ((dok.Rozbicie(800)?.NettoDet ?? 0) + (dok.Rozbicie(800)?.PodatekDet ?? 0)).AsString();
|
||||
item.sb7 = ((dok.Rozbicie(700)?.NettoDet ?? 0) + (dok.Rozbicie(700)?.PodatekDet ?? 0)).AsString();
|
||||
item.sb5 = ((dok.Rozbicie(500)?.NettoDet ?? 0) + (dok.Rozbicie(500)?.PodatekDet ?? 0)).AsString();
|
||||
item.sb3 = ((dok.Rozbicie(300)?.NettoDet ?? 0) + (dok.Rozbicie(300)?.PodatekDet ?? 0)).AsString();
|
||||
item.sbr = dok.RozbicieDok.Sum(x => x.PodatekDet + x.NettoDet).AsString();
|
||||
|
||||
item.zn23 = (dok.Rozbicie(2300)?.Netto ?? 0).AsString();
|
||||
item.zn22 = (dok.Rozbicie(2200)?.Netto ?? 0).AsString();
|
||||
item.zn8 = (dok.Rozbicie(800)?.Netto ?? 0).AsString();
|
||||
item.zn7 = (dok.Rozbicie(700)?.Netto ?? 0).AsString();
|
||||
item.zn5 = (dok.Rozbicie(500)?.Netto ?? 0).AsString();
|
||||
item.zn3 = (dok.Rozbicie(300)?.Netto ?? 0).AsString();
|
||||
item.zn0 = (dok.Rozbicie(0)?.Netto ?? 0).AsString();
|
||||
item.znzw = (dok.Rozbicie(-1)?.Netto ?? 0).AsString();
|
||||
item.znr = dok.RozbicieDok.Sum(x => x.Netto).AsString();
|
||||
|
||||
item.zv23 = (dok.Rozbicie(2300)?.Podatek ?? 0).AsString();
|
||||
item.zv22 = (dok.Rozbicie(2200)?.Podatek ?? 0).AsString();
|
||||
item.zv8 = (dok.Rozbicie(800)?.Podatek ?? 0).AsString();
|
||||
item.zv7 = (dok.Rozbicie(700)?.Podatek ?? 0).AsString();
|
||||
item.zv5 = (dok.Rozbicie(500)?.Podatek ?? 0).AsString();
|
||||
item.zv3 = (dok.Rozbicie(300)?.Podatek ?? 0).AsString();
|
||||
item.znr = dok.RozbicieDok.Sum(x => x.Podatek).AsString();
|
||||
|
||||
item.zb23 = ((dok.Rozbicie(2300)?.Netto ?? 0) + (dok.Rozbicie(2300)?.Podatek ?? 0)).AsString();
|
||||
item.zb22 = ((dok.Rozbicie(2200)?.Netto ?? 0) + (dok.Rozbicie(2200)?.Podatek ?? 0)).AsString();
|
||||
item.zb8 = ((dok.Rozbicie(800)?.Netto ?? 0) + (dok.Rozbicie(800)?.Podatek ?? 0)).AsString();
|
||||
item.zb7 = ((dok.Rozbicie(700)?.Netto ?? 0) + (dok.Rozbicie(700)?.Podatek ?? 0)).AsString();
|
||||
item.zb5 = ((dok.Rozbicie(500)?.Netto ?? 0) + (dok.Rozbicie(500)?.Podatek ?? 0)).AsString();
|
||||
item.zb3 = ((dok.Rozbicie(300)?.Netto ?? 0) + (dok.Rozbicie(300)?.Podatek ?? 0)).AsString();
|
||||
item.zbr = dok.RozbicieDok.Sum(x => x.Podatek + x.Netto).AsString();
|
||||
|
||||
result.Add(item);
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
item.FillRegisterAmounts(
|
||||
dok,
|
||||
x => x.NettoDet,
|
||||
x => x.PodatekDet,
|
||||
x => x.Netto,
|
||||
x => x.Podatek);
|
||||
}
|
||||
}
|
||||
51
FKGees/DocsDefinitions/Registers/RegistersDefinitionBase.cs
Normal file
51
FKGees/DocsDefinitions/Registers/RegistersDefinitionBase.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
namespace FKGees.DocsDefinitions.Registers;
|
||||
|
||||
public abstract class RegistersDefinitionBase : IRegistersDefinition
|
||||
{
|
||||
private readonly Context _context;
|
||||
|
||||
public abstract string Type { get; }
|
||||
public abstract int[] DocTypes { get; }
|
||||
|
||||
protected RegistersDefinitionBase(Context context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public Task<List<RegistersResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = documents
|
||||
.Where(x => DocTypes.Contains(x.TypDok))
|
||||
.Select(CreateResult)
|
||||
.ToList();
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private RegistersResult CreateResult(Dok dok)
|
||||
{
|
||||
var item = dok.RegisterKontr();
|
||||
|
||||
FillCommon(item, dok);
|
||||
FillAmounts(item, dok);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private void FillCommon(RegistersResult item, Dok dok)
|
||||
{
|
||||
item.symbolmag = _context.SymbolMag;
|
||||
item.rodzaj = Type;
|
||||
item.nr = dok.NrDok;
|
||||
item.dwystawienia = dok.DataDod;
|
||||
item.dsprzedazy = dok.DataPom;
|
||||
item.dwplywu = dok.Data;
|
||||
item.OpisDok = dok.NrDok;
|
||||
item.platnosc = _context.PaymentForms.FirstOrDefault(x => x.FormaPlat == dok.FormaPlat)?.Tekst ?? string.Empty;
|
||||
item.kredyt = (-(dok.DoZaplaty - dok.Zaplacono)).AsString();
|
||||
item.termin = dok.DataDod.AddDays(dok.TerminPlat);
|
||||
item.NrKsef = dok.NrKsef();
|
||||
}
|
||||
|
||||
protected abstract void FillAmounts(RegistersResult item, Dok dok);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
internal static class DecimalExtension
|
||||
public static class DecimalExtension
|
||||
{
|
||||
internal static string AsString(this decimal value)
|
||||
public static string AsString(this decimal value)
|
||||
{
|
||||
return value.ToString("0.00");
|
||||
}
|
||||
|
||||
@@ -1,56 +1,99 @@
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
internal static class DokExtensions
|
||||
public static class DokExtensions
|
||||
{
|
||||
internal static DecretsResult DecretKontr(this Dok doc)
|
||||
|
||||
public static DecretsResult DecretKontr(this Dok dok)
|
||||
{
|
||||
var result = new DecretsResult
|
||||
var kontrahent = dok.GetKontrahentData();
|
||||
|
||||
return new DecretsResult
|
||||
{
|
||||
k_Nazwa = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 88)?.Tekst ?? string.Empty,
|
||||
k_Skrot = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 94)?.Tekst ?? string.Empty,
|
||||
k_Miejscowosc = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 91)?.Tekst ?? string.Empty,
|
||||
k_Ulica = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 89)?.Tekst ?? string.Empty,
|
||||
k_KodPocztowy = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 90)?.Tekst ?? string.Empty,
|
||||
k_Numer = doc.DokKontr?.Kontr.NrDomu ?? string.Empty,
|
||||
k_NIP = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 93)?.Tekst ?? string.Empty
|
||||
k_Nazwa = kontrahent.Nazwa,
|
||||
k_Skrot = kontrahent.Skrot,
|
||||
k_Miejscowosc = kontrahent.Miejscowosc,
|
||||
k_Ulica = kontrahent.Ulica,
|
||||
k_KodPocztowy = kontrahent.KodPocztowy,
|
||||
k_Numer = kontrahent.Numer,
|
||||
k_NIP = kontrahent.Nip
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static RegistersResult RegisterKontr(this Dok doc)
|
||||
public static RegistersResult RegisterKontr(this Dok dok)
|
||||
{
|
||||
var result = new RegistersResult
|
||||
var kontrahent = dok.GetKontrahentData();
|
||||
|
||||
return new RegistersResult
|
||||
{
|
||||
k_Nazwa = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 88)?.Tekst ?? string.Empty,
|
||||
k_Skrot = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 94)?.Tekst ?? string.Empty,
|
||||
k_Miejscowosc = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 91)?.Tekst ?? string.Empty,
|
||||
k_Ulica = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 89)?.Tekst ?? string.Empty,
|
||||
k_KodPocztowy = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 90)?.Tekst ?? string.Empty,
|
||||
k_Numer = doc.DokKontr?.Kontr.NrDomu ?? string.Empty,
|
||||
k_NIP = doc.TekstDok.FirstOrDefault(x => x.Znaczenie == 93)?.Tekst ?? string.Empty
|
||||
k_Nazwa = kontrahent.Nazwa,
|
||||
k_Skrot = kontrahent.Skrot,
|
||||
k_Miejscowosc = kontrahent.Miejscowosc,
|
||||
k_Ulica = kontrahent.Ulica,
|
||||
k_KodPocztowy = kontrahent.KodPocztowy,
|
||||
k_Numer = kontrahent.Numer,
|
||||
k_NIP = kontrahent.Nip
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static RozbicieDok? Rozbicie(this Dok dok, short stawka)
|
||||
public static RozbicieDok? Rozbicie(this Dok dok, short stawka) =>
|
||||
dok.RozbicieDok.FirstOrDefault(x => x.Stawka == stawka);
|
||||
|
||||
public static string TekstZaCo(this Dok dok) =>
|
||||
dok.Tekst(Constants.ZnaczenieTekstDok.Komentarz);
|
||||
|
||||
public static string Tekst1(this Dok dok) =>
|
||||
dok.Tekst(Constants.ZnaczenieTekstDok.Tekst1);
|
||||
|
||||
public static string PowodKorekty(this Dok dok) =>
|
||||
dok.Tekst(Constants.ZnaczenieTekstDok.PowodKorekty);
|
||||
|
||||
|
||||
public static decimal Value(this Dok dok, short stawka, Func<RozbicieDok, decimal> selector)
|
||||
{
|
||||
var roz = dok.RozbicieDok.FirstOrDefault(x => x.Stawka == stawka);
|
||||
return roz;
|
||||
var rozbicie = dok.Rozbicie(stawka);
|
||||
return rozbicie is null ? 0 : selector(rozbicie);
|
||||
}
|
||||
|
||||
internal static string TekstZaCo(this Dok dok)
|
||||
public static decimal Gross(this Dok dok, short stawka, Func<RozbicieDok, decimal> netto, Func<RozbicieDok, decimal> podatek)
|
||||
{
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == 17)?.Tekst ?? string.Empty;
|
||||
var rozbicie = dok.Rozbicie(stawka);
|
||||
return rozbicie is null ? 0 : netto(rozbicie) + podatek(rozbicie);
|
||||
}
|
||||
|
||||
internal static string Tekst1(this Dok dok)
|
||||
public static decimal Sum(this Dok dok, Func<RozbicieDok, decimal> selector)
|
||||
{
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == 71)?.Tekst ?? string.Empty;
|
||||
return dok.RozbicieDok.Sum(selector);
|
||||
}
|
||||
|
||||
internal static string PowodKorekty(this Dok dok)
|
||||
private static string Tekst(this Dok dok, int znaczenie) =>
|
||||
dok.TekstDok.FirstOrDefault(x => x.Znaczenie == znaczenie)?.Tekst ?? string.Empty;
|
||||
|
||||
private static KontrahentDokData GetKontrahentData(this Dok dok) =>
|
||||
new(
|
||||
Nazwa: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentNazwa),
|
||||
Skrot: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentSkrot),
|
||||
Miejscowosc: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentMiejscowosc),
|
||||
Ulica: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentUlica),
|
||||
KodPocztowy: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentKodPocztowy),
|
||||
Numer: dok.DokKontr?.Kontr?.NrDomu ?? string.Empty,
|
||||
Nip: dok.Tekst(Constants.ZnaczenieTekstDok.KontrahentNip)
|
||||
);
|
||||
|
||||
public static string NrKsef(this Dok dok)
|
||||
{
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == 144)?.Tekst ?? string.Empty;
|
||||
if (dok.TekstDok.Count == 0)
|
||||
return string.Empty;
|
||||
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == Constants.ZnaczenieTekstDok.NumerKsef)
|
||||
?.Tekst ?? string.Empty;
|
||||
}
|
||||
|
||||
private sealed record KontrahentDokData(
|
||||
string Nazwa,
|
||||
string Skrot,
|
||||
string Miejscowosc,
|
||||
string Ulica,
|
||||
string KodPocztowy,
|
||||
string Numer,
|
||||
string Nip);
|
||||
}
|
||||
65
FKGees/Extensions/RegistersResultExtensions.cs
Normal file
65
FKGees/Extensions/RegistersResultExtensions.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
public static class RegistersResultExtensions
|
||||
{
|
||||
public static void FillRegisterAmounts(
|
||||
this RegistersResult item,
|
||||
Dok dok,
|
||||
Func<RozbicieDok, decimal> sprzedazNetto,
|
||||
Func<RozbicieDok, decimal> sprzedazPodatek,
|
||||
Func<RozbicieDok, decimal> zakupNetto,
|
||||
Func<RozbicieDok, decimal> zakupPodatek)
|
||||
{
|
||||
item.sn23 = dok.Value(Constants.Tax.Vat23, sprzedazNetto).AsString();
|
||||
item.sn22 = dok.Value(Constants.Tax.Vat22, sprzedazNetto).AsString();
|
||||
item.sn8 = dok.Value(Constants.Tax.Vat8, sprzedazNetto).AsString();
|
||||
item.sn7 = dok.Value(Constants.Tax.Vat7, sprzedazNetto).AsString();
|
||||
item.sn5 = dok.Value(Constants.Tax.Vat5, sprzedazNetto).AsString();
|
||||
item.sn3 = dok.Value(Constants.Tax.Vat3, sprzedazNetto).AsString();
|
||||
item.sn0 = dok.Value(Constants.Tax.Vat0, sprzedazNetto).AsString();
|
||||
item.snzw = dok.Value(Constants.Tax.VatZw, sprzedazNetto).AsString();
|
||||
item.snr = dok.Sum(sprzedazNetto).AsString();
|
||||
|
||||
item.sv23 = dok.Value(Constants.Tax.Vat23, sprzedazPodatek).AsString();
|
||||
item.sv22 = dok.Value(Constants.Tax.Vat22, sprzedazPodatek).AsString();
|
||||
item.sv8 = dok.Value(Constants.Tax.Vat8, sprzedazPodatek).AsString();
|
||||
item.sv7 = dok.Value(Constants.Tax.Vat7, sprzedazPodatek).AsString();
|
||||
item.sv5 = dok.Value(Constants.Tax.Vat5, sprzedazPodatek).AsString();
|
||||
item.sv3 = dok.Value(Constants.Tax.Vat3, sprzedazPodatek).AsString();
|
||||
item.svr = dok.Sum(sprzedazPodatek).AsString();
|
||||
|
||||
item.sb23 = dok.Gross(Constants.Tax.Vat23, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sb22 = dok.Gross(Constants.Tax.Vat22, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sb8 = dok.Gross(Constants.Tax.Vat8, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sb7 = dok.Gross(Constants.Tax.Vat7, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sb5 = dok.Gross(Constants.Tax.Vat5, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sb3 = dok.Gross(Constants.Tax.Vat3, sprzedazNetto, sprzedazPodatek).AsString();
|
||||
item.sbr = dok.Sum(x => sprzedazNetto(x) + sprzedazPodatek(x)).AsString();
|
||||
|
||||
item.zn23 = dok.Value(Constants.Tax.Vat23, zakupNetto).AsString();
|
||||
item.zn22 = dok.Value(Constants.Tax.Vat22, zakupNetto).AsString();
|
||||
item.zn8 = dok.Value(Constants.Tax.Vat8, zakupNetto).AsString();
|
||||
item.zn7 = dok.Value(Constants.Tax.Vat7, zakupNetto).AsString();
|
||||
item.zn5 = dok.Value(Constants.Tax.Vat5, zakupNetto).AsString();
|
||||
item.zn3 = dok.Value(Constants.Tax.Vat3, zakupNetto).AsString();
|
||||
item.zn0 = dok.Value(Constants.Tax.Vat0, zakupNetto).AsString();
|
||||
item.znzw = dok.Value(Constants.Tax.VatZw, zakupNetto).AsString();
|
||||
item.znr = dok.Sum(zakupNetto).AsString();
|
||||
|
||||
item.zv23 = dok.Value(Constants.Tax.Vat23, zakupPodatek).AsString();
|
||||
item.zv22 = dok.Value(Constants.Tax.Vat22, zakupPodatek).AsString();
|
||||
item.zv8 = dok.Value(Constants.Tax.Vat8, zakupPodatek).AsString();
|
||||
item.zv7 = dok.Value(Constants.Tax.Vat7, zakupPodatek).AsString();
|
||||
item.zv5 = dok.Value(Constants.Tax.Vat5, zakupPodatek).AsString();
|
||||
item.zv3 = dok.Value(Constants.Tax.Vat3, zakupPodatek).AsString();
|
||||
item.zvr = dok.Sum(zakupPodatek).AsString();
|
||||
|
||||
item.zb23 = dok.Gross(Constants.Tax.Vat23, zakupNetto, zakupPodatek).AsString();
|
||||
item.zb22 = dok.Gross(Constants.Tax.Vat22, zakupNetto, zakupPodatek).AsString();
|
||||
item.zb8 = dok.Gross(Constants.Tax.Vat8, zakupNetto, zakupPodatek).AsString();
|
||||
item.zb7 = dok.Gross(Constants.Tax.Vat7, zakupNetto, zakupPodatek).AsString();
|
||||
item.zb5 = dok.Gross(Constants.Tax.Vat5, zakupNetto, zakupPodatek).AsString();
|
||||
item.zb3 = dok.Gross(Constants.Tax.Vat3, zakupNetto, zakupPodatek).AsString();
|
||||
item.zbr = dok.Sum(x => zakupNetto(x) + zakupPodatek(x)).AsString();
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
internal static class ServiceCollectionExtensions
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
internal static IServiceCollection AddDecretsDefinitions(this IServiceCollection services)
|
||||
public static IServiceCollection AddDecretsDefinitions(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IDecretsDefinition, RapFisk>();
|
||||
services.AddSingleton<IDecretsDefinition, ObrotOpakowaniami>();
|
||||
@@ -42,7 +42,7 @@ internal static class ServiceCollectionExtensions
|
||||
return services;
|
||||
}
|
||||
|
||||
internal static IServiceCollection AddRegistersDefinitions(this IServiceCollection services)
|
||||
public static IServiceCollection AddRegistersDefinitions(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IRegistersDefinition, Fz>();
|
||||
services.AddScoped<IRegistersDefinition, Fa>();
|
||||
|
||||
@@ -2,22 +2,20 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>14</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CsvHelper" Version="33.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
|
||||
<PackageReference Include="NLog" Version="5.3.4" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.13" />
|
||||
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.8"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.8"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.8"/>
|
||||
<PackageReference Include="NLog" Version="6.1.3" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="6.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -73,5 +73,5 @@ public class RegistersResult
|
||||
public string zb5 { get; set; } = string.Empty;
|
||||
public string zb3 { get; set; } = string.Empty;
|
||||
public string zbr { get; set; } = string.Empty;
|
||||
|
||||
public string NrKsef { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using NLog;
|
||||
using NLog.Extensions.Logging;
|
||||
|
||||
var logger = LogManager.GetCurrentClassLogger();
|
||||
var classLogger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
||||
{
|
||||
@@ -38,19 +38,18 @@ try
|
||||
|
||||
using (servicesProvider)
|
||||
{
|
||||
logger.Info("Run application");
|
||||
classLogger.Info("Run application");
|
||||
|
||||
if (!Directory.Exists("Export"))
|
||||
Directory.CreateDirectory("Export");
|
||||
|
||||
var app = servicesProvider.GetRequiredService<App>();
|
||||
app.Run(args)
|
||||
.Wait();
|
||||
app.Run(args).Wait();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex, "Stopped program because of exception");
|
||||
classLogger.Error(ex, "Stopped program because of exception");
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
@@ -58,12 +57,14 @@ finally
|
||||
LogManager.Shutdown();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
static IServiceCollection AddServices(IConfiguration config)
|
||||
{
|
||||
var connectionString =
|
||||
$"Server={config[Constants.DbConfig.Host]},{config[Constants.DbConfig.Port]};Database={config[Constants.DbConfig.Database]};User Id={config[Constants.DbConfig.Login]}; Password={config[Constants.DbConfig.Password]};TrustServerCertificate=True";
|
||||
$"Server={config[Consts.DbConfig.Host]},{config[Consts.DbConfig.Port]};Database={config[Consts.DbConfig.Database]};User Id={config[Consts.DbConfig.Login]}; Password={config[Consts.DbConfig.Password]};TrustServerCertificate=True";
|
||||
|
||||
if (!int.TryParse(config[Constants.DbConfig.Timeout], out var dbTimeout) || dbTimeout < 30)
|
||||
if (!int.TryParse(config[Consts.DbConfig.Timeout], out var dbTimeout) || dbTimeout < 30)
|
||||
{
|
||||
dbTimeout = 30;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ using CsvHelper.TypeConversion;
|
||||
|
||||
namespace FKGees.Services;
|
||||
|
||||
internal class CsvService(ILogger<App> logger)
|
||||
public class CsvService(ILogger<App> logger)
|
||||
{
|
||||
internal async Task CsvExport<T>(string filePath, IEnumerable<T> records)
|
||||
public async Task CsvExport<T>(string filePath, IEnumerable<T> records)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -19,12 +19,12 @@ internal class CsvService(ILogger<App> logger)
|
||||
Mode = CsvMode.RFC4180,
|
||||
ShouldQuote = quoteArgs => quoteArgs.Field != nameof(DecretsResult.Data)
|
||||
&& quoteArgs.Field != nameof(DecretsResult.DataWplywu)
|
||||
&& !DateTime.TryParseExact(quoteArgs.Field, Constants.DefaultDateFormat, CultureInfo.InvariantCulture,
|
||||
&& !DateTime.TryParseExact(quoteArgs.Field, Consts.DefaultDateFormat, CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None, out _),
|
||||
Encoding = Encoding.GetEncoding("Windows-1250")
|
||||
};
|
||||
await using var csv = new CsvWriter(writer, conf);
|
||||
var options = new TypeConverterOptions { Formats = [Constants.DefaultDateFormat], NullValues = { string.Empty }};
|
||||
var options = new TypeConverterOptions {Formats = [Consts.DefaultDateFormat], NullValues = {string.Empty}};
|
||||
csv.Context.TypeConverterOptionsCache.AddOptions<DateTime>(options);
|
||||
csv.Context.TypeConverterOptionsCache.AddOptions<DateTime?>(options);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace FKGees.Services;
|
||||
|
||||
internal class DecretsService
|
||||
public class DecretsService
|
||||
{
|
||||
private readonly PcmService _pcmService;
|
||||
private readonly CsvService _csvService;
|
||||
@@ -8,7 +8,8 @@ internal class DecretsService
|
||||
private readonly ILogger<DecretsService> _logger;
|
||||
private readonly Context _context;
|
||||
|
||||
public DecretsService(PcmService pcmService, CsvService csvService, IEnumerable<IDecretsDefinition> definitions, ILogger<DecretsService> logger, Context context)
|
||||
public DecretsService(PcmService pcmService, CsvService csvService, IEnumerable<IDecretsDefinition> definitions, ILogger<DecretsService> logger,
|
||||
Context context)
|
||||
{
|
||||
_pcmService = pcmService;
|
||||
_csvService = csvService;
|
||||
@@ -17,11 +18,12 @@ internal class DecretsService
|
||||
_context = context;
|
||||
}
|
||||
|
||||
internal async Task Process()
|
||||
public async Task Process()
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("DecretsService - Start exports decrets, StartDate: {StartDate}, EndDate: {EndDate}", _context.StatDate , _context.EndDate);
|
||||
_logger.LogInformation("DecretsService - Start exports decrets, StartDate: {StartDate}, EndDate: {EndDate}", _context.StatDate,
|
||||
_context.EndDate);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Export dekretów");
|
||||
var doctypes = _definitions.Select(x => x.DocType)
|
||||
@@ -41,7 +43,8 @@ internal class DecretsService
|
||||
_logger.LogInformation("DecretsService - Export success");
|
||||
Console.WriteLine("Eksport do pliku dekretów");
|
||||
Console.WriteLine();
|
||||
await _csvService.CsvExport($"Export/{_context.DecretsFileName}", result.OrderBy(x => x.Data).ThenBy(x => x.Nr));
|
||||
await _csvService.CsvExport($"Export/{_context.DecretsFileName}", result.OrderBy(x => x.Data)
|
||||
.ThenBy(x => x.Nr));
|
||||
Console.WriteLine("Eksport do pliku dekretów zakończony powodzeniem");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace FKGees.Services;
|
||||
|
||||
internal class RegistersService
|
||||
public class RegistersService
|
||||
{
|
||||
private readonly PcmService _pcmService;
|
||||
private readonly CsvService _csvService;
|
||||
@@ -22,7 +22,8 @@ internal class RegistersService
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.LogInformation("RegistersService - Start exports registers, StartDate: {StartDate}, EndDate: {EndDate}", _context.StatDate , _context.EndDate);
|
||||
_logger.LogInformation("RegistersService - Start exports registers, StartDate: {StartDate}, EndDate: {EndDate}", _context.StatDate,
|
||||
_context.EndDate);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Export rejestrów");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user