Index: openacs-4/packages/invoices/www/invoice-credit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-credit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/invoices/www/invoice-credit.tcl 26 Oct 2005 12:00:38 -0000 1.3 +++ openacs-4/packages/invoices/www/invoice-credit.tcl 3 Jan 2006 12:55:57 -0000 1.4 @@ -5,7 +5,7 @@ @creation-date 2005-06-06 } { invoice_id:integer,optional - {organization_id:integer,optional ""} + organization_id:integer {__new_p 0} } -properties { context:onevalue @@ -28,9 +28,15 @@ set language [lang::conn::language] set currency_options [db_list_of_lists currencies {}] -set recipient_options [db_list_of_lists credit_recipients {}] +# Get the list of valid recipients. These are employees of the organization +set recipient_list [contact::util::get_employees -organization_id $organization_id] +set recipient_options [list] +foreach recipient_id $recipient_list { + lappend recipient_options [list [person::name -person_id $recipient_id] $recipient_id] +} + ad_form -name iv_invoice_credit_form -action invoice-credit -export {organization_id} -form { {invoice_id:key} {organization_name:text(inform) {label "[_ invoices.iv_invoice_organization]"} {value $organization_name} {help_text "[_ invoices.iv_invoice_organization_help]"}}