diff --git a/ReportImp/ZukunftLeben/Export/DatevExporter.cs b/ReportImp/ZukunftLeben/Export/DatevExporter.cs index 50b909413..ac9fccfff 100644 --- a/ReportImp/ZukunftLeben/Export/DatevExporter.cs +++ b/ReportImp/ZukunftLeben/Export/DatevExporter.cs @@ -132,7 +132,7 @@ cb2sc.Notice AS 'Kostenstelle', lastDate = lastDate.AddMonths(1).AddDays(-1); String buchungstext = ""; - long? c2sOid = (long?)row[5]; + long? c2sOid = (long?)row[4]; if (c2sOid.HasValue) { var c2s = DAOFactory.GenericDAO.LoadByID(c2sOid.Value); @@ -180,7 +180,7 @@ ib.`AccountingPeriodStart` 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.InvoiceDate >= ':Monat_Start' AND ib.InvoiceDate < ':Monat_End' and ib.IsActive = 1 +WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 order by ib.invoicenumber ";