Index: openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql	22 Aug 2001 03:08:03 -0000	1.10
+++ openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql	25 Aug 2001 00:24:05 -0000	1.11
@@ -3349,7 +3349,7 @@
 BEGIN
         select coalesce(sum(ec_cert_unshipped_one_order(v_gift_certificate_id,order_id)),0) into tied_but_unshipped_amount
         from ec_orders
-        where order_id in (select unique order_id from ec_gift_certificate_usage where gift_certificate_id=v_gift_certificate_id);
+        where order_id in (select distinct order_id from ec_gift_certificate_usage where gift_certificate_id=v_gift_certificate_id);
 
         return tied_but_unshipped_amount;
 END;' language 'plpgsql';
