From 2eaadba6a3a7b5d071c21b57c99aedb7c9b309f3 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 27 Aug 2025 16:39:51 +0200 Subject: [PATCH] =?UTF-8?q?BellaDonna/Export/SimbaExporter=20-=20Allg.=20R?= =?UTF-8?q?gen=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReportImp/BellaDonna/Export/SimbaExporter.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ReportImp/BellaDonna/Export/SimbaExporter.cs b/ReportImp/BellaDonna/Export/SimbaExporter.cs index 1c7a514b0..1ba740e85 100644 --- a/ReportImp/BellaDonna/Export/SimbaExporter.cs +++ b/ReportImp/BellaDonna/Export/SimbaExporter.cs @@ -337,6 +337,7 @@ namespace BellaDonna.Export private static String GetMonatlicheRechnungenSql(DateTime date) { + //normale Einzelrechnungen u AllgRechnungen String sql = @" select 'BCH', @@ -361,7 +362,23 @@ namespace BellaDonna.Export 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 - order by ib.invoicenumber + UNION + SELECT DISTINCT + 'BCH', + (select sum(ii.AmountTotal) from invoiceitem ii where ii.invoicebaseoid = ib.oid), + '8030' as 'Gegenkonto', + ib.invoicenumber, + ib.InvoiceDate, + org.DebitorNumber, + '32', + ib.RecipientOrganisation, + '', + '', + ib.Oid + from invoicebase ib + inner join organisation org on org.costbeareroid = ib.RecipientOrganisationOid + WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1 + and ib.Type = 2 "; return sql;