From cf1580bcd87feb59d82888ee192d1e48de9089e4 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 31 Dec 2008 00:52:55 +0000 Subject: [PATCH] doh! s/total_billed/total_owed/ git-svn-id: svn://svn.open-ils.org/ILS/trunk@11718 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/080.schema.money.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/sql/Pg/080.schema.money.sql b/Open-ILS/src/sql/Pg/080.schema.money.sql index 05a5ec95c4..f88a31852b 100644 --- a/Open-ILS/src/sql/Pg/080.schema.money.sql +++ b/Open-ILS/src/sql/Pg/080.schema.money.sql @@ -294,7 +294,7 @@ CREATE OR REPLACE FUNCTION money.materialized_summary_billing_add () RETURNS TRI 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 @@ BEGIN 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 @@ BEGIN 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 @@ BEGIN 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; -- 2.43.2