Index: openacs-4/packages/invoices/lib/report-year.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-year.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/lib/report-year.tcl 6 Sep 2005 23:00:14 -0000 1.1 +++ openacs-4/packages/invoices/lib/report-year.tcl 7 Sep 2005 18:28:24 -0000 1.2 @@ -18,12 +18,17 @@ set base_url [apm_package_url_from_id $package_id] } -foreach optional_param {row_list} { +foreach optional_param {row_list organization_id} { if {![info exists $optional_param]} { set $optional_param {} } } +set extra_query "" +if { [empty_string_p $organization_id] } { + set exrta_query "and iv.organization_id = $organization_id" +} + foreach unset_param {new_clients_p account_manager_p} { if {[info exists $unset_param]} { if {[empty_string_p [set $unset_param]]} { @@ -123,6 +128,6 @@ } db_multirow -extend { iv_count iv_total_amount } iv_years iv_invoice_years " " { - set iv_count [db_string get_iv_count { }] - set iv_total_amount [db_string get_iv_total_amount { }] + set iv_count [db_string get_iv_count " "] + set iv_total_amount [db_string get_iv_total_amount " "] } \ No newline at end of file