diff --git a/ReportImp/CaritasverbandOstvest/Export/DiamantExporter.cs b/ReportImp/CaritasverbandOstvest/Export/DiamantExporter.cs index 415f24abd..8bb942226 100644 --- a/ReportImp/CaritasverbandOstvest/Export/DiamantExporter.cs +++ b/ReportImp/CaritasverbandOstvest/Export/DiamantExporter.cs @@ -387,7 +387,7 @@ null, null, null, null, null, null, null, null, null, null, null, null, null, 'E 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 = 'LWL' OR org.Oid = 4) AND (sr.`GeleisteteFLM` is not null)) + WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 AND (org.Name = 'LWL') AND (sr.`GeleisteteFLM` is not null)) UNION (SELECT ROUND(0.8 * (sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ),2) AS 'Betrag', @@ -407,7 +407,7 @@ null, null, null, null, null, null, null, null, null, null, null, null, null, 'E 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 = 'LWL' OR org.Oid = 4) AND (sr.`GeleisteteFLM` is not null)) + WHERE c.`IsActive` = 1 AND sc.`IsActive` = 1 AND (org.Name = 'LWL') AND (sr.`GeleisteteFLM` is not null)) )qry GROUP BY qry.OID ORDER BY qry.Verwendung