Index: openacs-4/packages/ecommerce/www/admin/customer-service/interactions-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interactions-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interactions-oracle.xql 30 Aug 2001 06:21:40 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select unique interaction_originator from ec_customer_serv_interactions
+
+
+
+
+
+
+
+
+ select i.interaction_id, i.customer_service_rep, i.interaction_date, to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date, i.interaction_originator, i.interaction_type, i.user_identification_id, reps.first_names as rep_first_names, reps.last_name as rep_last_name, customer_info.user_identification_id,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names, customer_info.last_name as customer_last_name
+ from ec_customer_serv_interactions i, cc_users reps,
+ (select id.user_identification_id, id.user_id, u2.first_names, u2.last_name from ec_user_identification id, cc_users u2 where id.user_id=u2.user_id(+)) customer_info where i.customer_service_rep=reps.user_id(+)
+ and i.user_identification_id=customer_info.user_identification_id
+ $rep_query_bit $interaction_originator_query_bit $interaction_type_query_bit $interaction_date_query_bit order by $order_by
+
+
+
+
+
+
Index: openacs-4/packages/ecommerce/www/admin/customer-service/interactions-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interactions-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interactions-postgresql.xql 30 Aug 2001 06:21:40 -0000 1.1
@@ -0,0 +1,39 @@
+
+
+
+ postgresql7.1
+
+
+
+
+ select distinct interaction_originator from ec_customer_serv_interactions
+
+
+
+
+
+
+
+
+ select i.interaction_id, i.customer_service_rep, i.interaction_date,
+ to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date, i.interaction_originator,
+ i.interaction_type, i.user_identification_id, reps.first_names as rep_first_names,
+ reps.last_name as rep_last_name, customer_info.user_identification_id,
+ customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names,
+ customer_info.last_name as customer_last_name
+ from ec_customer_serv_interactions i
+ LEFT JOIN cc_users reps on (i.customer_service_rep=reps.user_id),
+ (select id.user_identification_id, id.user_id, u2.first_names,
+ u2.last_name
+ from ec_user_identification id
+ LEFT JOIN cc_users u2 on (id.user_id=u2.user_id))
+ as customer_info
+ where i.user_identification_id=customer_info.user_identification_id
+ $rep_query_bit $interaction_originator_query_bit $interaction_type_query_bit $interaction_date_query_bit
+ order by $order_by
+
+
+
+
+
+
Index: openacs-4/packages/ecommerce/www/admin/customer-service/interactions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interactions.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ecommerce/www/admin/customer-service/interactions.tcl 20 Apr 2001 20:51:14 -0000 1.1
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interactions.tcl 30 Aug 2001 06:21:40 -0000 1.2
@@ -59,10 +59,10 @@
"
+set sql [db_map get_rep_info_by_rep_sql]
+#set sql "select i.customer_service_rep as rep, u.first_names as rep_first_names, u.last_name as rep_last_name from ec_customer_serv_interactions i, cc_users u where i.customer_service_rep=u.user_id
+#group by i.customer_service_rep, u.first_names, u.last_name order by u.last_name, u.first_names"
-set sql "select i.customer_service_rep as rep, u.first_names as rep_first_names, u.last_name as rep_last_name from ec_customer_serv_interactions i, cc_users u where i.customer_service_rep=u.user_id
-group by i.customer_service_rep, u.first_names, u.last_name order by u.last_name, u.first_names"
-
db_foreach get_rep_info_by_rep $sql {
if { $view_rep == $rep } {
@@ -173,19 +173,21 @@
Type |
"
-set sql "select i.interaction_id, i.customer_service_rep, i.interaction_date,
-to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date, i.interaction_originator,
-i.interaction_type, i.user_identification_id, reps.first_names as rep_first_names,
-reps.last_name as rep_last_name, customer_info.user_identification_id,
-customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names,
-customer_info.last_name as customer_last_name
-from ec_customer_serv_interactions i, cc_users reps,
-(select id.user_identification_id, id.user_id, u2.first_names, u2.last_name from ec_user_identification id, cc_users u2 where id.user_id=u2.user_id(+)) customer_info
-where i.customer_service_rep=reps.user_id(+)
-and i.user_identification_id=customer_info.user_identification_id
-$rep_query_bit $interaction_originator_query_bit $interaction_type_query_bit $interaction_date_query_bit
-order by $order_by"
+#set sql "select i.interaction_id, i.customer_service_rep, i.interaction_date,
+#to_char(i.interaction_date,'YYYY-MM-DD HH24:MI:SS') as full_interaction_date, i.interaction_originator,
+#i.interaction_type, i.user_identification_id, reps.first_names as rep_first_names,
+#reps.last_name as rep_last_name, customer_info.user_identification_id,
+#customer_info.user_id as customer_user_id, customer_info.first_names as customer_first_names,
+#customer_info.last_name as customer_last_name
+#from ec_customer_serv_interactions i, cc_users reps,
+#(select id.user_identification_id, id.user_id, u2.first_names, u2.last_name from ec_user_identification id, cc_users u2 where id.user_id=u2.user_id(+)) customer_info
+#where i.customer_service_rep=reps.user_id(+)
+#and i.user_identification_id=customer_info.user_identification_id
+#$rep_query_bit $interaction_originator_query_bit $interaction_type_query_bit $interaction_date_query_bit
+#order by $order_by"
+set sql [db_map get_customer_interaction_detail_sql]
+
set row_counter 0
db_foreach get_customer_interaction_detail $sql {
Index: openacs-4/packages/ecommerce/www/admin/customer-service/interactions.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/customer-service/interactions.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ecommerce/www/admin/customer-service/interactions.xql 10 Jul 2001 20:33:53 -0000 1.1
+++ openacs-4/packages/ecommerce/www/admin/customer-service/interactions.xql 30 Aug 2001 06:21:40 -0000 1.2
@@ -1,16 +1,23 @@
-
+
- select unique interaction_originator from ec_customer_serv_interactions
+ select picklist_item from ec_picklist_items where picklist_name='interaction_type' order by sort_key
-
-
+
+
- select picklist_item from ec_picklist_items where picklist_name='interaction_type' order by sort_key
+
+ select i.customer_service_rep as rep, u.first_names as rep_first_names,
+ u.last_name as rep_last_name
+ from ec_customer_serv_interactions i, cc_users u
+ where i.customer_service_rep=u.user_id
+ group by i.customer_service_rep, u.first_names, u.last_name
+ order by u.last_name, u.first_names
+