From 660d45346a48cabde5b42c3a933ebb3fb58fdfb3 Mon Sep 17 00:00:00 2001 From: aurynn_cmd Date: Tue, 24 Jul 2007 20:29:24 +0000 Subject: Adds the missing SELECT INTO statements for the correct_bank_charge and correct_unaccounted_charge functions git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1437 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Reconciliaton.sql | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql') diff --git a/sql/modules/Reconciliaton.sql b/sql/modules/Reconciliaton.sql index 1dfc7d7e..2142a1fe 100644 --- a/sql/modules/Reconciliaton.sql +++ b/sql/modules/Reconciliaton.sql @@ -137,6 +137,8 @@ CREATE OR REPLACE FUNCTION reconciliation_correct_bank_charge (in_report_id int, pending_entry pending_reports; BEGIN + select into pending_entry from pending_reports where report_id = in_report_id and id = in_id; + IF NOT FOUND THEN -- Raise an exception. RAISE EXCEPTION "Cannot find entry with ID % in report %.", in_id, in_report_id; @@ -164,6 +166,8 @@ CREATE OR REPLACE FUNCTION reconciliation_correct_unaccounted_charge (in_report_ note TEXT; BEGIN + select into pending_entry from pending_reports where report_id = in_report_id and id = in_id; + IF NOT FOUND THEN -- Raise an exception. RAISE EXCEPTION "Cannot find entry with ID % in report %.", in_id, in_report_id; -- cgit v1.2.3