[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2534] trunk
- Subject: SF.net SVN: ledger-smb:[2534] trunk
- From: ..hidden..
- Date: Thu, 26 Mar 2009 00:16:29 +0000
Revision: 2534
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2534&view=rev
Author: einhverfr
Date: 2009-03-26 00:16:29 +0000 (Thu, 26 Mar 2009)
Log Message:
-----------
Correcting reconciliation bank file upload behavior
Modified Paths:
--------------
trunk/sql/modules/README
trunk/sql/modules/Reconciliation.sql
trunk/t/01-load.t
Modified: trunk/sql/modules/README
===================================================================
--- trunk/sql/modules/README 2009-03-25 22:52:49 UTC (rev 2533)
+++ trunk/sql/modules/README 2009-03-26 00:16:29 UTC (rev 2534)
@@ -23,6 +23,7 @@
Person.sql
Report.sql
Voucher.sql
+Reconciliation.sql
Note that the Roles.sql is special and must be preprocessed to get it to work.
A command like:
Modified: trunk/sql/modules/Reconciliation.sql
===================================================================
--- trunk/sql/modules/Reconciliation.sql 2009-03-25 22:52:49 UTC (rev 2533)
+++ trunk/sql/modules/Reconciliation.sql 2009-03-26 00:16:29 UTC (rev 2534)
@@ -223,7 +223,7 @@
END IF;
IF t_scn IS NOT NULL THEN
SELECT count(*) INTO in_count FROM cr_report_line
- WHERE in_scn ilike scn AND report_id = in_report_id
+ WHERE scn ilike t_scn AND report_id = in_report_id
AND their_balance = 0;
IF in_count = 0 THEN
@@ -240,12 +240,12 @@
AND their_balance = 0;
ELSE
SELECT count(*) INTO in_count FROM cr_report_line
- WHERE in_scn ilike scn AND report_id = in_report_id
+ WHERE t_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 ilike scn AND report_id = in_report_id
+ WHERE t_scn ilike scn AND report_id = in_report_id
ORDER BY our_balance ASC limit 1;
UPDATE cr_report_line
@@ -259,12 +259,12 @@
SET their_balance = in_amount,
trans_type = in_type,
clear_time = in_date
- WHERE in_scn = scn AND report_id = in_report_id
+ WHERE t_scn = scn AND report_id = in_report_id
AND our_value = in_amount
AND their_balance = 0;
ELSE -- More than one match
SELECT id INTO lid FROM cr_report_line
- WHERE in_scn ilike scn AND report_id = in_report_id
+ WHERE t_scn ilike scn AND report_id = in_report_id
AND our_value = in_amount
ORDER BY id ASC limit 1;
@@ -314,7 +314,7 @@
comment on function reconciliation__add_entry(
in_report_id INT,
in_scn TEXT,
- in_user TEXT,
+ in_type TEXT,
in_date TIMESTAMP,
in_amount numeric
) IS
Modified: trunk/t/01-load.t
===================================================================
--- trunk/t/01-load.t 2009-03-25 22:52:49 UTC (rev 2533)
+++ trunk/t/01-load.t 2009-03-26 00:16:29 UTC (rev 2534)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 35;
+use Test::More tests => 34;
use_ok('LedgerSMB');
use_ok('LedgerSMB::AA');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.