Index: openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.adp 18 Aug 2008 05:27:17 -0000 1.1 @@ -0,0 +1,38 @@ + + @title;noquote@ + @context;noquote@ +

@title@

+ +
+@export_form_vars_html;noquote@ + + + +
+ +
+ +

Item(s):

+ + + +

Pickup date: @temp_shipment_date_html;noquote@

+
+

Shipment information:

+
    +
  • Shipment date: @shipment_date_html;noquote@
  • +
+ +

Ship to:

+ +
+ @shipment_to_html;noquote@ +
+
+ +
+ +
+
Index: openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.tcl 9 Aug 2008 10:33:13 -0000 1.10 +++ openacs-4/packages/ecommerce/www/admin/orders/fulfill-2.tcl 18 Aug 2008 05:27:17 -0000 1.11 @@ -24,9 +24,8 @@ ad_require_permission [ad_conn package_id] admin -# The customer service rep must be logged on. - auth::require_login + set customer_service_rep [ad_get_user_id] if { ![empty_string_p $carrier_other] } { @@ -46,14 +45,13 @@ append temp_expected_arrival_date $expected_arrival_date(date) if { [exists_and_not_null expected_arrival_time(time)] } { set expected_arrival_time(time) [ec_timeentrywidget_time_check $expected_arrival_time(time)] - append temp_expected_arrival_date " $expected_arrival_time(time)$expected_arrival_time(ampm)" + append temp_expected_arrival_date " $expected_arrival_time(time)$expected_arrival_time(ampm)" } else { - append temp_expected_arrival_date " 12:00:00AM" + append temp_expected_arrival_date " 12:00:00AM" } } -set shippable_p [ec_decode [db_string shipping_method_select " - select shipping_method +set shippable_p [ec_decode [db_string shipping_method_select "select shipping_method from ec_orders where order_id=:order_id"] "no shipping" 0 1] if { $shippable_p } { @@ -71,25 +69,21 @@ if { [info exists all_items_p] && [info exists item_id] } { incr exception_count - append exception_text "
  • Please either check off \"All items\" or check off some of the items, but not both." + append exception_text "
  • Please check either \"All items\" or some of the items, but not both.
  • " } if { ![info exists all_items_p] && ![info exists item_id] } { incr exception_count - append exception_text "
  • Please either check off \"All items\" or check off some of the items." + append exception_text "
  • Please check either \"All items\" or some of the items, but not both.
  • " } if { $exception_count > 0 } { ad_return_complaint 1 $exception_text return } -append page_html "[ad_admin_header "Confirm that these item(s) have been [ec_decode $shippable_p 1 "shipped" "fulfilled"]"] +set title "Confirm that these item(s) have been [ec_decode $shippable_p 1 "shipped" "fulfilled"]" +set context [list [list index "Orders / Shipments / Refunds"] $title] -

    Confirm that these item(s) have been [ec_decode $shippable_p 1 "shipped" "fulfilled"]

    - - [ad_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index" "Orders"] [list "fulfillment" "Fulfillment"] "One Order"] -
    " - set shipment_id [db_nextval ec_shipment_id_sequence] if { [info exists item_id] && ![empty_string_p $item_id] } { @@ -113,72 +107,40 @@ db_foreach get_items_to_ship $sql { if { [info exists all_items_p] } { - lappend item_id_list $item_id + lappend item_id_list $item_id } set option_list [list] if { ![empty_string_p $color_choice] } { - lappend option_list "Color: $color_choice" + lappend option_list "Color: $color_choice" } if { ![empty_string_p $size_choice] } { - lappend option_list "Size: $size_choice" + lappend option_list "Size: $size_choice" } if { ![empty_string_p $style_choice] } { - lappend option_list "Style: $style_choice" + lappend option_list "Style: $style_choice" } set options [join $option_list ", "] - append items_to_print "
  • $product_name; [ec_decode $options "" "" "$options; "]$price_name: [ec_pretty_pure_price $price_charged]" + append items_to_print "
  • $product_name; [ec_decode $options "" "" "$options; "]$price_name: [ec_pretty_pure_price $price_charged]
  • " } if { [info exists all_items_p] } { set item_id $item_id_list } -append page_html " -
    - [export_form_vars shipment_id order_id item_id carrier tracking_number] - - +set export_form_vars_html [export_form_vars shipment_id order_id item_id carrier tracking_number] -
    - -
    -
    - Item(s): -
      - $items_to_print -
    " +set temp_shipment_date_html [ec_formatted_date $temp_shipment_date] -if { !$shippable_p } { - append page_html "Pickup date: [ec_formatted_date $temp_shipment_date]" -} else { - append page_html "Shipment information: -
      -
    • Shipment date: [ec_formatted_date $temp_shipment_date] - [ec_decode $temp_expected_arrival_date "" "" "
    • Expected arrival date: [ec_formatted_date $temp_expected_arrival_date]"] - [ec_decode $carrier "" "" "
    • Carrier: $carrier"] - [ec_decode $tracking_number "" "" "
    • Tracking Number: $tracking_number"] -
    • -
    - -

    Ship to:

    - -
    - [ec_display_as_html [ec_pretty_mailing_address_from_ec_addresses \ - [db_string get_pretty_mailing_address "select shipping_address from ec_orders where order_id=:order_id"]]] -
    " +if { $shippable_p } { + set shipment_date_html "[ec_formatted_date $temp_shipment_date] + [ec_decode $temp_expected_arrival_date "" "" "
  • Expected arrival date: [ec_formatted_date $temp_expected_arrival_date]
  • "] + [ec_decode $carrier "" "" "
  • Carrier: $carrier
  • "] + [ec_decode $tracking_number "" "" "
  • Tracking Number: $tracking_number
  • "]" + set shipment_to_html "[ec_display_as_html [ec_pretty_mailing_address_from_ec_addresses \ + [db_string get_pretty_mailing_address "select shipping_address from ec_orders where order_id=:order_id"]]]" } -append page_html " -
    - -
    - -
    -
    - - [ad_admin_footer]" - db_release_unused_handles -doc_return 200 text/html $page_html +