Index: openacs-4/packages/invoices/www/invoice-cancellation.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/invoice-cancellation.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/invoices/www/invoice-cancellation.xql 11 Oct 2005 15:23:29 -0000 1.2
+++ openacs-4/packages/invoices/www/invoice-cancellation.xql 27 Oct 2005 18:11:24 -0000 1.3
@@ -23,6 +23,38 @@
+
+
+
+ select of.offer_id as credit_offer_rev_id
+ from iv_offers of, cr_items oi, acs_rels r,
+ acs_objects o, pm_projects p, cr_items pi
+ where r.object_id_one = pi.item_id
+ and r.object_id_two = oi.item_id
+ and r.rel_type = 'application_data_link'
+ and oi.latest_revision = of.offer_id
+ and of.status = 'credit'
+ and o.object_id = of.offer_id
+ and o.package_id = :package_id
+ and pi.latest_revision = p.project_id
+ and p.status_id = 2
+ and p.customer_id = :organization_id
+
+
+
+
+
+
+
+ select ofi.price_per_unit as old_credit
+ from iv_offer_items ofi, cr_items oi
+ where ofi.offer_id = :credit_offer_rev_id
+ and oi.latest_revision = ofi.offer_item_id
+ and ofi.item_nr = :parent_item_id
+
+
+
+