Index: openacs-4/packages/invoices/www/invoice-send-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-send-1.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/invoices/www/invoice-send-1.tcl 27 Dec 2005 21:51:43 -0000 1.2 +++ openacs-4/packages/invoices/www/invoice-send-1.tcl 4 Jan 2006 08:06:48 -0000 1.3 @@ -17,7 +17,12 @@ set context [list [list [export_vars -base invoice-list {organization_id}] "[_ invoices.iv_invoice_2]"] [list [export_vars -base invoice-ae {invoice_id}] "[_ invoices.iv_invoice_View]"] $page_title] -set rec_organization_id [contact::util::get_employee_organization -employee_id $recipient_id] +if {[person::person_p -party_id $recipient_id]} { + set rec_organization_id [contact::util::get_employee_organization -employee_id $recipient_id] +} else { + set rec_organization_id $recipient_id +} + set rec_orga_revision_id [content::item::get_best_revision -item_id $rec_organization_id] set invoice_copy [ams::value -attribute_name "invoice_copy" -object_id $rec_orga_revision_id] @@ -27,7 +32,7 @@ {invoice_id:key} } -if {$organization_id != $rec_organization_id} { +if {$contact_id != $recipient_id} { ad_form -extend -name invoice_send -form { {opening_p:text(radio) {label "[_ invoices.iv_invoice_opening_p]"} {options $boolean_options}} }