[open-ils-commits] r8782 -
branches/acq-experiment/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 19 17:42:17 EST 2008
Author: erickson
Date: 2008-02-19 17:11:53 -0500 (Tue, 19 Feb 2008)
New Revision: 8782
Modified:
branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
added stored proc to return the calculated amount based on exchange rates between two currencies
Modified: branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql 2008-02-19 20:00:10 UTC (rev 8781)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql 2008-02-19 22:11:53 UTC (rev 8782)
@@ -325,6 +325,10 @@
END;
$$ LANGUAGE PLPGSQL;
+CREATE OR REPLACE FUNCTION acq.exchange_ratio ( TEXT, TEXT, NUMERIC ) RETURNS NUMERIC AS $$
+ SELECT $3 * acq.exchange_ratio($1, $2);
+$$ LANGUAGE SQL;
+
CREATE OR REPLACE VIEW acq.funding_source_credit_total AS
SELECT funding_source,
SUM(amount) AS amount
More information about the open-ils-commits
mailing list