Index: openacs-4/packages/ecommerce/www/admin/orders/items-return-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/items-return-3.tcl,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/ecommerce/www/admin/orders/items-return-3.tcl 26 May 2002 04:36:50 -0000 1.2 +++ openacs-4/packages/ecommerce/www/admin/orders/items-return-3.tcl 17 Oct 2002 04:36:25 -0000 1.2.2.1 @@ -81,7 +81,7 @@ set tax_price_to_refund $price_to_refund($item_id) set iteration_price_tax_to_refund [ec_min $price_tax_charged [db_string get_ec_tax " - select ec_tax(:tax_price_to_refund,0,:order_id) + select coalesce(ec_tax(:tax_price_to_refund,0,:order_id),0) from dual"]] set total_price_tax_to_refund [expr $total_price_tax_to_refund + $iteration_price_tax_to_refund] } @@ -99,7 +99,7 @@ set total_shipping_to_refund [expr $total_shipping_to_refund + $shipping_to_refund($item_id)] set iteration_shipping_tax_to_refund [ec_min $shipping_tax_charged [db_string get_it_shipping_tax_refund " - select ec_tax(0,$shipping_to_refund($item_id), $order_id) + select coalesce(ec_tax(0,$shipping_to_refund($item_id), $order_id),0) from dual"]] set total_shipping_tax_to_refund [expr $total_shipping_tax_to_refund + $iteration_shipping_tax_to_refund] } @@ -123,7 +123,7 @@ } else { set total_shipping_to_refund [expr $total_shipping_to_refund + $base_shipping_to_refund] set iteration_shipping_tax_to_refund [ec_min $base_shipping_tax [db_string get_base_shipping_it_refund " - select ec_tax(0,:base_shipping,:order_id) + select coalesce(ec_tax(0,:base_shipping,:order_id),0) from dual"]] set total_shipping_tax_to_refund [expr $total_shipping_tax_to_refund + $iteration_shipping_tax_to_refund] } @@ -139,7 +139,7 @@ # Determine how much of this will be refunded in cash set cash_amount_to_refund [db_string get_cash_refunded " - select ec_cash_amount_to_refund(:total_amount_to_refund,:order_id) + select nvl(ec_cash_amount_to_refund(:total_amount_to_refund,:order_id),0) from dual"] # Calculate gift certificate amount and tax to refund