Index: openacs-4/packages/invoices/lib/offer-items-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/offer-items-list.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/invoices/lib/offer-items-list.tcl 7 Nov 2005 23:10:51 -0000 1.4
+++ openacs-4/packages/invoices/lib/offer-items-list.tcl 9 Nov 2005 19:28:55 -0000 1.5
@@ -130,11 +130,13 @@
}
if { [exists_and_not_null category_id] } {
- if { [string equal $c_id $category_id] } {
- append aggregate_amount "
$c_name: | "
- append aggregate_amount "$total_amount | "
- append aggregate_amount "
"
- }
+ foreach cat_id $category_id {
+ if { [string equal $c_id $cat_id] } {
+ append aggregate_amount "$c_name: | "
+ append aggregate_amount "$total_amount | "
+ append aggregate_amount "
"
+ }
+ }
} else {
append aggregate_amount "$c_name: | "
append aggregate_amount "$total_amount | "
@@ -160,11 +162,17 @@
creation_date [list label "[_ invoices.Creation_Date]"] \
month [list label ""]
+set cat_where_clause ""
+if { [exists_and_not_null category_id] } {
+ set cat_where_clause "com.category_id in ([template::util::tcl_to_sql_list $category_id])"
+}
+
set filters [list \
category_id {
label "[_ invoices.Category]"
values $categories_filter
- where_clause { com.category_id = :category_id }
+ type multival
+ where_clause { $cat_where_clause }
} \
filter_package_id {
where_clause { oi.object_package_id = :filter_package_id }