Fixes
This commit is contained in:
parent
16db72e6a3
commit
9f6840a87f
@ -29,7 +29,6 @@ namespace FKGees
|
|||||||
public static readonly Dictionary<string, string> KpTekstyDod = new()
|
public static readonly Dictionary<string, string> KpTekstyDod = new()
|
||||||
{
|
{
|
||||||
{nameof(KpKaucjaZaOpakowania), "*KAUCJA ZA OPAKOWANIA*"},
|
{nameof(KpKaucjaZaOpakowania), "*KAUCJA ZA OPAKOWANIA*"},
|
||||||
{nameof(KpKasy), "*SPRZEDAŻ Z KAS*"},
|
|
||||||
{nameof(KpRachunki), "*MOJE RACH.*"},
|
{nameof(KpRachunki), "*MOJE RACH.*"},
|
||||||
{nameof(KpInne), "*INNE*"},
|
{nameof(KpInne), "*INNE*"},
|
||||||
{nameof(KpPaysafe), "*PAYSAFE*"},
|
{nameof(KpPaysafe), "*PAYSAFE*"},
|
||||||
|
|||||||
@ -45,7 +45,7 @@ public class DostawaPrasy : IDecretsDefinition
|
|||||||
{
|
{
|
||||||
"[znr]" => doc.Netto,
|
"[znr]" => doc.Netto,
|
||||||
"[snr]-[znr]" => doc.NettoDet - doc.Netto,
|
"[snr]-[znr]" => doc.NettoDet - doc.Netto,
|
||||||
"[sbr]-[snr]" => doc.Podatek,
|
"[sbr]-[snr]" => doc.PodatekDet,
|
||||||
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
"[sbr]" => doc.NettoDet + doc.PodatekDet,
|
||||||
_ => 0
|
_ => 0
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,8 @@ public class KwCashback : IDecretsDefinition
|
|||||||
public string Type => nameof(KwCashback);
|
public string Type => nameof(KwCashback);
|
||||||
public List<Definition> Definitions { get; } =
|
public List<Definition> Definitions { get; } =
|
||||||
[
|
[
|
||||||
new Definition("249-0-19", "WN", "[sbr]")
|
new Definition("249-0-19", "WN", "[sbr]"),
|
||||||
|
new Definition("100-1-24", "MA", "[sbr]")
|
||||||
];
|
];
|
||||||
|
|
||||||
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
public Task<List<DecretsResult>> Process(IReadOnlyList<Dok> documents)
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
namespace FKGees.DocsDefinitions.Decrets;
|
namespace FKGees.DocsDefinitions.Decrets;
|
||||||
|
|
||||||
public class KpKasy : IDecretsDefinition
|
public class Utarg : IDecretsDefinition
|
||||||
{
|
{
|
||||||
public int DocType => 51;
|
public int DocType => 53;
|
||||||
public string Type => nameof(KpKasy);
|
public string Type => nameof(Utarg);
|
||||||
public List<Definition> Definitions { get; } =
|
public List<Definition> Definitions { get; } =
|
||||||
[
|
[
|
||||||
new Definition("100-1-24", "WN", "[sbr]"),
|
new Definition("100-1-24", "WN", "[sbr]"),
|
||||||
@ -15,9 +15,8 @@ public class KpKasy : IDecretsDefinition
|
|||||||
var result = new List<DecretsResult>();
|
var result = new List<DecretsResult>();
|
||||||
|
|
||||||
var toProcess = documents
|
var toProcess = documents
|
||||||
.Where(x => x.TypDok == DocType
|
.Where(x => x.TypDok == DocType && x.Kwota1 != 0)
|
||||||
&& x.NrDok.StartsWith("KP")
|
.GroupBy(x => x.Data);
|
||||||
&& x.Tekst1() == Constants.KpTekstyDod[nameof(KpKasy)]);
|
|
||||||
|
|
||||||
foreach (var dok in toProcess)
|
foreach (var dok in toProcess)
|
||||||
{
|
{
|
||||||
@ -25,13 +24,13 @@ public class KpKasy : IDecretsDefinition
|
|||||||
{
|
{
|
||||||
var item = new DecretsResult
|
var item = new DecretsResult
|
||||||
{
|
{
|
||||||
Data = dok.DataPom,
|
Data = dok.Key,
|
||||||
DataWplywu = dok.Data,
|
DataWplywu = dok.Key,
|
||||||
Nr = dok.NrDok,
|
Nr = string.Join(", ",dok.Select(z => z.NrDok)),
|
||||||
Opis = dok.TekstZaCo(),
|
Opis = "UTARG Z KAS",
|
||||||
StronaKonta = d.AccountSide,
|
StronaKonta = d.AccountSide,
|
||||||
KontoFk = d.Account,
|
KontoFk = d.Account,
|
||||||
Kwota = Math.Abs(dok.Zaplacono).AsString()
|
Kwota = dok.Sum(x => x.Netto + x.Podatek).AsString()
|
||||||
};
|
};
|
||||||
|
|
||||||
result.Add(item);
|
result.Add(item);
|
||||||
Loading…
x
Reference in New Issue
Block a user