[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5029] branches/1.3



Revision: 5029
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5029&view=rev
Author:   einhverfr
Date:     2012-07-24 02:25:14 +0000 (Tue, 24 Jul 2012)
Log Message:
-----------
Cash recon fixes:
journal entries now show up individually regardless of source
empty strings in source treated as NULL for display purposes

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/sql/modules/Reconciliation.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-07-24 02:10:21 UTC (rev 5028)
+++ branches/1.3/Changelog	2012-07-24 02:25:14 UTC (rev 5029)
@@ -8,6 +8,8 @@
 * Fixed an is_zero error saving purchase transactions (Nick P)
 * Fixed shipping selection not displaying customer info (Chris T, 3543932)
 * Fixed shipping redirection not displaying orders (Chris T, h/t Nigel T)
+* Recon screen now groups journal entries by transaction (Chris T, h/t Nick P)
+* Fixed empty string working as empty source for cash recon (Chris T)
 
 Changelog for 1.3.20
 * Fixes for es_AR translation, duplicate keys removed (Andres B)

Modified: branches/1.3/sql/modules/Reconciliation.sql
===================================================================
--- branches/1.3/sql/modules/Reconciliation.sql	2012-07-24 02:10:21 UTC (rev 5028)
+++ branches/1.3/sql/modules/Reconciliation.sql	2012-07-24 02:25:14 UTC (rev 5029)
@@ -379,7 +379,9 @@
 		INSERT INTO cr_report_line (report_id, scn, their_balance, 
 			our_balance, "user", voucher_id, ledger_id, post_date)
 		SELECT in_report_id, 
-		       COALESCE(ac.source, gl.ref),
+		       CASE WHEN ac.source IS NULL OR ac.source = '' 
+                            THEN gl.ref
+                            ELSE ac.source END,
 		       0, 
 		       sum(amount / CASE WHEN t_recon_fx IS NOT TRUE OR gl.table = 'gl'
                                          THEN 1
@@ -420,7 +422,8 @@
                                 AND (gl.table <> 'gl' OR ac.fx_transaction
                                                       IS TRUE))) 
 		GROUP BY gl.ref, ac.source, ac.transdate,
-			ac.memo, ac.voucher_id, gl.table
+			ac.memo, ac.voucher_id, gl.table, 
+                        case when gl.table = 'gl' then gl.id else 1 end
 		HAVING count(rl.id) = 0;
 
 		UPDATE cr_report set updated = now(),

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.