[open-ils-commits] r11718 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 30 19:52:55 EST 2008
Author: miker
Date: 2008-12-30 19:52:55 -0500 (Tue, 30 Dec 2008)
New Revision: 11718
Modified:
trunk/Open-ILS/src/sql/Pg/080.schema.money.sql
Log:
doh! s/total_billed/total_owed/
Modified: trunk/Open-ILS/src/sql/Pg/080.schema.money.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/080.schema.money.sql 2008-12-30 23:35:38 UTC (rev 11717)
+++ trunk/Open-ILS/src/sql/Pg/080.schema.money.sql 2008-12-31 00:52:55 UTC (rev 11718)
@@ -294,7 +294,7 @@
BEGIN
IF NOT NEW.voided THEN
UPDATE money.materialized_billable_xact_summary
- SET total_billed = total_billed + NEW.amount,
+ SET total_owed = total_owed + NEW.amount,
last_billing_ts = NEW.billing_ts,
last_billing_note = NEW.note,
last_billing_type = NEW.billing_type,
@@ -326,7 +326,7 @@
END IF;
UPDATE money.materialized_billable_xact_summary
- SET total_billed = total_billed - NEW.amount,
+ SET total_owed = total_owed - NEW.amount,
balance_owed = balance_owed - NEW.amount
WHERE id = NEW.xact;
@@ -341,13 +341,13 @@
END IF;
UPDATE money.materialized_billable_xact_summary
- SET total_billed = total_billed + NEW.amount,
+ SET total_owed = total_owed + NEW.amount,
balance_owed = balance_owed + NEW.amount
WHERE id = NEW.xact;
ELSE
UPDATE money.materialized_billable_xact_summary
- SET total_billed = total_billed - (OLD.amount - NEW.amount),
+ SET total_owed = total_owed - (OLD.amount - NEW.amount),
balance_owed = balance_owed - (OLD.amount - NEW.amount)
WHERE id = NEW.xact;
END IF;
@@ -375,7 +375,7 @@
IF NOT OLD.voided THEN
UPDATE money.materialized_billable_xact_summary
- SET total_billed = total_billed - OLD.amount,
+ SET total_owed = total_owed - OLD.amount,
balance_owed = balance_owed + OLD.amount
WHERE id = OLD.xact;
END IF;
More information about the open-ils-commits
mailing list