PaymentVariantsWindow: Add button to export Buchungsliste
This commit is contained in:
@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace Elwig.Models.Dtos {
|
||||
public class CreditNoteDeliveryData : DataTable<CreditNoteDeliveryRow> {
|
||||
|
||||
private static readonly (string, string, string?)[] FieldNames = new[] {
|
||||
("", "", (string?)null), // TODO
|
||||
};
|
||||
private static readonly (string, string, string?)[] FieldNames = [
|
||||
("", "", null), // TODO
|
||||
];
|
||||
|
||||
private readonly int Year;
|
||||
private readonly int? TgNr;
|
||||
@ -25,7 +25,7 @@ namespace Elwig.Models.Dtos {
|
||||
MgNr = mgnr;
|
||||
}
|
||||
|
||||
public static async Task<IDictionary<int, CreditNoteDeliveryData>> ForPaymentVariant(DbSet<CreditNoteRowSingle> table, DbSet<Season> seasons, int year, int avnr) {
|
||||
public static async Task<IDictionary<int, CreditNoteDeliveryData>> ForPaymentVariant(DbSet<CreditNoteDeliveryRowSingle> table, DbSet<Season> seasons, int year, int avnr) {
|
||||
return (await FromDbSet(table, year, avnr))
|
||||
.GroupBy(
|
||||
r => new { r.Year, r.AvNr, r.MgNr, r.TgNr, r.DId, r.DPNr },
|
||||
@ -36,7 +36,7 @@ namespace Elwig.Models.Dtos {
|
||||
.ToDictionary(d => d.MgNr ?? 0);
|
||||
}
|
||||
|
||||
private static async Task<IEnumerable<CreditNoteRowSingle>> FromDbSet(DbSet<CreditNoteRowSingle> table, int? year = null, int? avnr = null, int? mgnr = null) {
|
||||
private static async Task<IEnumerable<CreditNoteDeliveryRowSingle>> FromDbSet(DbSet<CreditNoteDeliveryRowSingle> table, int? year = null, int? avnr = null, int? mgnr = null) {
|
||||
var y = year?.ToString() ?? "NULL";
|
||||
var v = avnr?.ToString() ?? "NULL";
|
||||
var m = mgnr?.ToString() ?? "NULL";
|
||||
@ -77,7 +77,7 @@ namespace Elwig.Models.Dtos {
|
||||
public decimal? TotalModifiers;
|
||||
public decimal? Amount;
|
||||
|
||||
public CreditNoteDeliveryRow(IEnumerable<CreditNoteRowSingle> rows, DbSet<Season> seasons) {
|
||||
public CreditNoteDeliveryRow(IEnumerable<CreditNoteDeliveryRowSingle> rows, DbSet<Season> seasons) {
|
||||
var f = rows.First();
|
||||
Year = f.Year;
|
||||
TgNr = f.TgNr;
|
||||
@ -110,7 +110,7 @@ namespace Elwig.Models.Dtos {
|
||||
}
|
||||
|
||||
[Keyless]
|
||||
public class CreditNoteRowSingle {
|
||||
public class CreditNoteDeliveryRowSingle {
|
||||
[Column("year")]
|
||||
public int Year { get; set; }
|
||||
[Column("tgnr")]
|
||||
|
Reference in New Issue
Block a user