From 11195f5c6d51b13b73e901984a35d55a9fe4b36d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sat, 21 Jan 2017 14:50:08 +0100 Subject: [PATCH] =?utf8?q?Erweiterung=20Liquidit=C3=A4ts=C3=BCbersicht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit wiederkehrende Rechnungen mit Periode einmalig wie einen normalen offenen Auftrag in der Liquiditätsübersicht behandeln --- SL/LiquidityProjection.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/LiquidityProjection.pm b/SL/LiquidityProjection.pm index 710c099d9..5954e0056 100644 --- a/SL/LiquidityProjection.pm +++ b/SL/LiquidityProjection.pm @@ -113,6 +113,7 @@ sub create { FROM periodic_invoices pi LEFT JOIN periodic_invoices_configs pcfg ON (pi.config_id = pcfg.id) WHERE pcfg.active + AND NOT pcfg.periodicity = 'o' AND (pi.period_start_date >= to_date($q_min_date, 'YYYY-MM-DD')) SQL @@ -138,6 +139,7 @@ SQL LEFT JOIN buchungsgruppen bg ON (p.buchungsgruppen_id = bg.id) LEFT JOIN employee e ON (COALESCE(oe.salesman_id, oe.employee_id) = e.id) WHERE pcfg.active + AND NOT pcfg.periodicity = 'o' SQL # 3. Iterieren über Saldierungsintervalle, vormerken @@ -180,7 +182,7 @@ SQL WHERE (oe.customer_id IS NOT NULL) AND NOT COALESCE(oe.quotation, FALSE) AND NOT COALESCE(oe.closed, FALSE) - AND (oe.id NOT IN (SELECT oe_id FROM periodic_invoices_configs)) + AND (oe.id NOT IN (SELECT oe_id FROM periodic_invoices_configs WHERE periodicity <> 'o')) SQL # 5. Initialisierung der Datenstrukturen zum Speichern der -- 2.20.1