Timo Hentschel
Invoices package that will collect costs to invoice items in invoices and store data about received payment.
2005-11-15
Cognovis
Collect costs to invoice items and invoices, store payment information.
0
-
+
@@ -38,6 +38,7 @@
+
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.14 -r1.15
--- openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl 2 Apr 2006 22:08:02 -0000 1.14
+++ openacs-4/packages/invoices/tcl/invoices-callback-procs.tcl 7 Apr 2006 13:46:37 -0000 1.15
@@ -150,6 +150,7 @@
ad_proc -public -callback iv::offer_accepted {
{-offer_id:required}
+ {-comment:required}
} {
}
Index: openacs-4/packages/invoices/www/invoice-delete.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-delete.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/invoices/www/invoice-delete.adp 16 Aug 2005 20:04:34 -0000 1.1
+++ openacs-4/packages/invoices/www/invoice-delete.adp 7 Apr 2006 13:46:37 -0000 1.2
@@ -5,4 +5,3 @@
-
Index: openacs-4/packages/invoices/www/offer-accepted.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-accepted.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/invoices/www/offer-accepted.adp 1 Oct 2005 11:06:16 -0000 1.1
+++ openacs-4/packages/invoices/www/offer-accepted.adp 7 Apr 2006 13:46:37 -0000 1.2
@@ -1,5 +1,20 @@
+
+ #invoices.offer_accept#
+
+
+
+
+
-#invoices.iv_offer_accepted_thanks#
+
+
+
+
+
+ #invoices.iv_offer_accepted_thanks#
+
+
+
Index: openacs-4/packages/invoices/www/offer-accepted.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-accepted.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/invoices/www/offer-accepted.tcl 1 Oct 2005 11:06:16 -0000 1.1
+++ openacs-4/packages/invoices/www/offer-accepted.tcl 7 Apr 2006 13:46:37 -0000 1.2
@@ -5,6 +5,9 @@
x:notnull
}
+# Retrieving the value of the parameter to know wich include to call
+set template_src [parameter::get -parameter "OfferAccept"]
+
if {![db_0or1row check_offer_id {}]} {
ad_return_complaint 1 "This is not the latest offer."
return
@@ -19,16 +22,12 @@
return
}
-set package_id [ad_conn package_id]
+set page_title "[_ invoices.offer_accept]"
-if {$valid_x_p} {
+if {$valid_x_p && [empty_string_p $template_src]} {
db_transaction {
iv::offer::accept -offer_id $offer_id
callback iv::offer_accept -offer_id $offer_id
- callback iv::offer_accepted -offer_id $offer_id
+ callback iv::offer_accepted -offer_id $offer_id -comment ""
}
-} else {
- ns_log notice "Invalid secret key when accepting offer $offer_id"
}
-
-ad_return_template
Index: openacs-4/packages/invoices/www/offer-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-ae.tcl,v
diff -u -r1.22 -r1.23
--- openacs-4/packages/invoices/www/offer-ae.tcl 2 Apr 2006 22:08:02 -0000 1.22
+++ openacs-4/packages/invoices/www/offer-ae.tcl 7 Apr 2006 13:46:37 -0000 1.23
@@ -854,7 +854,6 @@
}
}
- set return_url ""
if {[empty_string_p $return_url]} {
ad_returnredirect [export_vars -base offer-ae {offer_id {mode display}}]
ad_script_abort
Index: openacs-4/packages/invoices/www/offer-pdf.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-pdf.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/invoices/www/offer-pdf.tcl 10 Mar 2006 19:28:42 -0000 1.6
+++ openacs-4/packages/invoices/www/offer-pdf.tcl 7 Apr 2006 13:46:37 -0000 1.7
@@ -7,6 +7,7 @@
} {
offer_id:integer
file_id:integer
+ {return_url ""}
}
set user_id [auth::require_login]
@@ -16,9 +17,11 @@
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}}]
+ if {[empty_string_p $return_url]} {
+ set return_url [export_vars -base "${pm_url}one" {{project_item_id $project_id}}]
+ }
db_1row project_data {}
-} else {
+} elseif {[empty_string_p $return_url]} {
set return_url [export_vars -base offer-list {organization_id}]
}
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.18 -r1.19
--- openacs-4/packages/invoices/www/offer-send.tcl 20 Mar 2006 12:04:24 -0000 1.18
+++ openacs-4/packages/invoices/www/offer-send.tcl 7 Apr 2006 13:46:37 -0000 1.19
@@ -65,9 +65,7 @@
}
if {[llength $file_ids] > 0} {
- set return_url [export_vars -base offer-pdf {offer_id {file_id $file_ids}}]
-} else {
- set return_url ""
+ set return_url [export_vars -base offer-pdf {offer_id {file_id $file_ids} return_url}]
}
set project_id [lindex [application_data_link::get_linked -from_object_id $offer_id -to_object_type content_item] 0]