forward porting 14363 and 14364: do not use NEW in an ON DELETE trigger, use OLD
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Oct 2009 16:20:56 +0000 (16:20 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 12 Oct 2009 16:20:56 +0000 (16:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@14366 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/080.schema.money.sql

index 8082c41..5b46f9c 100644 (file)
@@ -370,7 +370,7 @@ BEGIN
                  SET   last_billing_ts = prev_billing.billing_ts,
                        last_billing_note = prev_billing.note,
                        last_billing_type = prev_billing.billing_type
-                 WHERE id = NEW.xact;
+                 WHERE id = OLD.xact;
        END IF;
 
        IF NOT OLD.voided THEN