Dekrety #1
This commit is contained in:
95
FKGees/App.cs
Normal file
95
FKGees/App.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using System.Globalization;
|
||||
using CsvHelper;
|
||||
using CsvHelper.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace FKGees;
|
||||
|
||||
public class App
|
||||
{
|
||||
private readonly DocumentsService _documentsService;
|
||||
private readonly IEnumerable<IDocumentDefinition> _docDefinitions;
|
||||
private ILogger<App> _logger;
|
||||
|
||||
public App(DocumentsService documentsService, ILogger<App> logger, IEnumerable<IDocumentDefinition> docDefinitions)
|
||||
{
|
||||
_documentsService = documentsService;
|
||||
_logger = logger;
|
||||
_docDefinitions = docDefinitions;
|
||||
}
|
||||
|
||||
public async Task Run(string[] args)
|
||||
{
|
||||
var dataOd = DateTime.Today - TimeSpan.FromDays(1);
|
||||
var dataDo = DateTime.Today - TimeSpan.FromSeconds(1);
|
||||
if (args.Length == 0)
|
||||
{
|
||||
Console.WriteLine("Nie podano argumentów - wykonuję eksport 'Za wczoraj'");
|
||||
await Task.Delay(2000);
|
||||
}
|
||||
else if (args.Length != 2)
|
||||
{
|
||||
Console.WriteLine("Wymagane są dwa argumenty");
|
||||
Console.WriteLine("DataOd DataDo");
|
||||
Console.WriteLine("Data w formacie: yyyy-MM-dd np: 2020-12-25");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!DateTime.TryParseExact(args[0], Constants.DefaultdateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out dataOd))
|
||||
{
|
||||
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 dataDo))
|
||||
{
|
||||
Console.WriteLine("Niewłaściwy format DataOd");
|
||||
await Task.Delay(4000);
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
var doctypes = _docDefinitions.Select(x => x.DocType)
|
||||
.ToArray();
|
||||
|
||||
var doks = await _documentsService.Fetch(doctypes, dataOd, dataDo.AddDays(1) - TimeSpan.FromSeconds(1));
|
||||
|
||||
var result = new List<DecretsResult>();
|
||||
foreach (var docDefinition in _docDefinitions)
|
||||
{
|
||||
Console.WriteLine($"Export: {docDefinition.Type}");
|
||||
var res = await docDefinition.Process(doks);
|
||||
result.AddRange(res);
|
||||
}
|
||||
|
||||
Console.WriteLine("Eksport do pliku dekretów");
|
||||
Console.WriteLine();
|
||||
await using var writer = new StreamWriter("Export/dekrety.csv");
|
||||
|
||||
try
|
||||
{
|
||||
IWriterConfiguration conf = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
Delimiter = ";",
|
||||
Mode = CsvMode.RFC4180,
|
||||
ShouldQuote = quoteArgs => quoteArgs.Field != nameof(DecretsResult.Data)
|
||||
&& quoteArgs.Field != nameof(DecretsResult.DataWplywu)
|
||||
&& !DateTime.TryParseExact(quoteArgs.Field, Constants.DefaultdateFormat, CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None, out _)
|
||||
};
|
||||
await using var csv = new CsvWriter(writer, conf);
|
||||
await csv.WriteRecordsAsync(result.OrderBy(x => x.Data));
|
||||
|
||||
Console.WriteLine("Eksport udany");
|
||||
await Task.Delay(5000);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, "Error");
|
||||
Console.WriteLine("Eksport się nie udał");
|
||||
Console.WriteLine(e.Message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
FKGees/Constants.cs
Normal file
39
FKGees/Constants.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using FKGees.DocsDefinitions;
|
||||
|
||||
namespace FKGees
|
||||
{
|
||||
internal static class Constants
|
||||
{
|
||||
public const string DefaultdateFormat = "yyyy-MM-dd";
|
||||
public static class DbConfig
|
||||
{
|
||||
public const string Host = "DbSettings:Host";
|
||||
public const string Port = "DbSettings:Port";
|
||||
public const string Login = "DbSettings:Login";
|
||||
public const string Password = "DbSettings:Password";
|
||||
public const string Database = "DbSettings:Database";
|
||||
}
|
||||
|
||||
public static readonly Dictionary<string, string> KwTekstyDod = new()
|
||||
{
|
||||
{nameof(KwBony), "*BONY*"},
|
||||
{nameof(KwOpakowania), "*KAUCJA ZA PRZYJĘTE*"},
|
||||
{nameof(KwUtarg), "*UTARG*"},
|
||||
{nameof(KwPolcard), "*POLCARD*"},
|
||||
{nameof(KwInne), "*INNE*"},
|
||||
{nameof(KwPomylkaKasjera), "*POMYŁKA*"},
|
||||
{nameof(KwLotto), "*LOTTO*"},
|
||||
};
|
||||
|
||||
public static readonly Dictionary<string, string> KpTekstyDod = new()
|
||||
{
|
||||
{nameof(KpKaucjaZaOpakowania), "*KAUCJA ZA OPAKOWANIA*"},
|
||||
{nameof(KpKasy), "*SPRZEDAŻ Z KAS*"},
|
||||
{nameof(KpRachunki), "*MOJE RACH.*"},
|
||||
{nameof(KpInne), "*INNE*"},
|
||||
{nameof(KpPaysafe), "*PAYSAFE*"},
|
||||
{nameof(KpLotto), "*LOTTO*"},
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
63
FKGees/DocsDefinitions/FaktSprz.cs
Normal file
63
FKGees/DocsDefinitions/FaktSprz.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class FaktSprz : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 33;
|
||||
public string Type => "FaktSprz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("200-01", "WN", "[sbr]"),
|
||||
new Definition("732-0-24", "MA", "[sbr]"),
|
||||
new Definition("732-0-24", "WN", "[svr]"),
|
||||
new Definition("222-0-24", "MA", "[svr]"),
|
||||
new Definition("343-0-24", "WN", "[svr]"),
|
||||
new Definition("737-0-24", "MA", "[svr]"),
|
||||
new Definition("737-0-24", "WN", "[sbr]"),
|
||||
new Definition("332-0-24", "MA", "[sbr]"),
|
||||
];
|
||||
|
||||
private readonly DocumentsService _documentsService;
|
||||
|
||||
public FaktSprz(DocumentsService documentsService)
|
||||
{
|
||||
_documentsService = documentsService;
|
||||
}
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
var fakt = _documentsService.WzNrFaktury(dok.DokId);
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = fakt;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[sbr]" => doc.Netto + doc.Podatek,
|
||||
"[svr]" => doc.Podatek,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
38
FKGees/DocsDefinitions/KorDetal.cs
Normal file
38
FKGees/DocsDefinitions/KorDetal.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KorDetal : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 8;
|
||||
public string Type => "KorDetal";
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("300", "MA", "[snr]"),
|
||||
new Definition("400", "WN", "[snr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.NrDok;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = dok.Netto;
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
43
FKGees/DocsDefinitions/KpInne.cs
Normal file
43
FKGees/DocsDefinitions/KpInne.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpInne : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpInne);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("139-1-24", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpInne)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.TekstZaCo(),
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = Math.Abs(dok.Zaplacono)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
43
FKGees/DocsDefinitions/KpKasy.cs
Normal file
43
FKGees/DocsDefinitions/KpKasy.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpKasy : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpKasy);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
new Definition("139-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpKasy)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.TekstZaCo(),
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = Math.Abs(dok.Zaplacono)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
41
FKGees/DocsDefinitions/KpKaucjaZDokUtargu.cs
Normal file
41
FKGees/DocsDefinitions/KpKaucjaZDokUtargu.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpKaucjaZDokUtargu : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public string Type => nameof(KpKaucjaZDokUtargu);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
new Definition("139-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType && x.Kwota1 != 0);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = $"KAUCJA ZA OPAKOWANIA {dok.DokKasa?.Kasa.Nazwa ?? string.Empty}",
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = dok.Kwota1
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KpKaucjaZaOpakowania.cs
Normal file
40
FKGees/DocsDefinitions/KpKaucjaZaOpakowania.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpKaucjaZaOpakowania : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpKaucjaZaOpakowania);
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
new Definition("139-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpKaucjaZaOpakowania)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
43
FKGees/DocsDefinitions/KpLotto.cs
Normal file
43
FKGees/DocsDefinitions/KpLotto.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpLotto : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpLotto);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
new Definition("249-1-22", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpLotto)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.TekstZaCo(),
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = Math.Abs(dok.Zaplacono)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
43
FKGees/DocsDefinitions/KpPaysafe.cs
Normal file
43
FKGees/DocsDefinitions/KpPaysafe.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpPaysafe : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpPaysafe);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("139-1-24", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpPaysafe)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.TekstZaCo(),
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = Math.Abs(dok.Zaplacono)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
43
FKGees/DocsDefinitions/KpRachunki.cs
Normal file
43
FKGees/DocsDefinitions/KpRachunki.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KpRachunki : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KpRachunki);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("100-1-24", "WN", "[sbr]"),
|
||||
new Definition("249-0-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KP")
|
||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpRachunki)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.TekstZaCo(),
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = Math.Abs(dok.Zaplacono)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwBony.cs
Normal file
40
FKGees/DocsDefinitions/KwBony.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwBony : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwBony);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("100-1-24", "MA", "[sbr]"),
|
||||
new Definition("234-0-01", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwBony)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwInne.cs
Normal file
40
FKGees/DocsDefinitions/KwInne.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwInne : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwInne);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwInne)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwLotto.cs
Normal file
40
FKGees/DocsDefinitions/KwLotto.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwLotto : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwLotto);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("249-0-22", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwLotto)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
39
FKGees/DocsDefinitions/KwOpakowania.cs
Normal file
39
FKGees/DocsDefinitions/KwOpakowania.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwOpakowania : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwOpakowania);
|
||||
public List<Definition> Definitions { get; } = [
|
||||
new Definition("139-1-24", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwOpakowania)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwPolcard.cs
Normal file
40
FKGees/DocsDefinitions/KwPolcard.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwPolcard : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwPolcard);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("249-0-29", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwPolcard)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwPomylkaKasjera.cs
Normal file
40
FKGees/DocsDefinitions/KwPomylkaKasjera.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwPomylkaKasjera : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwPomylkaKasjera);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwPomylkaKasjera)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
40
FKGees/DocsDefinitions/KwUtarg.cs
Normal file
40
FKGees/DocsDefinitions/KwUtarg.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class KwUtarg : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 51;
|
||||
public string Type => nameof(KwUtarg);
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("139-0-01", "WN", "[sbr]"),
|
||||
new Definition("100-1-24", "MA", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType
|
||||
&& x.NrDok.StartsWith("KW")
|
||||
&& x.Tekst1() == Constants.KwTekstyDod[nameof(KwUtarg)]);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Math.Abs(dok.Zaplacono);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
52
FKGees/DocsDefinitions/MmMinus.cs
Normal file
52
FKGees/DocsDefinitions/MmMinus.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class MmMinus : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 6;
|
||||
public string Type => "Mm-";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[znr]" => doc.NettoMag,
|
||||
"[snr]-[znr]" => doc.Netto - doc.NettoMag,
|
||||
"[sbr]-[snr]" => doc.Podatek,
|
||||
"[sbr]" => doc.Netto + doc.Podatek,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
52
FKGees/DocsDefinitions/MmPlus.cs
Normal file
52
FKGees/DocsDefinitions/MmPlus.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class MmPlus : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 3;
|
||||
public string Type => "Mm+";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[znr]" => doc.Netto,
|
||||
"[snr]-[znr]" => doc.NettoDet - doc.Netto,
|
||||
"[sbr]-[snr]" => doc.Podatek,
|
||||
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
53
FKGees/DocsDefinitions/Przecena.cs
Normal file
53
FKGees/DocsDefinitions/Przecena.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class Przecena : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 18;
|
||||
public string Type => "Pc";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("342-0-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.TekstZaCo();
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = Processvalue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private decimal Processvalue(Dok doc, string expression)
|
||||
{
|
||||
switch(expression)
|
||||
{
|
||||
case "[znr]":
|
||||
return doc.PozDok.Sum(x => x.CenaMag);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
53
FKGees/DocsDefinitions/Pz.cs
Normal file
53
FKGees/DocsDefinitions/Pz.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class Pz : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 2;
|
||||
public string Type => "Pz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType && x.RozliczaRozliczanyDok.Count == 0);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = d.Account == "305-60-24" ? item.k_NIP : dok.NrDok;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[znr]" => doc.Netto,
|
||||
"[snr]-[znr]" => doc.NettoDet - doc.Netto,
|
||||
"[sbr]-[snr]" => doc.Podatek,
|
||||
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
59
FKGees/DocsDefinitions/PzFaktura.cs
Normal file
59
FKGees/DocsDefinitions/PzFaktura.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class PzFaktura : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 2;
|
||||
public string Type => "PzFaktura";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("301-0-24", "WN", "[znr]"),
|
||||
new Definition("221-0-24", "WN", "[zvr]"),
|
||||
new Definition("210-1", "MA", "[zbr]"),
|
||||
new Definition("301-0-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType && x.RozliczaRozliczanyDok.Count == 1);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.RozliczaRozliczanyDok.FirstOrDefault()
|
||||
?.Dok.Data.ToString(Constants.DefaultdateFormat) ?? string.Empty;
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.RozliczaRozliczanyDok.FirstOrDefault()?.Dok.NrDok ?? string.Empty;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[znr]" => doc.Netto,
|
||||
"[zvr]" => doc.Podatek,
|
||||
"[zbr]" => doc.Netto + doc.Podatek,
|
||||
"[snr]-[znr]" => doc.NettoDet - doc.Netto,
|
||||
"[sbr]-[snr]" => doc.PodatekDet,
|
||||
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
59
FKGees/DocsDefinitions/RapFisk.cs
Normal file
59
FKGees/DocsDefinitions/RapFisk.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class RapFisk : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 53;
|
||||
public string Type => "Rapfisk";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("737-0-24", "WN", "[sbr]"),
|
||||
new Definition("332-0-24", "MA", "[sbr]"),
|
||||
new Definition("139-1-24", "WN", "[sbr]"),
|
||||
new Definition("732-0-24", "MA", "[sbr]"),
|
||||
new Definition("343-0-24", "WN", "[svr]"),
|
||||
new Definition("737-0-24", "MA", "[svr]"),
|
||||
new Definition("732-0-24", "WN", "[svr]"),
|
||||
new Definition("222-0-24", "MA", "[svr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = new DecretsResult
|
||||
{
|
||||
k_Skrot = "Detal",
|
||||
k_Nazwa = "Odbiorca detaliczny",
|
||||
Data = dok.DataPom.ToString(Constants.DefaultdateFormat),
|
||||
DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat),
|
||||
Nr = dok.NrDok,
|
||||
Opis = dok.NrDok,
|
||||
StronaKonta = d.AccountSide,
|
||||
KontoFk = d.Account,
|
||||
Kwota = ProcessValue(dok, d.Expression)
|
||||
};
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
||||
"[svr]" => doc.Podatek,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
53
FKGees/DocsDefinitions/Wz.cs
Normal file
53
FKGees/DocsDefinitions/Wz.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace FKGees.DocsDefinitions;
|
||||
|
||||
public class Wz : IDocumentDefinition
|
||||
{
|
||||
public int DocType => 2;
|
||||
public string Type => "Wz";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("305-60-24", "MA", "[znr]"),
|
||||
new Definition("342-0-24", "MA", "[snr]-[znr]"),
|
||||
new Definition("343-0-24", "MA", "[sbr]-[snr]"),
|
||||
new Definition("332-0-24", "WN", "[sbr]")
|
||||
];
|
||||
|
||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||
{
|
||||
var result = new List<DecretsResult>();
|
||||
|
||||
var toProcess = documents
|
||||
.Where(x => x.TypDok == DocType);
|
||||
|
||||
foreach (var dok in toProcess)
|
||||
{
|
||||
Definitions.ForEach(d =>
|
||||
{
|
||||
var item = dok.FillKontr();
|
||||
item.Data = dok.DataPom.ToString(Constants.DefaultdateFormat);
|
||||
item.DataWplywu = dok.Data.ToString(Constants.DefaultdateFormat);
|
||||
item.Nr = dok.NrDok;
|
||||
item.Opis = dok.NrDok;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = ProcessValue(dok, d.Expression);
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
private static decimal ProcessValue(Dok doc, string expression)
|
||||
{
|
||||
return expression switch
|
||||
{
|
||||
"[znr]" => doc.NettoMag,
|
||||
"[snr]-[znr]" => doc.Netto - doc.NettoMag,
|
||||
"[sbr]-[snr]" => doc.Podatek,
|
||||
"[sbr]" => doc.Netto + doc.Podatek,
|
||||
_ => 0
|
||||
};
|
||||
}
|
||||
}
|
||||
44
FKGees/DocumentsService.cs
Normal file
44
FKGees/DocumentsService.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FKGees;
|
||||
|
||||
public class DocumentsService
|
||||
{
|
||||
private readonly IDbContextFactory<PcmDbContext> _dbContextFactory;
|
||||
|
||||
public DocumentsService(IDbContextFactory<PcmDbContext> dbContextFactory)
|
||||
{
|
||||
_dbContextFactory = dbContextFactory;
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<Dok>> Fetch(int[] typdok, DateTime dataOd, DateTime dataDo)
|
||||
{
|
||||
await using var context = await _dbContextFactory.CreateDbContextAsync();
|
||||
context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
|
||||
|
||||
var documents = await context.Dok
|
||||
.Include(x => x.DokKontr).ThenInclude(x => x.Kontr)
|
||||
.Include(x => x.DokKasa)
|
||||
.Include(x => x.TekstDok)
|
||||
.Include(x => x.PozDok)
|
||||
.Include(x => x.RozliczaRozliczanyDok).ThenInclude(x => x.Dok)
|
||||
.Include(x => x.DokKasa).ThenInclude(x => x.Kasa)
|
||||
.Where(x => typdok.Contains(x.TypDok) && x.Data >= dataOd && x.Data <= dataDo)
|
||||
.ToListAsync();
|
||||
return documents;
|
||||
|
||||
}
|
||||
|
||||
public string WzNrFaktury(decimal dokId)
|
||||
{
|
||||
using var context = _dbContextFactory.CreateDbContext();
|
||||
context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
|
||||
|
||||
var dok = context.Rozlicza
|
||||
.Include(x => x.RozliczanyDok)
|
||||
.FirstOrDefault(x => x.DokId == dokId);
|
||||
|
||||
|
||||
return dok?.RozliczanyDok.NrDok ?? string.Empty;
|
||||
}
|
||||
}
|
||||
39
FKGees/Extensions/DokExtensions.cs
Normal file
39
FKGees/Extensions/DokExtensions.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
internal static class DokExtensions
|
||||
{
|
||||
internal static DecretsResult FillKontr(this Dok doc)
|
||||
{
|
||||
var result = 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
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string TekstZaCo(this Dok dok)
|
||||
{
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == 17)?.Tekst ?? string.Empty;
|
||||
}
|
||||
|
||||
internal static string Tekst1(this Dok dok)
|
||||
{
|
||||
return dok.TekstDok.FirstOrDefault(x => x.Znaczenie == 71)?.Tekst ?? string.Empty;
|
||||
}
|
||||
|
||||
internal static decimal NettoToBrutto(this decimal netto, int stawka)
|
||||
{
|
||||
if (stawka is -1 or 0)
|
||||
return netto;
|
||||
|
||||
var rate = (decimal) stawka / 10000;
|
||||
return netto + netto * rate;
|
||||
}
|
||||
|
||||
}
|
||||
35
FKGees/Extensions/ServiceCollectionExtensions.cs
Normal file
35
FKGees/Extensions/ServiceCollectionExtensions.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using FKGees.DocsDefinitions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace FKGees.Extensions;
|
||||
|
||||
internal static class ServiceCollectionExtensions
|
||||
{
|
||||
internal static IServiceCollection AddDocumentsDefinitions(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IDocumentDefinition, Przecena>();
|
||||
services.AddSingleton<IDocumentDefinition, MmPlus>();
|
||||
services.AddSingleton<IDocumentDefinition, MmMinus>();
|
||||
services.AddSingleton<IDocumentDefinition, Pz>();
|
||||
services.AddSingleton<IDocumentDefinition, Wz>();
|
||||
services.AddSingleton<IDocumentDefinition, PzFaktura>();
|
||||
services.AddSingleton<IDocumentDefinition, RapFisk>();
|
||||
services.AddSingleton<IDocumentDefinition, KorDetal>();
|
||||
services.AddSingleton<IDocumentDefinition, FaktSprz>();
|
||||
services.AddSingleton<IDocumentDefinition, KwBony>();
|
||||
services.AddSingleton<IDocumentDefinition, KwInne>();
|
||||
services.AddSingleton<IDocumentDefinition, KwLotto>();
|
||||
services.AddSingleton<IDocumentDefinition, KwOpakowania>();
|
||||
services.AddSingleton<IDocumentDefinition, KwPolcard>();
|
||||
services.AddSingleton<IDocumentDefinition, KwPomylkaKasjera>();
|
||||
services.AddSingleton<IDocumentDefinition, KwUtarg>();
|
||||
services.AddSingleton<IDocumentDefinition, KpInne>();
|
||||
services.AddSingleton<IDocumentDefinition, KpKasy>();
|
||||
services.AddSingleton<IDocumentDefinition, KpKaucjaZaOpakowania>();
|
||||
services.AddSingleton<IDocumentDefinition, KpKaucjaZDokUtargu>();
|
||||
services.AddSingleton<IDocumentDefinition, KpLotto>();
|
||||
services.AddSingleton<IDocumentDefinition, KpPaysafe>();
|
||||
services.AddSingleton<IDocumentDefinition, KpRachunki>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
37
FKGees/FKGees.csproj
Normal file
37
FKGees/FKGees.csproj
Normal file
@@ -0,0 +1,37 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CsvHelper" Version="32.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.5"/>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
|
||||
<PackageReference Include="NLog" Version="5.3.2"/>
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.11"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="NLog.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Blink.Backoffice.Services.PcmDb\Blink.Backoffice.Services.PcmDb.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Blink.Backoffice.Services.PcmDb\Blink.Backoffice.Services.PcmDb.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
22
FKGees/FKGees.sln
Normal file
22
FKGees/FKGees.sln
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FKGees", "FKGees.csproj", "{9FF66BE4-FA5F-4B0E-9134-A3948A52B82B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blink.Backoffice.Services.PcmDb", "..\Blink.Backoffice.Services.PcmDb\Blink.Backoffice.Services.PcmDb.csproj", "{0335514B-DB70-4233-BBE6-2A5BEF205E73}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9FF66BE4-FA5F-4B0E-9134-A3948A52B82B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9FF66BE4-FA5F-4B0E-9134-A3948A52B82B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9FF66BE4-FA5F-4B0E-9134-A3948A52B82B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9FF66BE4-FA5F-4B0E-9134-A3948A52B82B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0335514B-DB70-4233-BBE6-2A5BEF205E73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0335514B-DB70-4233-BBE6-2A5BEF205E73}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0335514B-DB70-4233-BBE6-2A5BEF205E73}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0335514B-DB70-4233-BBE6-2A5BEF205E73}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
7
FKGees/GlobalUsings.cs
Normal file
7
FKGees/GlobalUsings.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
// Global using directives
|
||||
|
||||
global using Blink.Backoffice.Services.PcmDb;
|
||||
global using Blink.Backoffice.Services.PcmDb.Entities;
|
||||
global using FKGees.Extensions;
|
||||
global using FKGees.Interfaces;
|
||||
global using FKGees.Models;
|
||||
9
FKGees/Interfaces/IDocumentDefinition.cs
Normal file
9
FKGees/Interfaces/IDocumentDefinition.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace FKGees.Interfaces;
|
||||
|
||||
public interface IDocumentDefinition
|
||||
{
|
||||
public int DocType { get; }
|
||||
public string Type { get; }
|
||||
public List<Definition> Definitions { get; }
|
||||
Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents);
|
||||
}
|
||||
21
FKGees/Models/DecretsResult.cs
Normal file
21
FKGees/Models/DecretsResult.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
namespace FKGees.Models;
|
||||
|
||||
public class DecretsResult
|
||||
{
|
||||
public string Data { get; set; } = string.Empty;
|
||||
public string DataWplywu { get; set; } = string.Empty;
|
||||
public string Nr { get; set; } = string.Empty;
|
||||
public string KontoFk { get; set; } = string.Empty;
|
||||
public string StronaKonta { get; set; } = string.Empty;
|
||||
public decimal Kwota { get; set; }
|
||||
public string Opis { get; set; } = string.Empty;
|
||||
public string k_NIP { get; set; } = string.Empty;
|
||||
public string k_Skrot { get; set; } = string.Empty;
|
||||
public string k_Nazwa { get; set; } = string.Empty;
|
||||
public string k_KodPocztowy { get; set; } = string.Empty;
|
||||
public string k_Numer { get; set; } = string.Empty;
|
||||
public string k_Ulica { get; set; } = string.Empty;
|
||||
public string k_Miejscowosc { get; set; } = string.Empty;
|
||||
}
|
||||
3
FKGees/Models/Definition.cs
Normal file
3
FKGees/Models/Definition.cs
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace FKGees.Models;
|
||||
|
||||
public record Definition( string Account, string AccountSide, string Expression);
|
||||
18
FKGees/NLog.config
Normal file
18
FKGees/NLog.config
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd">
|
||||
|
||||
<variable name="logDirectory" value="${basedir}/Logs/" />
|
||||
|
||||
<targets>
|
||||
<target name="All" xsi:type="File" fileName="${logDirectory}/${shortdate}_allLogs.log" encoding="UTF-8" layout="${level:uppercase=true} | ${logger:uppercase=true} | ${longdate} | ${message} ${onexception:${newline}${trim-whitespace:trimWhiteSpace=true:inner=${exception:format=ToString,StackTrace:maxInnerExceptionLevel=5:innerFormat=ToString,StackTrace}}}" />
|
||||
<target name="Other" xsi:type="File" fileName="${logDirectory}/${shortdate}_${logger}.log" encoding="UTF-8" layout="${level:uppercase=true} | ${logger:uppercase=true} | ${longdate} | ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<logger name="*" minlevel="Information" writeTo="All"/>
|
||||
</rules>
|
||||
|
||||
</nlog>
|
||||
82
FKGees/Program.cs
Normal file
82
FKGees/Program.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using FKGees;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog;
|
||||
using NLog.Extensions.Logging;
|
||||
|
||||
var logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
|
||||
{
|
||||
var logger = LogManager.Setup()
|
||||
.LoadConfigurationFromFile("nlog.config")
|
||||
.GetCurrentClassLogger();
|
||||
logger.Fatal((Exception) e.ExceptionObject, "UnhandledException - aplication terminated");
|
||||
Environment.Exit(1);
|
||||
};
|
||||
|
||||
TaskScheduler.UnobservedTaskException += (sender, e) =>
|
||||
{
|
||||
var logger = LogManager.Setup()
|
||||
.LoadConfigurationFromFile("nlog.config")
|
||||
.GetCurrentClassLogger();
|
||||
logger.Fatal(e.Exception, "UnobservedTaskException - aplication terminated");
|
||||
Environment.Exit(1);
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
var config = new ConfigurationBuilder()
|
||||
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.Build();
|
||||
|
||||
var servicesProvider = AddServices(config)
|
||||
.BuildServiceProvider();
|
||||
|
||||
using (servicesProvider)
|
||||
{
|
||||
logger.Info("Run application");
|
||||
|
||||
if (!Directory.Exists("Export"))
|
||||
Directory.CreateDirectory("Export");
|
||||
|
||||
var app = servicesProvider.GetRequiredService<App>();
|
||||
app.Run(args).Wait();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex, "Stopped program because of exception");
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogManager.Shutdown();
|
||||
}
|
||||
|
||||
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";
|
||||
|
||||
var services = new ServiceCollection()
|
||||
.AddLogging(loggingBuilder =>
|
||||
{
|
||||
loggingBuilder.ClearProviders();
|
||||
loggingBuilder.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
|
||||
loggingBuilder.AddNLog(config);
|
||||
})
|
||||
.AddSingleton<App>()
|
||||
.AddDocumentsDefinitions()
|
||||
.AddTransient<DocumentsService>()
|
||||
.AddDbContextFactory<PcmDbContext>(options =>
|
||||
{
|
||||
options.UseSqlServer(connectionString);
|
||||
options.UseModel(Blink.Backoffice.Services.PcmDb.CompiledEntities.PcmDbContextModel.Instance);
|
||||
options.EnableSensitiveDataLogging(false);
|
||||
});
|
||||
|
||||
return services;
|
||||
}
|
||||
16
FKGees/appsettings.json
Normal file
16
FKGees/appsettings.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"Microsoft": "Debug",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"DbSettings": {
|
||||
"Host": "192.168.200.6",
|
||||
"Port": "1433",
|
||||
"Login": "sa",
|
||||
"Password": "10Coma123",
|
||||
"Database": "HECZNAROWICE"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user