Index: openacs-4/packages/invoices/invoices.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/invoices.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/invoices/invoices.info 6 Sep 2005 22:55:58 -0000 1.3
+++ openacs-4/packages/invoices/invoices.info 8 Sep 2005 18:30:50 -0000 1.4
@@ -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-09-06
+ 2005-06-06
Cognovis
Collect costs to invoice items and invoices, store payment information.
0
-
+
@@ -27,8 +27,8 @@
-
+
Index: openacs-4/packages/invoices/www/invoice-ae.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-ae.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/invoices/www/invoice-ae.xql 6 Sep 2005 23:01:24 -0000 1.2
+++ openacs-4/packages/invoices/www/invoice-ae.xql 8 Sep 2005 18:30:50 -0000 1.3
@@ -62,7 +62,7 @@
select p.first_names || ' ' || p.last_name, p.person_id
- from persons p, pm_projects pj, cr_items i, pm_project_assignment a
+ from persons p, pm_projects pj, cr_items i
where i.item_id in ([join $project_id ,])
and i.latest_revision = pj.project_id
and p.person_id in ( select party_id from pm_project_assignment where project_id in ([join $project_id ,]))
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.1 -r1.2
--- openacs-4/packages/invoices/www/invoice-send.tcl 16 Aug 2005 20:04:34 -0000 1.1
+++ openacs-4/packages/invoices/www/invoice-send.tcl 8 Sep 2005 18:30:50 -0000 1.2
@@ -20,6 +20,14 @@
set invoice_text [iv::invoice::parse_data -invoice_id $invoice_id -recipient_id $recipient_id]
+if {[empty_string_p $file_ids]} {
+ 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 "Invoice $invoice_id"]
+ }
+}
+
if {$total_amount > 0} {
# send invoice
set invoice_text "{[_ invoices.iv_invoice_email]}"
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.2 -r1.3
--- openacs-4/packages/invoices/www/offer-accept-2.tcl 6 Sep 2005 23:01:24 -0000 1.2
+++ openacs-4/packages/invoices/www/offer-accept-2.tcl 8 Sep 2005 18:30:50 -0000 1.3
@@ -27,6 +27,14 @@
set offer_text [iv::offer::parse_data -offer_id $offer_id -recipient_id [lindex $party_ids 0]]
+if {[empty_string_p $file_ids]} {
+ set pdf_file [text_templates::create_pdf_from_html -html_content "$offer_text"]
+ if {![empty_string_p $pdf_file]} {
+ set file_size [file size $pdf_file]
+ set file_ids [cr_import_content -title "Offer $offer_id" -description "PDF version of this offer" $offer_id $pdf_file $file_size application/pdf "Offer $offer_id"]
+ }
+}
+
set offer_text "{[_ invoices.iv_offer_accepted_email]}"
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.1 -r1.2
--- openacs-4/packages/invoices/www/offer-send.tcl 16 Aug 2005 20:04:34 -0000 1.1
+++ openacs-4/packages/invoices/www/offer-send.tcl 8 Sep 2005 18:30:50 -0000 1.2
@@ -27,9 +27,17 @@
set offer_text "{[_ invoices.iv_offer_accepted_email]}"
}
+set pdf_file [text_templates::create_pdf_from_html -html_content "$offer_text"]
+if {![empty_string_p $pdf_file]} {
+ set file_size [file size $pdf_file]
+ set file_ids [cr_import_content -title "Offer $offer_id" -description "PDF version of this offer" $offer_id $pdf_file $file_size application/pdf "Offer $offer_id"]
+} else {
+ set file_ids ""
+}
+
set party_ids [contact::util::get_employees -organization_id $organization_id]
set return_url [export_vars -base offer-list {organization_id}]
-set file_ids [db_string get_files {} -default ""]
+set file_ids [concat $file_ids [db_string get_files {} -default ""]]
set parties_new [list]
foreach party_id $party_ids {