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.5.2.1 --- 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 17 Oct 2002 03:57:01 -0000 1.5.2.1 @@ -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') + + Index: openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql 26 May 2002 04:36:50 -0000 1.7 +++ openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql 17 Oct 2002 03:57:01 -0000 1.7.2.1 @@ -91,4 +91,37 @@ + + + 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' + limit 1 + + + + + + update ec_items + set item_state = 'to_be_shipped' + from ec_products p + where ec_items.order_id = :order_id + and 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 + from ec_products p + where ec_items.order_id = :order_id + and ec_items.product_id = p.product_id + and p.no_shipping_avail_p = 't' + + + Index: openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.xql 26 May 2002 04:36:50 -0000 1.2 +++ openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.xql 17 Oct 2002 03:57:01 -0000 1.2.2.1 @@ -41,29 +41,7 @@ where order_id=:order_id - - - - update ec_items - set item_state = 'shipped', shipment_id = :shipment_id - from ec_products p - where ec_items.order_id = :order_id - and ec_items.product_id = p.product_id - and p.no_shipping_avail_p = 't' - - - - - update ec_items - set item_state = 'to_be_shipped' - from ec_products p - where ec_items.order_id = :order_id - and ec_items.product_id = p.product_id - and p.no_shipping_avail_p = 'f' - - - select user_id