Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql 11 Jul 2001 05:22:37 -0000 1.2 @@ -48,9 +48,8 @@ - FIX ME DECODE - select decode(sign(current_timestamp-available_date),1,1,null,1,0) as available_p, + select case when current_timestamp-available_date > 0 then 1 when current_timestamp-available_date is NULL then 1 else 0 end as available_p, color_list, size_list, style_list, no_shipping_avail_p from ec_products where product_id = :product_id Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 11 Jul 2001 05:22:37 -0000 1.2 @@ -227,18 +227,15 @@ - FIX ME OUTER JOIN select eco.confirmed_date, eco.creditcard_id, eco.shipping_method, u.email, eca.line1, eca.line2, eca.city, eca.usps_abbrev, eca.zip_code, eca.country_code, eca.full_state_name, eca.attn, eca.phone, eca.phone_time - from ec_orders eco, - cc_users u, - ec_addresses eca + from ec_orders eco + LEFT JOIN cc_users u on (eco.user_id = u.user_id) + LEFT JOIN ec_addresses eca on (eco.shipping_address = eca.address_id) where eco.order_id = :order_id - and eco.user_id = u.user_id(+) - and eco.shipping_address = eca.address_id(+) 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.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs-postgresql.xql 11 Jul 2001 05:22:37 -0000 1.2 @@ -5,8 +5,9 @@ - FIX ME PLSQL -declare begin ec_reinst_gift_cert_on_order (:order_id); end; + +select ec_reinst_gift_cert_on_order (:order_id) + Index: openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.tcl 20 Apr 2001 20:51:13 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-state-changes-procs.tcl 11 Jul 2001 05:22:37 -0000 1.2 @@ -19,7 +19,7 @@ db_1row credit_user_select "select creditcard_id, user_id from ec_orders where order_id=:order_id" db_dml order_state_update "update ec_orders set order_state='in_basket', confirmed_date=null where order_id=:order_id" db_dml creditcard_update "update ec_creditcards set failed_p='t' where creditcard_id=:creditcard_id" - db_dml reinst_gift_cert_on_order "declare begin ec_reinst_gift_cert_on_order (:order_id); end;" + db_exec_plsql reinst_gift_cert_on_order "declare begin ec_reinst_gift_cert_on_order (:order_id); end;" } # If a credit card authorization occurs, the following actions Index: openacs-4/packages/ecommerce/www/admin/orders/void-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/void-2-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/orders/void-2-postgresql.xql 10 Jul 2001 20:33:53 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/orders/void-2-postgresql.xql 11 Jul 2001 05:22:37 -0000 1.2 @@ -19,7 +19,7 @@ - select ec_reinst_gift_cert_on_order(:order_id); + select ec_reinst_gift_cert_on_order(:order_id) Index: openacs-4/packages/ecommerce/www/admin/orders/void-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/void-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/orders/void-2.tcl 20 Apr 2001 20:51:14 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/orders/void-2.tcl 11 Jul 2001 05:22:37 -0000 1.2 @@ -33,7 +33,7 @@ " # Reinstate gift certificates. - db_dml gift_certificates_reinst "declare begin ec_reinst_gift_cert_on_order(:order_id); end;" + db_exec_plsql gift_certificates_reinst "declare begin ec_reinst_gift_cert_on_order(:order_id); end;" } ad_returnredirect "one?[export_url_vars order_id]" Index: openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql 10 Jul 2001 20:33:53 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql 11 Jul 2001 05:22:37 -0000 1.2 @@ -26,8 +26,8 @@ select o.offer_id, o.retailer_id, retailer_name, price, shipping, stock_status, special_offer_p, special_offer_html, shipping_unavailable_p, offer_begins, offer_ends, o.deleted_p, - case when sign(current_timestamp-offer_begins) = 1 then 1 else 0 end as offer_begun_p, - case when sign(current_timestamp-offer_ends) = 1 then 1 else 0 end as offer_expired_p + case when current_timestamp-offer_begins > 0 then 1 else 0 end as offer_begun_p, + case when current_timestamp-offer_ends > 0 then 1 else 0 end as offer_expired_p from ec_offers o, ec_retailers r where o.retailer_id=r.retailer_id and o.product_id=:product_id