Index: openacs-4/packages/ecommerce/www/finalize-order-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/finalize-order-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/ecommerce/www/finalize-order-oracle.xql 26 May 2002 04:36:50 -0000 1.2
+++ openacs-4/packages/ecommerce/www/finalize-order-oracle.xql 30 Nov 2002 17:31:29 -0000 1.3
@@ -8,21 +8,20 @@
- select ec_gift_certificate_balance(:user_id)
- from dual
+ select ec_gift_certificate_balance(:user_id) from dual
- select ec_order_gift_cert_amount(:order_id)
- from dual
+ select ec_order_gift_cert_amount(:order_id) from dual
-
+
- select nvl(sum(i.price_charged),0) - nvl(sum(i.price_refunded),0) as soft_goods_cost
+ select nvl(sum(i.price_charged),0) - nvl(sum(i.price_refunded),0) as soft_goods_cost,
+ nvl(sum(i.price_tax_charged),0) - nvl(sum(i.price_tax_refunded),0) as soft_goods_tax
from ec_items i, ec_products p
where i.order_id = :order_id
and i.item_state <> 'void'
@@ -31,9 +30,12 @@
-
+
- select nvl(sum(i.price_charged),0) - nvl(sum(i.price_refunded),0) as hard_goods_cost
+ select nvl(sum(i.price_charged),0) - nvl(sum(i.price_refunded),0) as hard_goods_cost,
+ nvl(sum(i.price_tax_charged),0) - nvl(sum(i.shipping_refunded),0) as hard_goods_tax,
+ nvl(sum(i.shipping_charged),0) - nvl(sum(i.shipping_refunded),0) as hard_goods_shipping,
+ nvl(sum(i.shipping_tax_charged),0) - nvl(sum(i.shipping_tax_refunded),0) as hard_goods_shipping_tax
from ec_items i, ec_products p
where i.order_id = :order_id
and i.item_state <> 'void'
@@ -92,4 +94,16 @@
+
+
+ select nvl(shipping_charged, 0) from ec_orders where order_id = :order_id
+
+
+
+
+
+ select ec_tax(0, :order_shipping, :order_id) from dual
+
+
+