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

SF.net SVN: ledger-smb:[2526] trunk



Revision: 2526
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2526&view=rev
Author:   einhverfr
Date:     2009-03-23 21:55:05 +0000 (Mon, 23 Mar 2009)

Log Message:
-----------
Adding CSS file required for Javascript on payments

Modified Paths:
--------------
    trunk/sql/modules/Reconciliation.sql

Added Paths:
-----------
    trunk/UI/payments/payments.css

Added: trunk/UI/payments/payments.css
===================================================================
--- trunk/UI/payments/payments.css	                        (rev 0)
+++ trunk/UI/payments/payments.css	2009-03-23 21:55:05 UTC (rev 2526)
@@ -0,0 +1,6 @@
+table.detail_table_visible {
+	display: block;
+}
+table.detail_table_hidden{
+	display: none;
+}

Modified: trunk/sql/modules/Reconciliation.sql
===================================================================
--- trunk/sql/modules/Reconciliation.sql	2009-03-23 18:00:04 UTC (rev 2525)
+++ trunk/sql/modules/Reconciliation.sql	2009-03-23 21:55:05 UTC (rev 2526)
@@ -167,16 +167,20 @@
 	in_count int;
 	t_scn TEXT;
 	t_uid int;
+	t_prefix text;
     BEGIN
+
+	SELECT value into t_prefix FROM defaults WHERE setting_key = 'check_prefix';
+
 	t_uid := person__get_my_entity_id();
 	IF in_scn = '' THEN 
 		t_scn := NULL;
 	ELSE 
-		t_scn := in_scn;
+		t_scn := t_prefix || in_scn;
 	END IF;
 	IF t_scn IS NOT NULL THEN
 		SELECT count(*) INTO in_count FROM cr_report_line
-		WHERE in_scn = scn AND report_id = in_report_id 
+		WHERE in_scn ilike scn AND report_id = in_report_id 
 			AND their_balance = 0;
 
 		IF in_count = 0 THEN
@@ -193,12 +197,12 @@
 				AND their_balance = 0;
 		ELSE 
 			SELECT count(*) INTO in_count FROM cr_report_line
-			WHERE in_scn = scn AND report_id = in_report_id
+			WHERE in_scn ilike scn AND report_id = in_report_id
 				AND our_value = in_amount and their_balance = 0;
 
 			IF in_count = 0 THEN -- no match among many of values
 				SELECT id INTO lid FROM cr_report_line
-                        	WHERE in_scn = scn AND report_id = in_report_id
+                        	WHERE in_scn ilike scn AND report_id = in_report_id
 				ORDER BY our_balance ASC limit 1;
 
 				UPDATE cr_report_line
@@ -217,7 +221,7 @@
 					AND their_balance = 0;
 			ELSE -- More than one match
 				SELECT id INTO lid FROM cr_report_line
-                        	WHERE in_scn = scn AND report_id = in_report_id
+                        	WHERE in_scn ilike scn AND report_id = in_report_id
                                 	AND our_value = in_amount
 				ORDER BY id ASC limit 1;
 


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