Index: openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-credit-procs-postgresql.xql 16 Jul 2001 04:12:04 -0000 1.2 @@ -8,7 +8,7 @@ select ec_order_cost(:order_id) as total_amount, creditcard_id, - case when sign(current_timestamp - confirmed_date - .95) = -1 then 1 else 0 end as youth + case when extract(day from current_timestamp - confirmed_date) > 1 then 0 when extract(hour from current_timestamp - confirmed_date)/24 < 0.95 then 1 else 0 end as youth from ec_orders where order_id = :order_id @@ -21,7 +21,7 @@ select transaction_amount as total_amount, creditcard_id, - case when sign(current_timestamp-inserted_date-.95) = -1 then 1 else 0 end as youth + case when extract(day from current_timestamp - inserted_date) > 1 then 0 when extract(hour from current_timestamp-inserted_date)/24 < 0.95 then 1 else 0 end as youth from ec_financial_transactions where transaction_id = :transaction_id Index: openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-scheduled-procs-postgresql.xql 16 Jul 2001 04:12:04 -0000 1.2 @@ -162,7 +162,7 @@ - select case when sign(1 - ((current_timestamp-marked_date)/2)) = -1 then 1 else 0 end from ec_financial_transactions where transaction_id=:transaction_id + select case when extract(day from (current_timestamp-marked_date)) >= 2 then 1 else 0 end from ec_financial_transactions where transaction_id=:transaction_id @@ -227,7 +227,7 @@ - select case when sign(1 - ((current_timestamp-refunded_date)/2)) = -1 then 1 else 0 end from ec_financial_transactions where transaction_id=:transaction_id + select case when extract(day from (current_timestamp-marked_date)) >= 2 then 1 else 0 end from ec_financial_transactions where transaction_id=:transaction_id