Index: openacs-4/packages/invoices/invoices.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/invoices.info,v
diff -u -r1.30 -r1.31
--- openacs-4/packages/invoices/invoices.info 10 Aug 2006 07:34:59 -0000 1.30
+++ openacs-4/packages/invoices/invoices.info 24 Aug 2006 09:18:13 -0000 1.31
@@ -7,15 +7,15 @@
ft
-
+ Timo HentschelInvoices package that will collect costs to invoice items in invoices and store data about received payment.2005-11-15CognovisCollect costs to invoice items and invoices, store payment information.0
-
+
Index: openacs-4/packages/invoices/catalog/invoices.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/catalog/invoices.de_DE.ISO-8859-1.xml,v
diff -u -r1.42 -r1.43
--- openacs-4/packages/invoices/catalog/invoices.de_DE.ISO-8859-1.xml 10 Aug 2006 07:34:59 -0000 1.42
+++ openacs-4/packages/invoices/catalog/invoices.de_DE.ISO-8859-1.xml 24 Aug 2006 09:18:14 -0000 1.43
@@ -144,7 +144,6 @@
<html><body><h3>Stornorechnung</h3>%data.contact_salutation%,<p>anbei finden Sie die Stornorechnung %data.invoice_nr%.<p>Mit freundlichen Grüßen<br>WIENERS + WIENERS GmbH<br></html></body>Stornorechnung # %invoice_nr%Storno durch
- StorniertStorno f�rbeendet amKundenkontakt
@@ -155,15 +154,13 @@
erstellt amDatum an dem die Rechnung angelegt wurdeerstellt von
- Ersteller der RechnungGutschriftGutschrift erstellen<html><body><h3>Gutschrift</h3>%data.contact_salutation%,<p>anbei finden Sie die Rechnungsgutschrift %data.invoice_nr%.<p>Mit freundlichen Grüßen<br>WIENERS + WIENERS GmbH<br></html></body>Gutschrift # %invoice_nr%Neue GutschriftNeue Gutschrift erstellenW�hrung
- W�hrung der RechnungRechnung l�schenBeschreibungBeschreibung auf der Rechnung
@@ -297,7 +294,6 @@
Zum L�schen von Dateien die entsprechende Checkbox markieren.Dateien zur internen Verwendung - diese werden nicht mit dem Angebot verschickt!Dateien
- Angebotsdatei ansehenLieferdatumAbgabetermin, zu dem das Projekt an den Kunden ausgeliefert werden mussTiming Uhrzeit
@@ -417,7 +413,6 @@
Letztes JahrAnwendungen verlinkenIn der URL ist leider die Angebotsnummer nicht enthalten. M�glicherweise hat Ihr E-Mail-Programm beim Anklicken des Links nicht die gesamte URL �bergeben - einige E-Mail-Programme umbrechen die URLs, dann geht beim Klick auf den Link die zweite Zeile verloren. In diesem Fall bitte den zweiten Teil der URL einfach kopieren und im Browser an den ersten Teil anh�ngen. Vielen Dank!
- Leider konnten wir keine Organisation als Rechnungsempf�nger finden. Bitte stellen Sie sicher, das der Rechnungsempf�nger als Angestellter einer Firma im System hinterlegt ist (�ber eine employment_relationship)Leider k�nnen wir die von Ihnen angeforderte Rechnungsnummer nicht in unserem System finden. Bitte �berpr�fen Sie ob die Nummer richtig ist.VerbundenDie Stapelverarbeitung der Rechungen ist abschlossen. <p> %failed_projects_html%
@@ -431,7 +426,6 @@
NeuNeue KundenNein
- Keine Organisation f�r die Rechnung gefunden.Unbekannte RechnungsnummerKeineAnzahl Stunden
@@ -470,6 +464,7 @@
Empf�ngerKundentypNeukunden
+ Report der ProjekteAlle ProjekteAlle AngeboteZeige alle Angebote
Index: openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml,v
diff -u -r1.44 -r1.45
--- openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml 10 Aug 2006 07:34:59 -0000 1.44
+++ openacs-4/packages/invoices/catalog/invoices.en_US.ISO-8859-1.xml 24 Aug 2006 09:18:14 -0000 1.45
@@ -414,7 +414,6 @@
Last YearsLink package instancesSorry, the offer_id cannot be found on the URL. It is possible that when you left clicked, your email program did not transfer the whole URL - some email programs break up the URLs, which means the second part is lost when you left click. If this is the case, please just copy the second part of the URL and attach it to the first part in the browser. Thank you!
- Sadly we were not able to find an organization where to send the invoice to. Please make sure that the invoice recipient is working at an organization and has an employment_relationship.We are sorry but the invoice number you are searching for does not exist in our system.MappedThe mass generation of invoices is finished.<p> %failed_projects_html%
@@ -428,7 +427,6 @@
NewNew ClientsNo
- No organization for invoice foundNo such invoice numberNoneNumber of units
@@ -467,6 +465,7 @@
RecipientCustomer typeNew customer
+ Report of projectsAll projectsAll OffersShow all offers
Index: openacs-4/packages/invoices/lib/report-projects-offers.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-projects-offers.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/invoices/lib/report-projects-offers.adp 24 Aug 2006 09:18:14 -0000 1.1
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
Index: openacs-4/packages/invoices/lib/report-projects-offers.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-projects-offers.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/invoices/lib/report-projects-offers.tcl 24 Aug 2006 09:18:14 -0000 1.1
@@ -0,0 +1,94 @@
+# author Nils Lohse (nils.lohse@cognovis.de)
+# creation-date 2006-08-21
+# creation-date 2006-08-22
+
+
+# if { [exists_and_not_null orderby] }
+
+set today [clock format [clock seconds] -format "%Y-%m-%d"]
+
+if { [exists_and_not_null start_date] } {
+ if {[string equal $start_date "YYYY-MM-DD"]} {
+ set date_range_start $today
+ } else {
+ set date_range_start $start_date
+ }
+} else {
+ set date_range_start $today
+}
+
+if { [exists_and_not_null end_date] } {
+ if {[string equal $end_date "YYYY-MM-DD"]} {
+ #set date_range_end $today
+ unset -nocomplain date_range_end
+ } else {
+ set date_range_end $end_date
+ }
+} else {
+ #set date_range_end $today
+}
+
+set date_range_clause ""
+
+if { [exists_and_not_null date_range_start] } {
+ set date_range 1
+ catch { set date_range_start [lc_time_fmt $date_range_start %y-%m-%d] } errMsg
+ append date_range_clause " and to_char(p.latest_finish_date,'yy-mm-dd') >= :date_range_start"
+}
+
+if { [exists_and_not_null date_range_end] } {
+ set date_range 1
+ catch { set date_range_end [lc_time_fmt $date_range_end %y-%m-%d] } errMsg
+ append date_range_clause " and to_char(p.latest_finish_date,'yy-mm-dd') <= :date_range_end"
+}
+
+template::list::create \
+ -name report \
+ -multirow report \
+ -elements {
+ title {
+ label {[_ invoices.iv_offer_project]}
+ csv_col title
+ }
+ customer_name {
+ label {[_ invoices.Customer]}
+ csv_col customer_name
+ }
+ prj_sum {
+ label {[_ invoices.Amount_total]}
+ csv_col prj_sum
+ }
+ } -formats {
+ normal {
+ label "[_ logger.Table]"
+ layout table
+ }
+ csv {
+ label "[_ logger.CSV]"
+ output csv
+ page_size 0
+ }
+ } -filters {
+ start_date {}
+ end_date {}
+ }
+
+db_multirow -extend {prj_sum customer_url} report main_projects {} {
+ # was copy&paste (2006/08/22) set customer_url "${contacts_url}$customer_id"
+ set allsubs [pm::project::get_all_subprojects -project_item_id $item_id]
+ set prj_sum $allsubs
+ set prj_and_subs [linsert $allsubs 0 $item_id]
+ set total_sum 0
+ foreach project_item_id $prj_and_subs {
+ db_foreach get_project_amount_values {} {
+ set total_sum [expr $total_sum + $amount_total]
+ }
+ }
+ set prj_sum [lc_numeric $total_sum]
+}
+
+# This spits out the CSV if we happen to be in CSV layout
+if {$format eq "csv"} {
+ template::list::write_csv -name report
+ ad_script_abort
+}
Index: openacs-4/packages/invoices/lib/report-projects-offers.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-projects-offers.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/invoices/lib/report-projects-offers.xql 24 Aug 2006 09:18:14 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+
+
+ select
+ p.project_id,
+ i.item_id,
+ cr.title,
+ p.latest_finish_date,
+ p.customer_id,
+ org.name as customer_name
+ from
+ pm_projects p, cr_revisions cr, cr_items i, cr_items i2, organizations org
+ where
+ p.project_id = i.latest_revision
+ and p.project_id = cr.revision_id
+ $date_range_clause
+ and i.parent_id = i2.item_id
+ and i2.content_type = 'content_folder'
+ and p.customer_id = org.organization_id
+ order by
+ latest_finish_date
+
+
+
+
+
+ select
+ amount_total
+ from
+ iv_offers o,
+ cr_items i,
+ acs_data_links r,
+ cr_items i2
+
+ where
+ o.offer_id = i.latest_revision
+ and r.object_id_one = i.item_id
+ and r.object_id_two = i2.item_id
+ and i2.item_id = :project_item_id
+
+
+
+
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.25 -r1.26
--- openacs-4/packages/invoices/tcl/invoice-procs.tcl 11 Aug 2006 19:37:52 -0000 1.25
+++ openacs-4/packages/invoices/tcl/invoice-procs.tcl 24 Aug 2006 09:18:14 -0000 1.26
@@ -302,7 +302,7 @@
if {$price_per_unit > 1} {
set item_units [expr $item_units * (1. + ($credit_percent / 100.))]
} else {
- set item_units [format "%.1f" $item_units]
+ set item_units $item_units
}
set amount_sum [format "%.2f" [expr $multiplier * $item_units * $price_per_unit]]
set amount_total [format "%.2f" [expr (1. - ($rebate / 100.)) * $amount_sum]]
Index: openacs-4/packages/invoices/www/#index.adp#
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/Attic/#index.adp#,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/invoices/www/#index.adp# 24 Aug 2006 09:18:14 -0000 1.1
@@ -0,0 +1,28 @@
+
+@page_title;noquote@
+@context;noquote@
+
+
+ #invoices.admin#
+