Index: openacs-4/packages/ecommerce/www/admin/orders/gift-certificates-issued.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/gift-certificates-issued.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/admin/orders/gift-certificates-issued.tcl 23 Jul 2001 05:56:22 -0000 1.2 +++ openacs-4/packages/ecommerce/www/admin/orders/gift-certificates-issued.tcl 26 May 2002 04:36:50 -0000 1.3 @@ -1,58 +1,60 @@ -# /www/[ec_url_concat [ec_url] /admin]/orders/gift-certificates-issued.tcl ad_page_contract { - View gift certificates issued. + View gift certificates issued. - @author Eve Andersson (eveander@arsdigita.com) - @creation-date Summer 1999 - @cvs-id gift-certificates-issued.tcl,v 3.2.2.3 2000/08/16 21:07:10 seb Exp - @author ported by Jerry Asher (jerry@theashergroup.com) + @author Eve Andersson (eveander@arsdigita.com) + @creation-date Summer 1999 + @author ported by Jerry Asher (jerry@theashergroup.com) + @author revised by Bart Teeuwisse + @revision-date April 2002 + } { - {view_rep "all"} - {view_issue_date "all"} - {order_by "gift_certificate_id"} + {view_rep "all"} + {view_issue_date "last_24"} + {order_by "gift_certificate_id"} } ad_require_permission [ad_conn package_id] admin -doc_body_append "[ad_admin_header "Gift Certificate Issue History"] +doc_body_append " + [ad_admin_header "Gift Certificate Issue History"] -

Gift Certificate Issue History

+

Gift Certificate Issue History

-[ad_admin_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index" "Orders"] "Gift Certificate Issue History"] + [ad_admin_context_bar [list "../" "Ecommerce([ec_system_name])"] [list "index" "Orders"] "Gift Certificate Issue History"] -
+
-
-[export_form_vars view_issue_date order_by] + + [export_form_vars view_issue_date order_by] - - - - - - -
RepIssue Date
+ + + + + + - + + +
RepIssue Date
+ - - -" +doc_body_append " + + + " set issue_date_list [list [list last_24 "last 24 hrs"] [list last_week "last week"] [list last_month "last month"] [list all all]] @@ -66,22 +68,19 @@ } } -doc_body_append "\[ [join $linked_issue_date_list " | "] \] +doc_body_append " + \[ [join $linked_issue_date_list " | "] \] +
+ +
" -
- - -
-" - if { $view_issue_date == "last_24" } { - #set issue_date_query_bit "and sysdate-g.issue_date <= 1" set issue_date_query_bit [db_map last_24] } elseif { $view_issue_date == "last_week" } { - #set issue_date_query_bit "and sysdate-g.issue_date <= 7" set issue_date_query_bit [db_map last_week] } elseif { $view_issue_date == "last_month" } { - #set issue_date_query_bit "and months_between(sysdate,g.issue_date) <= 1" set issue_date_query_bit [db_map last_month] } else { set issue_date_query_bit "" @@ -95,33 +94,34 @@ set link_beginning "gift-certificates-issued?[export_url_vars view_rep view_issue_date]" -set order_by_clause [util_decode $order_by \ - "gift_certificate_id" "g.gift_certificate_id" \ - "issue_date" "g.issue_date" \ - "issued_by" "u.last_name, u.first_names" \ - "recipient" "r.last_name, r.first_names" \ - "amount" "g.amount"] +set order_by_clause [ec_decode $order_by \ + "gift_certificate_id" "g.gift_certificate_id" \ + "issue_date" "g.issue_date" \ + "issued_by" "u.last_name, u.first_names" \ + "recipient" "r.last_name, r.first_names" \ + "amount" "g.amount"] -set table_header " - - - - - - -" +set table_header " +
IDDate IssuedIssued ByRecipientAmount
+ + + + + + + " set row_counter 0 db_foreach gift_certificates_select " -SELECT g.gift_certificate_id, g.issue_date, g.amount, + select g.gift_certificate_id, g.issue_date, g.amount, g.issued_by, u.first_names, u.last_name, g.user_id as issued_to, r.first_names as issued_to_first_names, r.last_name as issued_to_last_name -from ec_gift_certificates_issued g, cc_users u, cc_users r -where g.issued_by=u.user_id and g.user_id=r.user_id -$issue_date_query_bit $rep_query_bit -order by $order_by_clause -" { + from ec_gift_certificates_issued g, cc_users u, cc_users r + where g.issued_by=u.user_id and g.user_id=r.user_id + $issue_date_query_bit $rep_query_bit + order by $order_by_clause" { + if { $row_counter == 0 } { doc_body_append $table_header } @@ -131,13 +131,13 @@ } else { set bgcolor "ececec" } - doc_body_append " - - - - - - " + doc_body_append " + + + + + + " incr row_counter } @@ -147,7 +147,7 @@ doc_body_append "
None Found
" } -doc_body_append " +doc_body_append " + -[ad_admin_footer] -" + [ad_admin_footer]"
IDDate IssuedIssued ByRecipientAmount
$gift_certificate_id[ec_nbsp_if_null [util_AnsiDatetoPrettyDate $issue_date]][ec_decode $last_name "" " " "$last_name, $first_names"][ec_decode $last_name "" " " "$issued_to_last_name, $issued_to_first_names"][ec_pretty_price $amount]
$gift_certificate_id[ec_nbsp_if_null [util_AnsiDatetoPrettyDate $issue_date]][ec_decode $last_name "" " " "$last_name, $first_names"][ec_decode $last_name "" " " "$issued_to_last_name, $issued_to_first_names"][ec_pretty_price $amount]