Index: openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml,v diff -u -r1.26 -r1.27 --- openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml 24 Jan 2006 17:02:24 -0000 1.26 +++ openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml 29 Jan 2006 14:21:57 -0000 1.27 @@ -171,6 +171,7 @@ Pay invoices Payment after .. days Days until the recipient until should have paid. + Print Description Project ID Title Index: openacs-4/packages/invoices/lib/offer-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/offer-list.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/invoices/lib/offer-list.tcl 31 Dec 2005 07:36:24 -0000 1.9 +++ openacs-4/packages/invoices/lib/offer-list.tcl 29 Jan 2006 14:21:57 -0000 1.10 @@ -47,14 +47,13 @@ append row_list "$element {}\n" } +set pm_base_url "" if {[exists_and_not_null organization_id]} { set dotlrn_club_id [lindex [application_data_link::get_linked -from_object_id $organization_id -to_object_type "dotlrn_club"] 0] if {$dotlrn_club_id > 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]] } -} else { - set pm_base_url "" } #set package_id [ad_conn package_id] 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.10 -r1.11 --- openacs-4/packages/invoices/lib/projects-billable.tcl 2 Dec 2005 14:27:37 -0000 1.10 +++ openacs-4/packages/invoices/lib/projects-billable.tcl 29 Jan 2006 14:21:57 -0000 1.11 @@ -118,7 +118,12 @@ type multivar values { {[_ invoices.Customer] { {groupby name } {orderby project_id,asc }}}} } -orderby { - default_value project_id + default_value name + name { + label {[_ invoices.Customer]} + orderby {name} + default_direction asc + } project_id { label {[_ invoices.iv_invoice_project_id]} orderby {r.item_id} Index: openacs-4/packages/invoices/tcl/invoice-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/invoice-procs.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/invoices/tcl/invoice-procs.xql 29 Jan 2006 11:06:17 -0000 1.8 +++ openacs-4/packages/invoices/tcl/invoice-procs.xql 29 Jan 2006 14:21:58 -0000 1.9 @@ -68,7 +68,7 @@ o.creation_user, p.first_names, p.last_name, t.amount_sum, to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date, to_char(t.due_date, 'YYYY-MM-DD HH24:MI:SS') as invoice_date, - to_char(t.due_date + cast((to_string(t.payment_days) || ' days' as interval), 'YYYY-MM-DD HH24:MI:SS') as due_date, + to_char(t.due_date + cast(t.payment_days || ' days' as interval), 'YYYY-MM-DD HH24:MI:SS') as due_date, t.payment_days, t.currency, t.organization_id, t.recipient_id, t.contact_id from iv_invoices t, cr_revisions r, cr_items i, acs_objects o, Index: openacs-4/packages/invoices/www/invoice-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-ae.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/invoices/www/invoice-ae.tcl 10 Jan 2006 11:22:18 -0000 1.21 +++ openacs-4/packages/invoices/www/invoice-ae.tcl 29 Jan 2006 14:21:58 -0000 1.22 @@ -111,6 +111,7 @@ ad_script_abort } + set organization_name [organizations::name -organization_id $organization_id] # If the contacts package is installed we can get the incoice specialities. @@ -317,6 +318,9 @@ ad_form -extend -name iv_invoice_form -form { {send:text(submit) {label "[_ invoices.iv_invoice_send]"} {value t}} } + ad_form -extend -name iv_invoice_form -form { + {print:text(submit) {label "[_ invoices.iv_invoice_print]"} {value t}} + } } Index: openacs-4/packages/invoices/www/invoice-pdf.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-pdf.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/invoices/www/invoice-pdf.tcl 4 Jan 2006 08:06:48 -0000 1.5 +++ openacs-4/packages/invoices/www/invoice-pdf.tcl 29 Jan 2006 14:21:58 -0000 1.6 @@ -25,8 +25,7 @@ db_transaction { # move files to invoice_folder foreach one_file $file_id { - set file_item_id [content::revision::item_id -revision_id $one_file] - content::item::move -item_id $file_item_id -target_folder_id $invoice_folder_id + content::item::move -item_id $one_file -target_folder_id $invoice_folder_id db_dml set_publish_status {} db_dml set_context_id {} application_data_link::new -this_object_id $invoice_id -target_object_id $one_file