Index: openacs-4/packages/invoices/lib/projects-billable.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/projects-billable.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/invoices/lib/projects-billable.tcl 26 Oct 2005 06:39:27 -0000 1.5 +++ openacs-4/packages/invoices/lib/projects-billable.tcl 27 Oct 2005 19:33:52 -0000 1.6 @@ -54,7 +54,10 @@ set p_closed_id [pm::project::default_status_closed] set t_closed_id [pm::task::default_status_closed] set currency [iv::price_list::get_currency -organization_id $organization_id] -set contacts_url [apm_package_url_from_key contacts] +set contacts_p [apm_package_installed_p contacts] +if { $contacts_p } { + set contacts_url [apm_package_url_from_key contacts] +} if {$no_actions_p} { set actions "" @@ -82,6 +85,10 @@ label {[_ invoices.iv_invoice_project_title]} display_template {@projects.title@} } + recipient { + label "[_ invoices.iv_invoice_recipient]" + display_template {@projects.recipient;noquote@ } + } description { label {[_ invoices.iv_invoice_project_descr]} } @@ -164,8 +171,15 @@ } -db_multirow -extend {project_link} projects projects_to_bill {} { + +db_multirow -extend {project_link recipient} projects projects_to_bill {} { set project_link [export_vars -base "${pm_base_url}one" {{project_item_id $project_id}}] set amount_open [format "%.2f" $amount_open] set creation_date [lc_time_fmt $creation_date "%q %X"] + + if { $contacts_p } { + set recipient "[contact::name -party_id $recipient_id]" + } else { + set recipient [person::name -person_id $recipient_id] + } }