Index: openacs-4/packages/scholarship-fund/www/export-sch.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/scholarship-fund/www/export-sch.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/scholarship-fund/www/export-sch.tcl 14 Aug 2005 12:38:52 -0000 1.1 +++ openacs-4/packages/scholarship-fund/www/export-sch.tcl 22 Aug 2005 17:37:37 -0000 1.2 @@ -32,7 +32,7 @@ -formats { csv { output csv } } -elements { - sch_fund { + fund_id { label "Fund" } account_code { @@ -41,12 +41,27 @@ description { label "Description" } + name { + label "Name" + } + grant_date { + label "Grant Date" + } + grant_amount { + label "Grant Amount" + } } # build the multirow -set query "select fund_id, description, account_code, export_p from scholarship_fundx where export_p = false" - +#set query "select fund_id, description, account_code, export_p from scholarship_fundx where export_p = false" +set query "select f.fund_id, person__name(g.user_id) as name, to_char(g.grant_date, 'Month dd, yyyy hh:miam') as grant_date, g.grant_amount, + f.account_code, f.description + from scholarship_fund_grants g, + scholarship_fundi f + where g.fund_id=f.fund_id + group by person__name(g.user_id), g.grant_date, g.grant_amount, f.fund_id, f.account_code, f.description + order by g.grant_date" # Save for Later in case we want # to bring back selective exports @@ -66,7 +81,7 @@ db_multirow scholarship_funds get_sch_funds $query { } if { $mark == 1 } { - db_dml "mark_exported" "update scholarship_fund set exported_p = 't'" + db_dml "mark_exported" "update scholarship_fund set export_p = 't'" } # change headers to output csv