Index: openacs-4/packages/invoices-portlet/lib/projects-billable.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices-portlet/lib/projects-billable.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/invoices-portlet/lib/projects-billable.tcl 24 Oct 2005 20:45:37 -0000 1.3 +++ openacs-4/packages/invoices-portlet/lib/projects-billable.tcl 27 Oct 2005 19:35:38 -0000 1.4 @@ -52,8 +52,12 @@ set date_format [lc_get formbuilder_date_format] set timestamp_format "$date_format [lc_get formbuilder_time_format]" 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] +} + set actions [list "[_ invoices.iv_invoice_New]" "${base_url}invoice-ae" "[_ invoices.iv_invoice_New2]" ] template::list::create \ @@ -77,6 +81,10 @@ description { label {[_ invoices.iv_invoice_project_descr]} } + recipient { + label {[_ invoices.iv_invoice_recipient]} + display_template "@projects.recipient;noquote@" + } amount_open { label {[_ invoices.iv_invoice_amount_open]} display_template {@projects.amount_open@ @currency@} @@ -113,7 +121,14 @@ } -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] + + if { $contacts_p } { + set recipient "[contact::name -party_id $recipient_id]" + } else { + set recipient [person::name -person_id $recipient_id] + } }