Index: openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-oracle.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-oracle.xql 26 May 2002 04:36:50 -0000 1.5
+++ openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-oracle.xql 30 Nov 2002 17:31:18 -0000 1.6
@@ -89,5 +89,40 @@
(:gift_certificate_id, :order_id, least(to_number(:amount_available), to_number(:amount_owed)), sysdate)
+
+
+
+ select item_id
+ from ec_items i, ec_products p
+ where i.order_id = :order_id
+ and i.product_id = p.product_id
+ and p.no_shipping_avail_p = 't'
+ and rownum=1
+
+
+
+
+
+ update ec_items
+ set item_state = 'to_be_shipped'
+ where ec_items.order_id = :order_id
+ and exists
+ (select product_id from ec_products p
+ where ec_items.product_id=p.product_id
+ and p.no_shipping_avail_p = 'f')
+
+
+
+
+
+ update ec_items
+ set item_state = 'shipped', shipment_id = :shipment_id
+ where ec_items.order_id = :order_id
+ and exists
+ (select product_id from ec_products p
+ where ec_items.product_id=p.product_id
+ and p.no_shipping_avail_p = 't')
+
+