Index: openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl 28 Sep 2005 19:08:28 -0000 1.4
+++ openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl 5 Oct 2005 16:17:57 -0000 1.5
@@ -105,7 +105,7 @@
if {![empty_string_p $offer_id]} {
# link to linked offer
- append project_links "
[_ invoices.iv_offer_View]"
+ # append project_links " [_ invoices.iv_offer_View]"
} else {
# link to offer-list
db_1row get_project_organization {
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.4 -r1.5
--- openacs-4/packages/invoices/www/invoice-send.tcl 5 Oct 2005 12:08:24 -0000 1.4
+++ openacs-4/packages/invoices/www/invoice-send.tcl 5 Oct 2005 16:17:57 -0000 1.5
@@ -43,8 +43,8 @@
set invoice_text "{[_ invoices.iv_invoice_cancel_email]}"
}
-set party_ids [contact::util::get_employees -organization_id $organization_id]
set return_url [export_vars -base invoice-list {organization_id}]
+set party_ids [contact::util::get_employees -organization_id $organization_id]
set parties_new [list]
foreach party_id $party_ids {
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.4 -r1.5
--- openacs-4/packages/invoices/www/offer-send.tcl 1 Oct 2005 11:05:05 -0000 1.4
+++ openacs-4/packages/invoices/www/offer-send.tcl 5 Oct 2005 16:17:57 -0000 1.5
@@ -20,6 +20,7 @@
set offer_text [iv::offer::text -offer_id $offer_id]
set x [iv::util::get_x_field -offer_id $offer_rev_id]
set accept_link [export_vars -base "[ad_url][ad_conn package_url]offer-accepted" {x {offer_id $offer_rev_id}}]
+content::item::set_live_revision -revision_id $offer_rev_id
if {[empty_string_p $accepted_date]} {
# send pending offer
@@ -37,8 +38,16 @@
set file_ids ""
}
+set project_id [lindex [application_data_link::get_linked -from_object_id $offer_id -to_object_type content_item] 0]
+if {![empty_string_p $project_id]} {
+ acs_object::get -object_id $project_id -array project
+ set pm_url [lindex [site_node::get_url_from_object_id -object_id $project(package_id)] 0]
+ set return_url [export_vars -base "${pm_url}one" {{project_item_id $project_id}}]
+} else {
+ set return_url [export_vars -base offer-list {organization_id}]
+}
+
set party_ids [contact::util::get_employees -organization_id $organization_id]
-set return_url [export_vars -base offer-list {organization_id}]
set file_ids [concat $file_ids [db_string get_files {} -default ""]]
set parties_new [list]
foreach party_id $party_ids {
Index: openacs-4/packages/invoices/www/offer-send.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-send.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/invoices/www/offer-send.xql 1 Oct 2005 11:05:05 -0000 1.2
+++ openacs-4/packages/invoices/www/offer-send.xql 5 Oct 2005 16:17:57 -0000 1.3
@@ -4,7 +4,7 @@
- select o.offer_nr, o.organization_id, o.accepted_date, oi.live_revision as offer_rev_id
+ select o.offer_nr, o.organization_id, o.accepted_date, oi.latest_revision as offer_rev_id
from iv_offers o, cr_items oi
where oi.latest_revision = o.offer_id
and oi.item_id = :offer_id