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.2 -r1.3 --- openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql 11 Jul 2001 05:22:37 -0000 1.2 +++ openacs-4/packages/ecommerce/www/admin/products/offers-postgresql.xql 17 Jul 2001 21:56:21 -0000 1.3 @@ -9,8 +9,8 @@ select o.offer_id, o.retailer_id, r.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 then 1 else 0 end as offer_begun_p, + case when current_timestamp > offer_ends then 1 else 0 end as offer_expired_p from ec_offers_current o, ec_retailers r where o.retailer_id=r.retailer_id and o.product_id=:product_id @@ -26,12 +26,12 @@ 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 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 + case when current_timestamp > offer_begins then 1 else 0 end as offer_begun_p, + case when current_timestamp > offer_ends 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 - and (o.deleted_p='t' or o.offer_begins - current_timestamp > 0 or o.offer_ends - current_timestamp < 0) + and (o.deleted_p='t' or o.offer_begins > current_timestamp or o.offer_ends < current_timestamp) order by o.last_modified desc