Index: openacs-4/packages/invoices/invoices.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/invoices.info,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/invoices.info 16 Aug 2005 20:04:30 -0000 1.1 +++ openacs-4/packages/invoices/invoices.info 2 Sep 2005 16:09:06 -0000 1.2 @@ -7,15 +7,15 @@ f t - + Timo Hentschel Invoices package that will collect costs to invoice items in invoices and store data about received payment. - 2005-06-06 + 2005-09-02 Cognovis Collect costs to invoice items and invoices, store payment information. 0 - + @@ -27,11 +27,12 @@ - + + Index: openacs-4/packages/invoices/tcl/invoice-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/invoice-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/tcl/invoice-procs.tcl 16 Aug 2005 20:04:32 -0000 1.1 +++ openacs-4/packages/invoices/tcl/invoice-procs.tcl 2 Sep 2005 16:10:00 -0000 1.2 @@ -192,15 +192,19 @@ set category [lang::util::localize [category::get_name $category_id]] } - set file [open "/web/document.html"] - fconfigure $file -translation binary - set content [read $file] + set file_url [parameter::get -parameter MailSendBoxFileP] + if {![empty_string_p $file_url]} { + set file [open $file_url] + fconfigure $file -translation binary + set content [read $file] + + # parse template and replace placeholders + eval [template::adp_compile -string $content] + set final_content $__adp_output + } else { + set final_content "" + } - - # parse template and replace placeholders - eval [template::adp_compile -string $content] - set final_content $__adp_output - return $final_content } Index: openacs-4/packages/invoices/tcl/iv-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/iv-install-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/tcl/iv-install-procs.tcl 16 Aug 2005 20:04:32 -0000 1.1 +++ openacs-4/packages/invoices/tcl/iv-install-procs.tcl 2 Sep 2005 16:08:51 -0000 1.2 @@ -211,6 +211,9 @@ content::type::attribute::new -content_type {iv_offer} -attribute_name {comment} -datatype {text} -pretty_name {[_ invoices.Comment]} -column_spec {text} content::type::attribute::new -content_type {iv_offer_item} -attribute_name {comment} -datatype {text} -pretty_name {[_ invoices.Comment]} -column_spec {text} } + 0.01d7 0.01d8 { + apm_parameter_register "MailSendBoxFileP" "Location of the file for prefilling the mail send box." "invoices" "" "string" + } } } Index: openacs-4/packages/invoices/tcl/offer-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/offer-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/tcl/offer-procs.tcl 16 Aug 2005 20:04:32 -0000 1.1 +++ openacs-4/packages/invoices/tcl/offer-procs.tcl 2 Sep 2005 16:10:00 -0000 1.2 @@ -183,15 +183,20 @@ set category [lang::util::localize [category::get_name $category_id]] } - set file [open "/web/document.html"] - fconfigure $file -translation binary - set content [read $file] + set file_url [parameter::get -parameter MailSendBoxFileP] + if { ![empty_string_p $file_url] } { + set file [open "$file_url"] + fconfigure $file -translation binary + set content [read $file] + + + # parse template and replace placeholders + eval [template::adp_compile -string $content] + set final_content $__adp_output + } else { + set final_content "" + } - - # parse template and replace placeholders - eval [template::adp_compile -string $content] - set final_content $__adp_output - return $final_content }