Index: openacs-4/packages/ecommerce/www/admin/orders/fulfill-3.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/fulfill-3.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/admin/orders/fulfill-3.xql 22 Jul 2001 07:04:48 -0000 1.2 +++ openacs-4/packages/ecommerce/www/admin/orders/fulfill-3.xql 26 May 2002 04:36:50 -0000 1.3 @@ -1,92 +1,96 @@ - - - select count(*) from ec_shipments where shipment_id=:shipment_id - - + + + select count(*) + from ec_shipments + where shipment_id=:shipment_id + + - - - - select shipping_method from ec_orders where order_id=:order_id - - + + + select shipping_method + from ec_orders + where order_id=:order_id + + - - - - select shipping_method from ec_orders where order_id=:order_id - - - - - - - select coalesce(sum(price_charged),0) from ec_items where item_id in ([join $item_id_vars ", "]) - - - - - - - select count(*) from ec_shipments where order_id=:order_id - - - - - - - select coalesce(sum(shipping_charged),0) from ec_items where item_id in ([join $item_id_vars ", "]) - - - - - - - select ${shipping_of_items}::numeric + shipping_charged from ec_orders where order_id=:order_id - - - - - - - - update ec_items - set item_state='shipped', shipment_id=:shipment_id - where item_id in ([join $item_id_vars ", "]) + + + select shipping_method + from ec_orders + where order_id=:order_id + + - - + + + select coalesce(sum(price_charged),0) + from ec_items + where item_id in ([join $item_id_list ", "]) + + + + + + select count(*) + from ec_shipments + where order_id=:order_id + + + + + + select coalesce(sum(shipping_charged),0) + from ec_items + where item_id in ([join $item_id_list ", "]) + + + + + + select ${shipping_of_items}::numeric + shipping_charged + from ec_orders + where order_id=:order_id + + + + + + update ec_items + set item_state='shipped', shipment_id=:shipment_id + where item_id in ([join $item_id_list ", "]) + + - - - - select count(*) from ec_financial_transactions where order_id=:order_id and to_be_captured_p='t' - - - - - - - select max(transaction_id) from ec_financial_transactions where order_id=:order_id - - - - - - - select max(transaction_id) from ec_financial_transactions where order_id=:order_id - - - - - - - update ec_financial_transactions set failed_p='t' where transaction_id=:transaction_id - - - - + + + select transaction_amount + from ec_financial_transactions + where order_id = :order_id + and to_be_captured_p is null + and transaction_type = 'charge' + + + + + + select transaction_id + from ec_financial_transactions + where order_id=:order_id + and to_be_captured_p is null + and transaction_type = 'charge' + + + + + + update ec_financial_transactions + set failed_p='t' + where transaction_id=:transaction_id + + +