ZukunftLeben/Export/DatevExporter.cs - auch archivierte HPs in Erlösen

SupportOID=167738
This commit is contained in:
2026-07-13 08:51:18 +02:00
parent a522be2b17
commit fe9adb7ba3

View File

@@ -228,7 +228,7 @@ SELECT
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 and sd.Name <> 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 and (org.Name = 'LVR' OR org.Name = 'LWL')
WHERE c.`IsActive` = 1 AND sc.`IsActive` <> 0 and (org.Name = 'LVR' OR org.Name = 'LWL')
and (sr.`GeleisteteFLM` is not null)
UNION
(SELECT
@@ -251,7 +251,7 @@ SELECT
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 and sd.Name = 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 and (org.Name = 'LVR' OR org.Name = 'LWL')
WHERE c.`IsActive` = 1 AND sc.`IsActive` <> 0 and (org.Name = 'LVR' OR org.Name = 'LWL')
and (sr.`GeleisteteFLM` is not null)))
)qry
GROUP BY qry.OID