[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5590] trunk
- Subject: SF.net SVN: ledger-smb:[5590] trunk
- From: ..hidden..
- Date: Wed, 16 Jan 2013 08:32:48 +0000
Revision: 5590
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5590&view=rev
Author: einhverfr
Date: 2013-01-16 08:32:47 +0000 (Wed, 16 Jan 2013)
Log Message:
-----------
Net 0 transactions showing up under transaction search now
Modified Paths:
--------------
trunk/Changelog
trunk/sql/modules/Report.sql
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2013-01-16 08:18:51 UTC (rev 5589)
+++ trunk/Changelog 2013-01-16 08:32:47 UTC (rev 5590)
@@ -95,6 +95,7 @@
* Fixed inverted tax numbers in vendor taxable sales report (Chris T, 3600002)
* Fixed cash/receipt and payment screen calculating to pay wrong (Chris T,
3599995)
+* Fixed net-0 transactions not showing up on search (Chris T, 3600700)
Changelog for 1.3.28
* Added db list to setup.pl when no db is entered and credentials allow login
Modified: trunk/sql/modules/Report.sql
===================================================================
--- trunk/sql/modules/Report.sql 2013-01-16 08:18:51 UTC (rev 5589)
+++ trunk/sql/modules/Report.sql 2013-01-16 08:32:47 UTC (rev 5590)
@@ -395,6 +395,7 @@
shipvia, ordnumber, ponumber, description, on_hold
FROM ap
WHERE in_entity_class = 1 and approved) a
+ LEFT
JOIN (SELECT trans_id, sum(amount) *
CASE WHEN in_entity_class = 1 THEN 1 ELSE -1 END AS due,
max(transdate) as last_payment
@@ -491,6 +492,7 @@
shipvia, ordnumber, ponumber, description, on_hold
FROM ap
WHERE in_entity_class = 1 and approved) a
+ LEFT
JOIN (select sum(amount) * case when in_entity_class = 1 THEN 1 ELSE -1 END
as due, trans_id, max(transdate) as last_payment
FROM acc_trans ac
@@ -506,7 +508,7 @@
JOIN entity mee ON ee.manager_id = mee.id
WHERE (in_account_id IS NULL OR
EXISTS (select * from acc_trans
- where trans_id = a.id AND chart_id = in_account_id))
+ where trans_id = a.id AND chart_id = in_account_id))
AND (in_entity_name IS NULL
OR eeca.name ilike in_entity_name || '%')
AND (in_meta_number IS NULL OR eca.meta_number ilike in_meta_number)
@@ -544,7 +546,7 @@
)
AND ( -- open/closed handling
(in_open IS TRUE AND p.due <> 0)
- OR (in_closed IS TRUE AND p.due = 0)
+ OR (in_closed IS TRUE AND p.due = 0 or p.due is null)
)
LOOP
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.