Index: openacs-4/packages/invoices/lib/invoice-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/invoice-list.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/invoices/lib/invoice-list.tcl 11 Oct 2005 16:15:00 -0000 1.5
+++ openacs-4/packages/invoices/lib/invoice-list.tcl 27 Oct 2005 19:30:16 -0000 1.6
@@ -70,6 +70,10 @@
label {[_ invoices.iv_invoice_paid_amount]}
display_template {@iv_invoice.paid_amount@ @iv_invoice.paid_currency@}
}
+ recipient {
+ label "[_ invoices.iv_invoice_recipient]"
+ display_template "@iv_invoice.recipient;noquote@"
+ }
creation_user {
label {[_ invoices.iv_invoice_creation_user]}
display_template {@iv_invoice.first_names@ @iv_invoice.last_name@}
@@ -157,7 +161,9 @@
}
}
-db_multirow -extend {creator_link edit_link cancel_link delete_link checkbox} iv_invoice iv_invoice {} {
+set contacts_p [apm_package_installed_p contacts]
+
+db_multirow -extend {creator_link edit_link cancel_link delete_link checkbox recipient} iv_invoice iv_invoice {} {
# Ugly hack. We should find out which contact package is linked
set creator_link "/contacts/$creation_user"
set edit_link [export_vars -base "${base_url}invoice-ae" {invoice_id}]
@@ -175,4 +181,9 @@
} else {
set checkbox ""
}
+ if { $contacts_p } {
+ set recipient "[contact::name -party_id $recipient_id]"
+ } else {
+ set recipient [person::name -person_id $recipient_id]
+ }
}