Index: openacs-4/packages/invoices/www/invoice-send.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-send.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/invoices/www/invoice-send.tcl 28 Sep 2005 17:19:12 -0000 1.3
+++ openacs-4/packages/invoices/www/invoice-send.tcl 5 Oct 2005 12:08:24 -0000 1.4
@@ -24,7 +24,11 @@
set pdf_file [text_templates::create_pdf_from_html -html_content "$invoice_text"]
if {![empty_string_p $pdf_file]} {
set file_size [file size $pdf_file]
- set file_ids [cr_import_content -title "Invoice $invoice_id" -description "PDF version of this offer" $invoice_id $pdf_file $file_size application/pdf "[clock seconds]-[expr round([ns_rand]*100000)]"]
+ set root_folder_id [lindex [application_data_link::get_linked -from_object_id $organization_id -to_object_type content_folder] 0]
+ set invoice_folder_id [lindex [application_data_link::get_linked -from_object_id $root_folder_id -to_object_type content_folder] 0]
+
+ set file_ids [cr_import_content -title "Invoice $invoice_id" -description "PDF version of this offer" $invoice_folder_id $pdf_file $file_size application/pdf "[clock seconds]-[expr round([ns_rand]*100000)]"]
+ application_data_link::new -this_object_id $invoice_id -target_object_id $file_ids
}
}