From e161c8a64cf8e4d5ab9c5779adc4acb7faee1454 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 22 Jan 2014 12:45:05 +0100 Subject: [PATCH] =?utf8?q?=20GuV=20und=20Ist-Versteuerung=20und=20Abteilun?= =?utf8?q?gsfilter=20fehlerhaft=20War=20in=202009=20noch=20in=20Ordnung.?= =?utf8?q?=20Ist=20beim=20=C3=9Cberarbeiten=20f=C3=BCr=20$inwhere=20=C3=BC?= =?utf8?q?bersehen=20worden=20closes=20#2427?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/RP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/RP.pm b/SL/RP.pm index c4a95039b..4a7b0afef 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -516,7 +516,7 @@ sub get_accounts_g { if ($form->{method} eq 'cash') { $query = qq| - SELECT SUM( ac.amount * CASE WHEN COALESCE((SELECT amount FROM ar WHERE id = ac.trans_id), 0) != 0 THEN + SELECT SUM( ac.amount * CASE WHEN COALESCE((SELECT amount FROM ar a WHERE id = ac.trans_id $dpt_where), 0) != 0 THEN /* ar amount is not zero, so we can divide by amount */ (SELECT SUM(acc.amount) * -1 FROM acc_trans acc -- 2.20.1