Index: openacs-4/packages/ecommerce/tcl/ecommerce-money-computations-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-money-computations-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/tcl/ecommerce-money-computations-procs.xql 10 Jul 2001 20:38:43 -0000 1.1 +++ openacs-4/packages/ecommerce/tcl/ecommerce-money-computations-procs.xql 26 May 2002 04:36:49 -0000 1.2 @@ -1,120 +1,119 @@ + - - + + select price from ec_products where product_id=:product_id - - - - - - - - select p.price, c.user_class_name - from ec_product_user_class_prices p, ec_user_classes c - where p.product_id=:product_id - and p.user_class_id=c.user_class_id - and p.user_class_id in (select m.user_class_id from ec_user_class_user_map m where m.user_id=:user_id $additional_user_class_restriction) - - - - - - - + + + + + + select p.price, c.user_class_name + from ec_product_user_class_prices p, ec_user_classes c + where p.product_id=:product_id + and p.user_class_id=c.user_class_id + and p.user_class_id in (select m.user_class_id + from ec_user_class_user_map m + where m.user_id=:user_id $additional_user_class_restriction) + + + + + select sale_price, sale_name - from ec_sale_prices_current - where product_id=:product_id - and (offer_code is null $or_part_of_query) - - - - - - - - select shipping, shipping_additional, weight from ec_products where product_id=:product_id - - - - - - - select default_shipping_per_item, weight_shipping_cost from ec_admin_settings - - - - - - - select min(item_id) from ec_items where product_id=:product_id and order_id:order_id - - - - - - - select add_exp_amount_per_item, add_exp_amount_by_weight from ec_admin_settings - - - - - - - select price from ec_products where product_id=:product_id - - - - - - + from ec_sale_prices_current + where product_id=:product_id + and (offer_code is null $or_part_of_query) + + + + + + select shipping, shipping_additional, weight + from ec_products + where product_id=:product_id + + + + + + select default_shipping_per_item, weight_shipping_cost + from ec_admin_settings + + + + + + select min(item_id) + from ec_items + where product_id = :product_id + and order_id:order_id + + + + + + select add_exp_amount_per_item, add_exp_amount_by_weight + from ec_admin_settings + + + + + + select price from ec_products + where product_id=:product_id + + + + + select p.price, c.user_class_name - from ec_product_user_class_prices p, ec_user_classes c - where p.product_id=:product_id - and p.user_class_id=c.user_class_id - and p.user_class_id in ([join $user_class_id_list ", "]) - - - - - - + from ec_product_user_class_prices p, ec_user_classes c + where p.product_id=:product_id + and p.user_class_id=c.user_class_id + and p.user_class_id in ([join $user_class_id_list ", "]) + + + + + select sale_price, sale_name - from ec_sale_prices_current - where product_id=:product_id - and (offer_code is null $or_part_of_query) - - - - - - - - select shipping, shipping_additional, weight from ec_products where product_id=:product_id - - - - - - - select min(item_id) from ec_items where product_id=:product_id and order_id=:order_id - - - - - - - - select confirmed_date, user_id, - ec_total_price(:order_id) as total_price, - ec_total_shipping(:order_id) as total_shipping, - ec_total_tax(:order_id) as total_tax - from ec_orders - where order_id = :order_id - - - - - + from ec_sale_prices_current + where product_id=:product_id + and (offer_code is null $or_part_of_query) + + + + + + select case when no_shipping_avail_p = 'f' then shipping else null end as shipping, + case when no_shipping_avail_p = 'f' then shipping_additional else null end as shipping_additional, + case when no_shipping_avail_p = 'f' then weight else null end as weight + from ec_products + where product_id = :product_id + + + + + + select min(item_id) + from ec_items + where product_id = :product_id + and order_id=:order_id + + + + + + select confirmed_date, user_id, + ec_total_price(:order_id) as total_price, + ec_total_shipping(:order_id) as total_shipping, + ec_total_tax(:order_id) as total_tax + from ec_orders + where order_id = :order_id + + +