Compare commits
No commits in common. "b5a9ad2e2b07ad632fb2eb3abc08d5a1e87a8588" and "9f288ceb7dea0d08ca3db71553fa85a8ab99200f" have entirely different histories.
b5a9ad2e2b
...
9f288ceb7d
@ -1,38 +0,0 @@
|
||||
namespace FKGees.DocsDefinitions.Decrets;
|
||||
|
||||
public class ObrotOpakowaniami : IDecretsDefinition
|
||||
{
|
||||
public int DocType => 1;
|
||||
public string Type => "Opak";
|
||||
public List<Definition> Definitions { get; } =
|
||||
[
|
||||
new Definition("307-0-24", "MA", "[sbr]"),
|
||||
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.DecretKontr();
|
||||
item.Data = dok.DataPom;
|
||||
item.DataWplywu = dok.Data;
|
||||
item.Nr = dok.NrDok;
|
||||
item.StronaKonta = d.AccountSide;
|
||||
item.KontoFk = d.Account;
|
||||
item.Kwota = dok.NettoDet.AsString();
|
||||
|
||||
result.Add(item);
|
||||
});
|
||||
}
|
||||
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
}
|
||||
@ -7,14 +7,13 @@ internal static class ServiceCollectionExtensions
|
||||
{
|
||||
internal static IServiceCollection AddDecretsDefinitions(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IDecretsDefinition, RapFisk>();
|
||||
services.AddSingleton<IDecretsDefinition, ObrotOpakowaniami>();
|
||||
services.AddSingleton<IDecretsDefinition, Przecena>();
|
||||
services.AddSingleton<IDecretsDefinition, MmPlus>();
|
||||
services.AddSingleton<IDecretsDefinition, MmMinus>();
|
||||
services.AddSingleton<IDecretsDefinition, Pz>();
|
||||
services.AddSingleton<IDecretsDefinition, Wz>();
|
||||
services.AddSingleton<IDecretsDefinition, PzFaktura>();
|
||||
services.AddSingleton<IDecretsDefinition, RapFisk>();
|
||||
services.AddSingleton<IDecretsDefinition, KorDetal>();
|
||||
services.AddSingleton<IDecretsDefinition, FaktSprz>();
|
||||
services.AddSingleton<IDecretsDefinition, KwBony>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user