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.2 -r1.3 --- openacs-4/packages/invoices/lib/invoice-list.tcl 6 Sep 2005 22:59:40 -0000 1.2 +++ openacs-4/packages/invoices/lib/invoice-list.tcl 8 Sep 2005 20:45:06 -0000 1.3 @@ -26,13 +26,14 @@ set dotlrn_club_id [lindex [application_data_link::get_linked -from_object_id $organization_id -to_object_type "dotlrn_club"] 0] set pm_base_url [apm_package_url_from_id [dotlrn_community::get_package_id_from_package_key -package_key "project-manager" -community_id $dotlrn_club_id]] - #set package_id [ad_conn package_id] set date_format [lc_get formbuilder_date_format] set timestamp_format "$date_format [lc_get formbuilder_time_format]" +set actions [list] +if { ![empty_string_p $organization_id] } { + set actions [list "[_ invoices.iv_invoice_New]" [export_vars -base invoice-add {organization_id}] "[_ invoices.iv_invoice_New2]" "[_ invoices.iv_invoice_credit_New]" [export_vars -base invoice-credit {organization_id}] "[_ invoices.iv_invoice_credit_New2]" "[_ invoices.iv_offer_2]" [export_vars -base offer-list {organization_id}] "[_ invoices.iv_offer_2]" "[_ invoices.projects]" $pm_base_url "[_ invoices.projects]" "[_ invoices.iv_reports]" [export_vars -base invoice-reports {organization_id}]] +} -set actions [list "[_ invoices.iv_invoice_New]" [export_vars -base invoice-add {organization_id}] "[_ invoices.iv_invoice_New2]" "[_ invoices.iv_invoice_credit_New]" [export_vars -base invoice-credit {organization_id}] "[_ invoices.iv_invoice_credit_New2]" "[_ invoices.iv_offer_2]" [export_vars -base offer-list {organization_id}] "[_ invoices.iv_offer_2]" "[_ invoices.projects]" $pm_base_url "[_ invoices.projects]" "[_ invoices.iv_reports]" [export_vars -base invoice-reports {organization_id}]] - template::list::create \ -name iv_invoice \ -key invoice_id \ @@ -68,7 +69,7 @@ label {[_ invoices.iv_invoice_due_date]} } action { - display_template {#invoices.Edit# #invoices.Cancel# #invoices.Delete#} + display_template {#invoices.Edit# #invoices.Cancel# #invoices.Delete#} } } -actions $actions -sub_class narrow \ -orderby { @@ -138,7 +139,6 @@ } } - db_multirow -extend {creator_link edit_link cancel_link delete_link} iv_invoice iv_invoice {} { # Ugly hack. We should find out which contact package is linked set creator_link "/contacts/$creation_user" Index: openacs-4/packages/invoices/lib/invoice-list.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/invoice-list.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/lib/invoice-list.xql 16 Aug 2005 20:04:31 -0000 1.1 +++ openacs-4/packages/invoices/lib/invoice-list.xql 8 Sep 2005 20:45:06 -0000 1.2 @@ -14,7 +14,6 @@ acs_objects o, persons p where cr.revision_id = ci.latest_revision and t.invoice_id = cr.revision_id - and t.organization_id = :organization_id and ci.parent_id = cf.folder_id and cf.package_id = :package_id and o.object_id = t.invoice_id