DiakonischesWerkMuelheimTwg/Export/DatevExporter.cs - doch mit Kostenstelle u ohne BarbetragsRgen

SupportOID=169109
This commit is contained in:
2026-07-28 11:36:11 +02:00
parent 445fb99c05
commit 75c6d8c664

View File

@@ -88,7 +88,7 @@ namespace DiakonischesWerkMuelheimTwg.Export
sb.Append(";");
sb.Append(konto); // Konto
sb.Append(";");
//sb.Append(kostenstelle); // Kst (leer)
sb.Append(kostenstelle); // Kst (leer)
sb.Append(";");
sb.Append(buchungstext); // Text
return sb.ToString();
@@ -110,9 +110,9 @@ namespace DiakonischesWerkMuelheimTwg.Export
foreach (var item in period.InvoiceItemList)
{
string text = !String.IsNullOrWhiteSpace(item.UnitDescription) ? item.UnitDescription : item.ItemDescription;
if (EnthaeltPflegeOderBarbetrag(text))
if (EnthaeltPflege(text))
{
return "40920"; // Pflege / Barbetrag
return "40920"; // Pflege
}
}
}
@@ -120,13 +120,13 @@ namespace DiakonischesWerkMuelheimTwg.Export
return "40910"; // ABW (Umkehrschluss: kein Pflege/Barbetrag)
}
private static bool EnthaeltPflegeOderBarbetrag(string text)
private static bool EnthaeltPflege(string text)
{
if (String.IsNullOrEmpty(text))
{
return false;
}
return text.IndexOf("Pflege", StringComparison.OrdinalIgnoreCase) >= 0 || text.IndexOf("Barbetrag", StringComparison.OrdinalIgnoreCase) >= 0;
return text.IndexOf("Pflege", StringComparison.OrdinalIgnoreCase) >= 0;
}
private static String GetMonatlicheRechnungenSql(DateTime date)
@@ -153,7 +153,7 @@ ib.Oid
inner join invoicebase ib on ib.costbearer2supportconceptoid = c2s.oid
inner join serviceinvoice si on si.invoicebaseoid = ib.oid
inner join serviceinvoiceperiod sip on sip.serviceinvoiceoid = si.oid
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 AND ib.IsExported = 0
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 AND ib.InvoiceId <> 'Bar' AND ib.IsExported = 0
order by ib.invoicenumber
";