Index: openacs-4/packages/invoices/www/invoice-send.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-send.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/invoices/www/invoice-send.adp 31 Dec 2005 07:36:24 -0000 1.4 +++ openacs-4/packages/invoices/www/invoice-send.adp 10 Apr 2006 11:26:01 -0000 1.5 @@ -5,4 +5,5 @@ + export_vars="invoice_id" return_url="@return_url;noquote@" + cancel_url="@cancel_url;noquote@"> 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.16 -r1.17 --- openacs-4/packages/invoices/www/invoice-send.tcl 2 Apr 2006 22:08:02 -0000 1.16 +++ openacs-4/packages/invoices/www/invoice-send.tcl 10 Apr 2006 11:26:01 -0000 1.17 @@ -146,6 +146,8 @@ } +set cancel_url [export_vars -base invoice-list {organization_id}] + if {[empty_string_p $return_url]} { set return_url [export_vars -base invoice-list {organization_id}] } Index: openacs-4/packages/invoices/www/invoices-send.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoices-send.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/invoices/www/invoices-send.adp 31 Dec 2005 07:38:26 -0000 1.2 +++ openacs-4/packages/invoices/www/invoices-send.adp 10 Apr 2006 11:26:01 -0000 1.3 @@ -5,4 +5,5 @@ + export_vars="" return_url="@return_url;noquote@" + cancel_url="@cancel_url;noquote@"> Index: openacs-4/packages/invoices/www/invoices-send.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoices-send.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/invoices/www/invoices-send.tcl 31 Dec 2005 07:38:26 -0000 1.2 +++ openacs-4/packages/invoices/www/invoices-send.tcl 10 Apr 2006 11:26:01 -0000 1.3 @@ -45,6 +45,7 @@ set invoice_text [lang::util::localize "#invoices.iv_invoices_email#" $locale] set subject [lang::util::localize "#invoices.iv_invoices_email_subject#" $locale] set return_url [export_vars -base invoice-list {organization_id}] +set cancel_url [export_vars -base invoice-list {organization_id}] if {[empty_string_p [cc_email_from_party $contact_id]]} { ad_return_error "No Contact" "The contact does not have a valid e-mail address. Please go back and make sure that you provide an e-mail address first." Index: openacs-4/packages/invoices/www/offer-accept-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-accept-2.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/invoices/www/offer-accept-2.adp 20 Mar 2006 12:04:24 -0000 1.7 +++ openacs-4/packages/invoices/www/offer-accept-2.adp 10 Apr 2006 11:26:02 -0000 1.8 @@ -6,4 +6,4 @@ party_ids="@contact_id@" content="@offer_text;noquote@" mime_type="text/html" subject="@subject@" object_id="@project_id@" export_vars="offer_id" return_url="@return_url;noquote@" - cancel_url="@cancel_url@" file_ids="@file_ids@"> + cancel_url="@cancel_url;noquote@" file_ids="@file_ids@"> Index: openacs-4/packages/invoices/www/offer-accept-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-accept-2.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/invoices/www/offer-accept-2.tcl 27 Dec 2005 21:51:43 -0000 1.12 +++ openacs-4/packages/invoices/www/offer-accept-2.tcl 10 Apr 2006 11:26:02 -0000 1.13 @@ -35,6 +35,9 @@ set offer_text [lindex $documents 0] +set invoice_url [site_node::get_package_url -package_key invoices] +set cancel_url [export_vars -base "${invoice_url}offer-ae" {offer_id {mode display} return_url}] + set file_ids {} set document_file [lindex $documents 1] if {![empty_string_p $document_file]} { @@ -45,18 +48,15 @@ # content::item::set_live_revision -revision_id $file_ids db_dml set_publish_status {} - set return_url [export_vars -base offer-pdf {offer_id {file_id $file_ids}}] + set return_url [export_vars -base offer-pdf {offer_id {file_id $file_ids} return_url}] } if {[empty_string_p [cc_email_from_party $contact_id]]} { ad_return_error "No Recipient $contact_id" "The recipient does not have a valid e-mail address. Please go back and make sure that you provide an e-mail address first." } -set cancel_url [export_vars -base offer-list {organization_id}] - if {[empty_string_p $return_url]} { - set invoice_url [site_node::get_package_url -package_key invoices] - set return_url [export_vars -base "${invoice_url}offer-ae" {offer_id {mode display}}] + set return_url $cancel_url } set extra_data [list offer_id $offer_id] set contacts_package_id [apm_package_id_from_key contacts] Index: openacs-4/packages/invoices/www/offer-send.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-send.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/invoices/www/offer-send.adp 20 Mar 2006 12:04:24 -0000 1.4 +++ openacs-4/packages/invoices/www/offer-send.adp 10 Apr 2006 11:26:01 -0000 1.5 @@ -5,4 +5,5 @@ + export_vars="offer_id" return_url="@return_url;noquote@" + object_id="@project_id@" cancel_url="@cancel_url;noquote@"> Index: openacs-4/packages/invoices/www/offer-send.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-send.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/invoices/www/offer-send.tcl 10 Apr 2006 06:21:58 -0000 1.20 +++ openacs-4/packages/invoices/www/offer-send.tcl 10 Apr 2006 11:26:01 -0000 1.21 @@ -47,6 +47,9 @@ set file_title [lang::util::localize "#invoices.file_offer_accepted#_${offer_nr}.pdf" $locale] } +set invoice_url [site_node::get_package_url -package_key invoices] +set cancel_url [export_vars -base "${invoice_url}offer-ae" {offer_id {mode display} return_url}] + # substitute variables in offer text # and return the content of the email plus the file-paths to the document file set documents [iv::offer::parse_data -offer_id $offer_id -type $document_type -email_text $offer_text -accept_link $accept_link]