Index: openacs-4/packages/invoices/lib/report-first-order.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-first-order.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/invoices/lib/report-first-order.tcl 13 Apr 2006 12:13:13 -0000 1.2 +++ openacs-4/packages/invoices/lib/report-first-order.tcl 13 Apr 2006 16:41:30 -0000 1.3 @@ -16,6 +16,7 @@ } +set first_date "2006-02-01" set start_date_sql "" if { $start_date != "YYYY-MM-DD" } { # Get all customer invoices starting with start_date Index: openacs-4/packages/invoices/lib/report-first-order.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/lib/report-first-order.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/invoices/lib/report-first-order.xql 13 Apr 2006 12:13:13 -0000 1.2 +++ openacs-4/packages/invoices/lib/report-first-order.xql 13 Apr 2006 16:41:30 -0000 1.3 @@ -5,7 +5,7 @@ select oo.organization_id as customer_id, oo.name as customer_name, o.amount_total, to_char(ao.creation_date, 'YYYY-MM-DD') as creation_date - from organizations oo, iv_offers o, cr_items i, acs_objects ao, + from organizations oo, iv_offers o, cr_items i, acs_objects ao, acs_objects oao, (select min(o2.offer_id) as offer_id, o2.organization_id from iv_offers o2, cr_items i2 where o2.offer_id = i2.latest_revision @@ -17,6 +17,8 @@ and o.offer_id = i.latest_revision and o.organization_id = sub.organization_id and o.offer_id = sub.offer_id + and oao.object_id = oo.organization_id + and oao.creation_date > to_timestamp(:first_date, 'YYYY-MM-DD') [template::list::filter_where_clauses -and -name "reports"] [template::list::orderby_clause -name reports -orderby]