CreditNoteData: Add AccountingNr of member
Test / Run tests (push) Successful in 3m6s

This commit is contained in:
2026-07-06 11:03:38 +02:00
parent 314a0d37a8
commit 000117dc67
+6 -1
View File
@@ -17,6 +17,7 @@ namespace Elwig.Models.Dtos {
("Address", "Adresse", null, 60),
("Plz", "PLZ", null, 10),
("Locality", "Ort", null, 60),
("AccountingNr", "BH-Konto", null, 20),
("Iban", "IBAN", null, 45),
("TgNr", "TG-Nr.", null, 20),
("Sum", "Zwischens.", "€", 20),
@@ -53,7 +54,7 @@ namespace Elwig.Models.Dtos {
SELECT m.mgnr, m.name AS name_1,
COALESCE(m.prefix || ' ', '') || m.given_name ||
COALESCE(' ' || m.middle_names, '') || COALESCE(' ' || m.suffix, '') AS name_2,
p.plz, o.name AS ort, m.address, m.iban, c.tgnr, s.year, s.precision,
p.plz, o.name AS ort, m.address, m.accounting_nr, m.iban, c.tgnr, s.year, s.precision,
p.amount - p.net_amount AS surcharge,
c.net_amount, c.prev_net_amount, c.vat, c.vat_amount, c.gross_amount, c.modifiers, c.prev_modifiers, c.amount,
ROUND(b.total_penalty / POW(10, s.precision - 2)) AS shares_penalty,
@@ -83,6 +84,7 @@ namespace Elwig.Models.Dtos {
public string Address;
public int Plz;
public string Locality;
public string? AccountingNr;
public string? Iban;
public string TgNr;
public decimal Sum;
@@ -108,6 +110,7 @@ namespace Elwig.Models.Dtos {
Address = row.Address;
Plz = row.Plz;
Locality = row.Locality;
AccountingNr = row.AccountingNr;
Iban = row.Iban != null ? Utils.FormatIban(row.Iban) : null;
TgNr = $"{row.Year}/{row.TgNr}";
Total = Utils.DecFromDb(row.NetAmount, prec1);
@@ -153,6 +156,8 @@ namespace Elwig.Models.Dtos {
public required string LocalityFull { get; set; }
[NotMapped]
public string Locality => LocalityFull.Split(",")[0];
[Column("accounting_nr")]
public string? AccountingNr { get; set; }
[Column("iban")]
public string? Iban { get; set; }
[Column("year")]