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.16 -r1.17 --- openacs-4/packages/invoices/tcl/invoice-procs.tcl 25 Jan 2006 16:58:32 -0000 1.16 +++ openacs-4/packages/invoices/tcl/invoice-procs.tcl 29 Jan 2006 11:06:17 -0000 1.17 @@ -206,6 +206,7 @@ set data(contact_creation_date) [lc_time_fmt $data(creation_date) [lc_get -locale $contact_locale d_fmt]] set time_format [lc_get -locale $locale d_fmt] set data(creation_date) [lc_time_fmt $data(creation_date) $time_format] + set data(invoice_date) [lc_time_fmt $data(invoice_date) $time_format] set data(due_date) [lc_time_fmt $data(due_date) $time_format] set name [contact::name -party_id $data(recipient_id)] @@ -269,6 +270,7 @@ set price_per_unit [lc_numeric [format "%.2f" $price_per_unit] "" $locale] set item_units [lc_numeric [format "%.2f" $item_units] "" $locale] set rebate [lc_numeric [format "%.1f" $rebate] "" $locale] + set last_modified [lc_time_fmt $last_modified $time_format] set category [lang::util::localize [category::get_name $category_id] $locale] } Index: openacs-4/packages/invoices/tcl/invoice-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/tcl/invoice-procs.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/invoices/tcl/invoice-procs.xql 4 Jan 2006 08:06:47 -0000 1.7 +++ openacs-4/packages/invoices/tcl/invoice-procs.xql 29 Jan 2006 11:06:17 -0000 1.8 @@ -67,7 +67,8 @@ t.invoice_nr, t.total_amount, t.vat, t.vat_percent, o.creation_user, p.first_names, p.last_name, t.amount_sum, to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date, - to_char(t.due_date, 'YYYY-MM-DD HH24:MI:SS') as due_date, + to_char(t.due_date, 'YYYY-MM-DD HH24:MI:SS') as invoice_date, + to_char(t.due_date + cast((to_string(t.payment_days) || ' days' as interval), 'YYYY-MM-DD HH24:MI:SS') as due_date, t.payment_days, t.currency, t.organization_id, t.recipient_id, t.contact_id from iv_invoices t, cr_revisions r, cr_items i, acs_objects o, @@ -87,10 +88,10 @@ select cr.title, cr.description, cr.item_id, ii.offer_item_id, ii.item_units, ii.price_per_unit, ii.item_nr, ii.rebate, ii.vat, m.category_id, ofi.file_count, - ofi.page_count, pr.title as project_title, p.project_code, + ofi.page_count, pr.title as project_title, p.project_code, p.last_modified, pi.item_id as project_id, o.credit_percent from cr_items ci, cr_revisions cr, iv_invoice_items ii, cr_revisions oor, - acs_data_links r, cr_items pi, cr_revisions pr, pm_projects p, iv_offers o, + acs_data_links r, cr_items pi, cr_revisions pr, pm_projectsx p, iv_offers o, iv_offer_items ofi left outer join category_object_map m on (m.object_id = ofi.offer_item_id) where ci.latest_revision = ii.invoice_id @@ -103,7 +104,7 @@ and pi.latest_revision = pr.revision_id and pr.revision_id = p.project_id and o.offer_id = ofi.offer_id - order by pr.title, ii.sort_order + order by pr.title, ofi.sort_order